|
|
@ -381,6 +381,7 @@ class TulanduoApi extends CI_Controller
|
|
|
|
$old_detail = mb_strstr($coli_orderdetailtext, " operations", true)!==false ? mb_strstr($coli_orderdetailtext, " operations", true) : $coli_orderdetailtext;
|
|
|
|
$old_detail = mb_strstr($coli_orderdetailtext, " operations", true)!==false ? mb_strstr($coli_orderdetailtext, " operations", true) : $coli_orderdetailtext;
|
|
|
|
$new_detail = trim($allDetails_to_HT)=="" ? $old_detail : $old_detail . " operations\r\n" . $allDetails_to_HT . "\r\n";
|
|
|
|
$new_detail = trim($allDetails_to_HT)=="" ? $old_detail : $old_detail . " operations\r\n" . $allDetails_to_HT . "\r\n";
|
|
|
|
// 团款总金额
|
|
|
|
// 团款总金额
|
|
|
|
|
|
|
|
// 渠道实收
|
|
|
|
$travel_fee = 0;
|
|
|
|
$travel_fee = 0;
|
|
|
|
$travel_fee_currency = 'RMB';
|
|
|
|
$travel_fee_currency = 'RMB';
|
|
|
|
if (isset($detail_jsonResp->orderDetail->travelFees) ) {
|
|
|
|
if (isset($detail_jsonResp->orderDetail->travelFees) ) {
|
|
|
@ -389,6 +390,22 @@ class TulanduoApi extends CI_Controller
|
|
|
|
}
|
|
|
|
}
|
|
|
|
unset($vtf);
|
|
|
|
unset($vtf);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 渠道价
|
|
|
|
|
|
|
|
$pag_info = $this->analysis_productcode($detail_jsonResp->orderDetail->routeName, $detail_jsonResp->orderDetail->orderId);
|
|
|
|
|
|
|
|
$total_num = $detail_jsonResp->orderDetail->adultNum+$detail_jsonResp->orderDetail->childNum;
|
|
|
|
|
|
|
|
$partner_price = $this->Orders_model->get_partner_price($pag_info->PAG_Code, $total_num, $detail_jsonResp->orderDetail->travelDate);
|
|
|
|
|
|
|
|
if ( ! empty($partner_price)) {
|
|
|
|
|
|
|
|
$travel_fee_currency = $partner_price->PKP_Currency ? $partner_price->PKP_Currency : "RMB";
|
|
|
|
|
|
|
|
if (strval($partner_price->PKP_PriceType) === "1") {
|
|
|
|
|
|
|
|
// 每团
|
|
|
|
|
|
|
|
$travel_fee = $partner_price->PKP_AdultCost;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 每人
|
|
|
|
|
|
|
|
$adult_price = bcmul($detail_jsonResp->orderDetail->adultNum, $partner_price->PKP_AdultCost);
|
|
|
|
|
|
|
|
$child_price = bcmul($detail_jsonResp->orderDetail->childNum, $partner_price->PKP_ChildCost);
|
|
|
|
|
|
|
|
$travel_fee = bcadd($adult_price, $child_price);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
$coli_update_column = array(
|
|
|
|
$coli_update_column = array(
|
|
|
|
"COLI_Memo" => substr($new_memo, 0, 400)
|
|
|
|
"COLI_Memo" => substr($new_memo, 0, 400)
|
|
|
|
,"COLI_OrderDetailText" => $new_detail
|
|
|
|
,"COLI_OrderDetailText" => $new_detail
|
|
|
@ -406,7 +423,6 @@ class TulanduoApi extends CI_Controller
|
|
|
|
* insert BIZ_BookPeople,BIZ_PackageOrderInfo
|
|
|
|
* insert BIZ_BookPeople,BIZ_PackageOrderInfo
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
/** BIZ_ConfirmLineDetail */
|
|
|
|
/** BIZ_ConfirmLineDetail */
|
|
|
|
$pag_info = $this->analysis_productcode($detail_jsonResp->orderDetail->routeName, $detail_jsonResp->orderDetail->orderId);
|
|
|
|
|
|
|
|
$COLD_MemoText = raw_json_encode(array("Pick up"=>$detail_jsonResp->orderDetail->toTraffic, "Drop off"=>$detail_jsonResp->orderDetail->backTraffic));
|
|
|
|
$COLD_MemoText = raw_json_encode(array("Pick up"=>$detail_jsonResp->orderDetail->toTraffic, "Drop off"=>$detail_jsonResp->orderDetail->backTraffic));
|
|
|
|
$new_memotext = trim($cold_memotext)===""||(json_decode($cold_memotext)!==null&&!is_numeric(json_decode($cold_memotext))) ? $COLD_MemoText : $cold_memotext;
|
|
|
|
$new_memotext = trim($cold_memotext)===""||(json_decode($cold_memotext)!==null&&!is_numeric(json_decode($cold_memotext))) ? $COLD_MemoText : $cold_memotext;
|
|
|
|
$cold_update_column = array(
|
|
|
|
$cold_update_column = array(
|
|
|
|