|
|
|
@ -439,32 +439,33 @@ class TulanduoApi extends CI_Controller
|
|
|
|
|
// 删除旧的录入
|
|
|
|
|
$this->Orders_model->biz_groupaccountinfo_cut($coli_sn, $paytype);
|
|
|
|
|
if (intval($latest_order_detail[0]->COLI_OPI_ID)===435) {
|
|
|
|
|
$gai_vei_sn = $latest_order_detail[0]->COLD_PlanVEI_SN;
|
|
|
|
|
// 团款
|
|
|
|
|
if (isset($detail_jsonResp->orderDetail->travelFees) ) {
|
|
|
|
|
foreach ($detail_jsonResp->orderDetail->travelFees as $ktf => $vtf) {
|
|
|
|
|
$this->insert_gai($coli_sn, $groupSN, $coli_id, $paytype, $pay_currency, $vtf->sumMoney, $vtf->sumMoney, $auto_text . "代收" . $vtf->type . ", " . $vtf->remark);
|
|
|
|
|
$this->insert_gai($coli_sn, $groupSN, $coli_id, $paytype, $pay_currency, $vtf->sumMoney, $vtf->sumMoney,$gai_vei_sn, $auto_text . "团款" . $vtf->type . ", " . $vtf->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, $auto_text . "代收" . $vrc->type . ", " . $vrc->remark);
|
|
|
|
|
}
|
|
|
|
|
// 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, $auto_text . "代收" . $voor->type . ", " . $voor->remark);
|
|
|
|
|
$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_Memo);
|
|
|
|
|
}
|
|
|
|
|
// 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*/
|
|
|
|
@ -713,7 +714,7 @@ class TulanduoApi extends CI_Controller
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function insert_gai($coli_sn, $gri_sn, $coli_id, $paytype, $currency, $sqje, $ssje, $memo="")
|
|
|
|
|
public function insert_gai($coli_sn, $gri_sn, $coli_id, $paytype, $currency, $sqje, $ssje, $gai_vei_sn, $memo="")
|
|
|
|
|
{
|
|
|
|
|
$this->Orders_model->GAI_Operator = 435;
|
|
|
|
|
$this->Orders_model->GAI_COLI_SN = $coli_sn;
|
|
|
|
@ -725,6 +726,7 @@ class TulanduoApi extends CI_Controller
|
|
|
|
|
$this->Orders_model->GAI_SSJE = $ssje;
|
|
|
|
|
$this->Orders_model->GAI_SSDate = date("Y-m-d H:i:s");
|
|
|
|
|
$this->Orders_model->GAI_Memo = $memo;
|
|
|
|
|
$this->Orders_model->GAI_VEI_SN = $gai_vei_sn;
|
|
|
|
|
return $this->Orders_model->biz_groupaccountinfo_save();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|