diff --git a/webht/third_party/trippestOrderSync/controllers/vendor_money.php b/webht/third_party/trippestOrderSync/controllers/vendor_money.php index 94140a6d..af0258fc 100644 --- a/webht/third_party/trippestOrderSync/controllers/vendor_money.php +++ b/webht/third_party/trippestOrderSync/controllers/vendor_money.php @@ -296,6 +296,7 @@ class Vendor_money extends CI_Controller { $vendors = $this->input->post("vendors"); $ret['default_vendor'] = $vendors; $vendor_sourcetype = $this->trippest->vendor_sourcetype(); + $ret['no_check_cancel'] = $this->money_model->get_cancel_not_check($start_date, $end_date, implode(',' ,$vendors)); // price [Trippest receipts & agency receipts] $ret['price_error'] = $this->money_model->get_precheck_price_error($start_date, $end_date, implode(',' ,$vendors)); // 仅更新成本数据, 后重新获取 diff --git a/webht/third_party/trippestOrderSync/models/vendor_money_model.php b/webht/third_party/trippestOrderSync/models/vendor_money_model.php index 16bfc257..1d83cdf6 100644 --- a/webht/third_party/trippestOrderSync/models/vendor_money_model.php +++ b/webht/third_party/trippestOrderSync/models/vendor_money_model.php @@ -63,11 +63,12 @@ class Vendor_money_model extends CI_Model { and DeleteFlag=0 ) as service_cnt, (select isnull(SUM(COLD_TotalPrice),0) from BIZ_ConfirmLineDetail + left join biz_packageorderinfo on poi_cold_sn=cold_sn where COLD_COLI_SN=COLI_SN --and COLD_ServiceType='D' and DeleteFlag=0 --and COLD_PlanVEI_SN<>$vendor - and COLD_PlanVEI_SN not in ($all_vendor) + and ( COLD_PlanVEI_SN not in ($all_vendor) or isnull(poi_quotationType,0)=4) ) as other_vendor_price, COLI.COLI_sourcetype, COLI.COLI_Price, @@ -91,9 +92,8 @@ class Vendor_money_model extends CI_Model { --and GAI_Type in (" . PAY_OTHER . ") ) as vendor_receipt ,(select SUM(convert(decimal(10,2),isnull(GCI_priceCNY,0))) from - GroupCombineInfo where GCI_GRI_SN=GRI_SN and GCI_VEI_SN in ($all_vendor) - --and COLI_OPI_ID<>435 - and ISNULL(GCI_combineNo,'') not in ('','cancel') + GroupCombineInfo where GCI_GRI_SN=GRI_SN + and ISNULL(GCI_combineNo,'') not in ('','cancel','forbidden') ) as sync_total_receipt_sum ,coli.COLI_OPI_ID ,( @@ -117,6 +117,10 @@ class Vendor_money_model extends CI_Model { and DeleteFlag=0 and COLD_PlanVEI_SN in ($all_vendor) ) + and exists ( + select 1 from GroupCombineInfo where GCI_GRI_SN=GRI_SN and GCI_VEI_SN in ($all_vendor) + and GCI_travelDate between '$start_date' and '$end_date' + ) ) as cgi_group"; // -- and COLI_SN not in ($duplicate_gri) @@ -398,6 +402,27 @@ class Vendor_money_model extends CI_Model { return $query->result_array(); } + public function get_cancel_not_check($start_date, $end_date, $all_vendor) + { + $sql = "SELECT + COLI_ID, COLI_GroupCode,GCI_combineNo, + GCI_priceCNY + from GroupCombineInfo gci + inner join BIZ_ConfirmLineInfo coli on COLI_GRI_SN=GCI_GRI_SN + where + GCI_travelDate between '$start_date' and '$end_date' + and convert(decimal(10,2),isnull(GCI_priceCNY,0))<>0 + and COLI_State in (30,40) + and GCI_VEI_SN in ($all_vendor) + and isnull(GCI_combineNo,'') not in ('','cancel','forbidden') + and not exists( + select 1 from CK_GroupInfo where CGI_GRI_SN=COLI_GRI_SN + and CGI_Checked=1 + )"; + $query = $this->HT->query($sql); + return $query->result_array(); + } + public function get_precheck_price_error($start_date, $end_date, $all_vendor) { $expire_fresh = date('Y-m-d',strtotime("+3 months", strtotime($start_date))); diff --git a/webht/third_party/trippestOrderSync/views/order_report_precheck.php b/webht/third_party/trippestOrderSync/views/order_report_precheck.php index fcd83124..4e2cb109 100644 --- a/webht/third_party/trippestOrderSync/views/order_report_precheck.php +++ b/webht/third_party/trippestOrderSync/views/order_report_precheck.php @@ -152,6 +152,32 @@ + +
+| 不成行或已取消的团, 账单未审核 | +||
|---|---|---|
| HT团号 | +拼团号 | +团款 | +
| + | + | + |