diff --git a/webht/third_party/trippestOrderSync/controllers/vendor_money.php b/webht/third_party/trippestOrderSync/controllers/vendor_money.php index 817fd29f..828cde12 100644 --- a/webht/third_party/trippestOrderSync/controllers/vendor_money.php +++ b/webht/third_party/trippestOrderSync/controllers/vendor_money.php @@ -50,6 +50,7 @@ class Vendor_money extends CI_Controller { ,"default_vendor" => $vendors ,"trippest_order_vendor_money" => array() ,"trippest_order_multi_city" => array() + ,"trippest_order_cost_debug" => array() ,"transfer_sum" => 0 /** 列总计 */ ,"col_sum" => array( @@ -78,6 +79,7 @@ class Vendor_money extends CI_Controller { ) ); $result['trippest_order_multi_city'] = array_merge($result['trippest_order_multi_city'], $this->money_model->trippest_order_multi_city($start_date, $end_date, implode(',', $vendors))); + $result['trippest_order_cost_debug'] = $this->money_model->cost_debug_detail($start_date, $end_date, implode(',', $vendors)); /** 团款 */ foreach ($vendors as $key => $vendor) { $sourcetype = $vendor_sourcetype[strval($vendor)]["sourcetype"]; diff --git a/webht/third_party/trippestOrderSync/models/vendor_money_model.php b/webht/third_party/trippestOrderSync/models/vendor_money_model.php index 50d92248..0483fd35 100644 --- a/webht/third_party/trippestOrderSync/models/vendor_money_model.php +++ b/webht/third_party/trippestOrderSync/models/vendor_money_model.php @@ -301,6 +301,30 @@ class Vendor_money_model extends CI_Model { return $query->result_array(); } + public function cost_debug_detail($start_date, $end_date, $all_vendor) + { + $sql = "SELECT + ordernumber,RPT_Total + ,round(tourCost/case isnull(tourRSd,0)+ISNULL(tourRSx,0) when 0 then 1 else isnull(tourRSd,0)+ISNULL(tourRSx,0) end *case isnull(RPT_PersonGrade,1) when 0 then 1 else isnull(RPT_PersonGrade,1) end,2) as cal_total + ,tourRSd,isnull(tourRSx,0) tourRSx,tourcost,RPT_PersonGrade,tourBZ,tourCode + from report_tour rt + inner join BIZ_ConfirmLineDetail cold on RPT_COLD_SN=COLD_SN + where COLD_StartDate between '$start_date' and '$end_date' + and COLD_PlanVEI_SN in ($all_vendor) + and ISNULL(RPT_Total,0)<>case when SUBSTRING(tourBZ,1,3)='PVT' then tourcost + else round( + (tourCost/case isnull(tourRSd,0)+ISNULL(tourRSx,0) when 0 then 1 else isnull(tourRSd,0)+ISNULL(tourRSx,0) end + *case isnull(RPT_PersonGrade,1) when 0 then 1 else isnull(RPT_PersonGrade,1) end),2) + end + and exists ( + select 1 from OperatorInfo + inner join BIZ_ConfirmLineInfo on COLI_ID=ordernumber + where OPI_SN=COLI_OPI_ID and OPI_DEI_SN=30 + ) + order by tourBZ desc"; + $query = $this->HT->query($sql); + return $query->result_array(); + } } diff --git a/webht/third_party/trippestOrderSync/views/vendor_money_sum.php b/webht/third_party/trippestOrderSync/views/vendor_money_sum.php index 368142d3..13ce8818 100644 --- a/webht/third_party/trippestOrderSync/views/vendor_money_sum.php +++ b/webht/third_party/trippestOrderSync/views/vendor_money_sum.php @@ -28,6 +28,7 @@ .text-left {text-align: left;} .text-right {text-align: right;} .text-bold {font-weight: bold;} + .text-red {color: red;} .cell-right {float: right;} td a {cursor: pointer;} @@ -157,7 +158,7 @@ -