From 5d7cfb160e311ccbfa638e2460cb3f9cd73f4471 Mon Sep 17 00:00:00 2001 From: lyt Date: Mon, 22 Oct 2018 11:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5:=20=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E4=B8=8D=E8=AE=B0=E5=BD=95=E4=BB=A3=E6=94=B6?= =?UTF-8?q?=E4=BB=A3=E4=BB=98=E6=95=B0=E6=8D=AE,=20=E4=B8=8D=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E5=88=A9=E6=B6=A6=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/TulanduoApi.php | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php index a232d0fd..f625591e 100644 --- a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php +++ b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php @@ -310,9 +310,9 @@ class TulanduoApi extends CI_Controller $coli_sn = isset($coli_sn)&&intval($coli_sn)!==0 ? $coli_sn : $getInfo_byGroupCode->COLI_SN; $coli_id = isset($coli_id) ? $coli_id : $getInfo_byGroupCode->COLI_ID; $cold_sn = isset($cold_sn) ? $cold_sn : $getInfo_byGroupCode->COLD_SN; - $coli_opi_id = 435; - $coli_memo = ($getInfo_byGroupCode !== null) ? $getInfo_byGroupCode->COLI_Memo : ""; - $coli_state = 9; + $coli_opi_id = ($getInfo_byGroupCode !== null) ? $getInfo_byGroupCode->COLI_OPI_ID : 435; + $coli_memo = ($getInfo_byGroupCode !== null) ? $getInfo_byGroupCode->COLI_Memo : ""; + $coli_state = ($getInfo_byGroupCode !== null) ? $getInfo_byGroupCode->COLI_State : 9; $coli_orderdetailtext = ($getInfo_byGroupCode !== null) ? $getInfo_byGroupCode->COLI_OrderDetailText : ""; $cold_memotext = isset($cold_sn) ? $this->Orders_model->COLD_MemoText : $getInfo_byGroupCode->COLD_MemoText; } else { @@ -448,25 +448,27 @@ class TulanduoApi extends CI_Controller } // 目的地项目组的订单为了避免重复录入, 外联会沟通录入, 这里不写入. // 代收 - if (isset($detail_jsonResp->orderDetail->replaceCollections) ) { - // foreach ($detail_jsonResp->orderDetail->replaceCollections as $krc => $vrc) { - // $this->insert_gai($coli_sn, $groupSN, $coli_id, $paytype, $pay_currency, $vrc->money, $vrc->money,$gai_vei_sn, $auto_text . "代收" . $vrc->type . ", " . $vrc->remark); - // } - } + // 此处代收是地接社角度的代收, 计算利润时需扣减还给地接社, 因此录入为负. + // 代付同理 + // if (isset($detail_jsonResp->orderDetail->replaceCollections) ) { + // foreach ($detail_jsonResp->orderDetail->replaceCollections as $krc => $vrc) { + // $this->insert_gai($coli_sn, $groupSN, $coli_id, $paytype, $pay_currency, '-' . $vrc->money, '-' . $vrc->money,$gai_vei_sn, $auto_text . "代收" . $vrc->type . ", " . $vrc->remark); + // } + // } if (isset($detail_jsonResp->orderDetail->operationDetails->otherReceives) ) { foreach ($detail_jsonResp->orderDetail->operationDetails->otherReceives as $koor => $voor) { $this->insert_gai($coli_sn, $groupSN, $coli_id, $paytype, $pay_currency, $voor->sumMoney, $voor->sumMoney, $gai_vei_sn, $auto_text . "其他收入" . $voor->type . ", " . $voor->remark); } } // 代付 - if (isset($detail_jsonResp->orderDetail->replacePays) ) { - // foreach ($detail_jsonResp->orderDetail->replacePays as $krp => $vrp) { - // $GAI_SQJE = "-" . $vrp->money; - // $GAI_SSJE = "-" . $vrp->money; - // $GAI_Memo = $auto_text . $vrp->type . ", " . $vrp->remark; - // $this->insert_gai($coli_sn, $groupSN, $coli_id, $paytype, $pay_currency, $GAI_SQJE, $GAI_SSJE, $gai_vei_sn, $GAI_Memo); - // } - } + // if (isset($detail_jsonResp->orderDetail->replacePays) ) { + // foreach ($detail_jsonResp->orderDetail->replacePays as $krp => $vrp) { + // $GAI_SQJE = $vrp->money; + // $GAI_SSJE = $vrp->money; + // $GAI_Memo = $auto_text . "代付" . $vrp->type . ", " . $vrp->remark; + // $this->insert_gai($coli_sn, $groupSN, $coli_id, $paytype, $pay_currency, $GAI_SQJE, $GAI_SSJE, $gai_vei_sn, $GAI_Memo); + // } + // } } /*BIZ_GroupCombineOperationDetail*/ if ( isset($detail_jsonResp->orderDetail->groupOrderNo) ) {