Merge branch 'feature/trippest'

mobile-first
lyt 6 years ago
commit 9cd43e73da

@ -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);
}

@ -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

@ -87,6 +87,10 @@
<tr>
<th>HT团号</th>
<th>拼团号</th>
<th class="text-left">
总收入差额
<p>=&nbsp;财务表总收入&nbsp;-&nbsp;收款记录总额</p>
</th>
<th class="text-left">
总团款差额
<p>=&nbsp;账单总团款&nbsp;-&nbsp;(&nbsp;HT收款&nbsp;+&nbsp;HT代收&nbsp;)</p>
@ -111,6 +115,7 @@
<tr>
<td class="text-left"><?php echo $ep['GRI_Name']; ?></td>
<td class="text-left"><?php echo $ep['combineNo']; ?></td>
<td><?php echo $ep['total_income_err']; ?></td>
<td>
<?php echo $ep['total_price_err']; ?>
<!-- <p><?php // echo "=" . $ep['TLD_total_price'] . "-(" . $ep['HT_haina_receipt'] . "+" . $ep['HT_agency_receipt'] . ")"; ?></p> -->

Loading…
Cancel
Save