diff --git a/webht/third_party/trippestOrderSync/models/vendor_money_model.php b/webht/third_party/trippestOrderSync/models/vendor_money_model.php index b80a3607..b76fabba 100644 --- a/webht/third_party/trippestOrderSync/models/vendor_money_model.php +++ b/webht/third_party/trippestOrderSync/models/vendor_money_model.php @@ -397,9 +397,10 @@ class Vendor_money_model extends CI_Model { 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 + ,(select top 1 GCI_combineNo from groupcombineinfo where gci_gri_sn=data_tmp.GRI_SN order by GCI_combineNo desc) as combineNo ,(select top 1 GCI_VendorOrderId from groupcombineinfo - where gci_gri_sn=data_tmp.GRI_SN and ( GCI_createTime<'$expire_fresh' ) + where gci_gri_sn=data_tmp.GRI_SN and ( GCI_createTime<'$expire_fresh' or (GCI_createTime>'$expire_fresh' and isnull(convert(decimal(10,2),GCI_priceCNY),0)=0) ) + order by GCI_createTime ) as vendor_order ,* from ( @@ -421,6 +422,9 @@ class Vendor_money_model extends CI_Model { and DeleteFlag=0 --and isnull(GAI_VEI_SN,0) in (0,) ) as HT_haina_receipt, + (select top 1 CONVERT(varchar(10),ISNULL( GAI_SQJE,0)) + isnull(GAI_SQJECurrency,'')+',' + isnull(GAI_Memo,'') from BIZ_GroupAccountInfo ga where ga.DeleteFlag=0 and GAI_COLI_SN=COLI_SN + and GAI_SQJE>0 and isnull(GAI_SSJE,0)=0 + ) as ht_receipt_memo, (select SUM(ABS(GAI_SSJE)) from BIZ_GroupAccountInfo ga where ga.DeleteFlag=0 and GAI_COLI_SN=COLI_SN and GAI_SSJE<0 ) as refund, @@ -480,7 +484,7 @@ class Vendor_money_model extends CI_Model { ) OR exists ( select 1 from groupcombineinfo - where gci_gri_sn=data_tmp.GRI_SN and ( GCI_createTime<'$expire_fresh' or GCI_combineNo is null) + where gci_gri_sn=data_tmp.GRI_SN and ( GCI_createTime<'$expire_fresh' AND GCI_combineNo is null) ) order by total_income_err desc,agency_receipt_err desc,HT_receipt_err desc"; $query = $this->HT->query($sql); diff --git a/webht/third_party/trippestOrderSync/views/order_report_precheck.php b/webht/third_party/trippestOrderSync/views/order_report_precheck.php index 0318037a..fcd83124 100644 --- a/webht/third_party/trippestOrderSync/views/order_report_precheck.php +++ b/webht/third_party/trippestOrderSync/views/order_report_precheck.php @@ -257,8 +257,7 @@ ?>
" . $ep["COLI_Memo"] . "
"; @@ -274,6 +273,9 @@ } elseif ($ep['vendor_order'] !== null) { // echo "数据未更新, 请到HT中操作.
"; } + if ($ep['ht_receipt_memo']!==null) { + echo "收款未填写实收金额: " . $ep['ht_receipt_memo'] . "
"; + } ?>