From c9e7e4a1ab613af713c0c14d0d6c782393f8e657 Mon Sep 17 00:00:00 2001 From: lyt Date: Fri, 14 Feb 2020 16:36:36 +0800 Subject: [PATCH] =?UTF-8?q?Trippest=E8=B4=A6=E5=8D=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8:=E4=B8=8D=E5=90=AB=E7=BB=BC=E8=B4=B9?= =?UTF-8?q?=E7=BB=93=E7=AE=97(=E5=85=88=E4=BD=BF=E7=94=A8=E5=9C=B0?= =?UTF-8?q?=E6=8E=A5=E6=95=B0=E6=8D=AE);=E9=A2=84=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=8F=96=E6=B6=88=E5=9B=A2=E6=9C=AA=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/vendor_money.php | 1 + .../models/vendor_money_model.php | 33 ++++++++++++++++--- .../views/order_report_precheck.php | 26 +++++++++++++++ 3 files changed, 56 insertions(+), 4 deletions(-) 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 @@ + +

+ + + + + + + + + + + + + $cc) { ?> + + + + + + + +
不成行或已取消的团, 账单未审核
HT团号拼团号团款
+ +