From ac631e0da90742b8e4857bdb19a006b7fb62239a Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 11 Sep 2019 10:47:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Trippest=E8=87=AA=E5=8A=A8=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8+=E6=80=BB=E6=94=B6=E5=85=A5=E5=B7=AE=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trippestOrderSync/controllers/vendor_money.php | 2 +- .../trippestOrderSync/models/vendor_money_model.php | 6 +++++- .../trippestOrderSync/views/order_report_precheck.php | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/webht/third_party/trippestOrderSync/controllers/vendor_money.php b/webht/third_party/trippestOrderSync/controllers/vendor_money.php index 7bde868e..cd4c2aee 100644 --- a/webht/third_party/trippestOrderSync/controllers/vendor_money.php +++ b/webht/third_party/trippestOrderSync/controllers/vendor_money.php @@ -30,7 +30,7 @@ class Vendor_money extends CI_Controller { return $this->settlement(); } $start_date = $date_range_arr[0][0]; - $end_date =$date_range_arr[0][1] . " 23:59:59"; + $end_date =$date_range_arr[0][1] . " 23:59"; if ($end_date == null) { $end_date = date("Y-m-d H:i:s", strtotime("+1 month", strtotime($start_date))-1); } diff --git a/webht/third_party/trippestOrderSync/models/vendor_money_model.php b/webht/third_party/trippestOrderSync/models/vendor_money_model.php index ecd06ac2..01c5196e 100644 --- a/webht/third_party/trippestOrderSync/models/vendor_money_model.php +++ b/webht/third_party/trippestOrderSync/models/vendor_money_model.php @@ -370,11 +370,13 @@ class Vendor_money_model extends CI_Model { then TLD_total_price-HT_agency_receipt else TLD_total_price-TLD_agency_receipt-HT_haina_receipt end as 'HT_receipt_err' --海纳收差额 (账单减HT)' + ,data_tmp.total_income-(round(HT_haina_receipt,1)+ ROUND(HT_agency_receipt,1)) as 'total_income_err' --'海纳收入差额' ,(select top 1 GCI_combineNo from groupcombineinfo where gci_gri_sn=data_tmp.GRI_SN) as combineNo ,* from ( select gri.GRI_Name, + ro.money total_income, (select isnull(SUM(cast(GCI_priceCNY as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN) as TLD_total_price, (select isnull(SUM(cast(GCI_agencyReceipt as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN) as TLD_agency_receipt, (select isnull(SUM(cast(GAI_SSJE as decimal(10,2))),0) from BIZ_GroupAccountInfo where GAI_COLI_SN=COLI_SN @@ -401,7 +403,7 @@ class Vendor_money_model extends CI_Model { where 1=1 --and CGI_ArriveDate BETWEEN '$start_date' and '$end_date' and exists ( - select 1 from OperatorInfo where OPI_DEI_SN=30 and OPI_SN=COLI_OPI_ID + select 1 from OperatorInfo where OPI_SN=COLI_OPI_ID and (OPI_DEI_SN=30 or OPI_SN=435) ) and ro.orderstats=1 and GRI_OrderType=227002 @@ -415,6 +417,8 @@ class Vendor_money_model extends CI_Model { where 1=1 -- 总团款不相等 and data_tmp.TLD_total_price-(HT_haina_receipt+HT_agency_receipt)<>0 + -- 总收入和实收不相等 + OR data_tmp.total_income-(round(HT_haina_receipt,1)+ ROUND(HT_agency_receipt,1))<>0 -- 地接代收不相等:同步 OR ( data_tmp.COLI_OPI_ID=435 and HT_haina_receipt<>0 and TLD_agency_receipt<>0 diff --git a/webht/third_party/trippestOrderSync/views/order_report_precheck.php b/webht/third_party/trippestOrderSync/views/order_report_precheck.php index 81d422e3..ab14e3a6 100644 --- a/webht/third_party/trippestOrderSync/views/order_report_precheck.php +++ b/webht/third_party/trippestOrderSync/views/order_report_precheck.php @@ -87,6 +87,10 @@ HT团号 拼团号 + + 总收入差额 +

= 财务表总收入 - 收款记录总额

+ 总团款差额

= 账单总团款 - ( HT收款 + HT代收 )

@@ -111,6 +115,7 @@ +