Merge branch 'feature/trippest'

mobile-first
lyt 6 years ago
commit 4c86c71d73

@ -397,12 +397,15 @@ class Vendor_money_model extends CI_Model {
end as 'HT_receipt_err' --海纳收差额 (账单减HT)' end as 'HT_receipt_err' --海纳收差额 (账单减HT)'
,data_tmp.total_income-(round(HT_haina_receipt,1)+ ROUND(HT_agency_receipt,1)) as 'total_income_err' --'海纳收入差额' ,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) as combineNo
,(select top 1 GCI_VendorOrderId from groupcombineinfo
where gci_gri_sn=data_tmp.GRI_SN and ( GCI_createTime<'2019-10-01' or GCI_combineNo is null)
) as vendor_order
,* from ,* from
( (
select select
gri.GRI_Name, gri.GRI_Name,
ro.money total_income, 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_priceCNY as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN and GCI_combineNo<>'cancel' ) 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(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 (select isnull(SUM(cast(GAI_SSJE as decimal(10,2))),0) from BIZ_GroupAccountInfo where GAI_COLI_SN=COLI_SN
and GAI_Type in (" . PAY_OTHER . ") and GAI_Type in (" . PAY_OTHER . ")
@ -414,10 +417,16 @@ class Vendor_money_model extends CI_Model {
and DeleteFlag=0 and DeleteFlag=0
--and isnull(GAI_VEI_SN,0) in (0,) --and isnull(GAI_VEI_SN,0) in (0,)
) as HT_haina_receipt, ) as HT_haina_receipt,
(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,
(select top 1 GAI_Memo from BIZ_GroupAccountInfo ga where ga.DeleteFlag=0 and GAI_COLI_SN=COLI_SN
and GAI_SSJE<=0
) as refund_memo,
(select isnull(SUM(tourcost),0) from report_tour (select isnull(SUM(tourcost),0) from report_tour
inner join BIZ_ConfirmLineDetail on COLD_SN=RPT_COLD_SN and COLD_PlanVEI_SN in ($all_vendor) inner join BIZ_ConfirmLineDetail on COLD_SN=RPT_COLD_SN and COLD_PlanVEI_SN in ($all_vendor)
where ordernumber=COLI_ID ) AS cost where ordernumber=COLI_ID ) AS cost
,coli.COLI_OPI_ID ,coli.COLI_OPI_ID,COLI_Memo, COLI_SN
,gri.GRI_SN ,gri.GRI_SN
--,* --,*
from from

@ -236,16 +236,44 @@
$col_sum['sum_HT_receipt'] = bcadd($col_sum['sum_HT_receipt'], $ep['HT_receipt_err']); $col_sum['sum_HT_receipt'] = bcadd($col_sum['sum_HT_receipt'], $ep['HT_receipt_err']);
?> ?>
<tr> <tr>
<td class="text-left"><?php echo $ep['GRI_Name']; ?></td> <td class="text-left"><?php echo $ep['GRI_Name']; ?>
</td>
<td class="text-left"><?php echo $ep['combineNo']; ?></td> <td class="text-left"><?php echo $ep['combineNo']; ?></td>
<td <?php echo abs($ep['total_income_err']) <= 1 ? "" : 'class=bgred'; ?>><?php echo $ep['total_income_err']; ?></td> <td <?php echo abs($ep['total_income_err']) <= 1 ? "" : 'class=bgred'; ?>><?php echo $ep['total_income_err']; ?></td>
<td <?php echo abs($ep['total_price_err']) <= 1 ? "" : 'class=bgred'; ?>> <td <?php //echo abs($ep['total_price_err']) <= 1 ? "" : 'class=bgred'; ?>>
<?php echo $ep['total_price_err']; ?> <?php echo $ep['total_price_err']; ?>
<!-- <p><?php // echo "=" . $ep['TLD_total_price'] . "-(" . $ep['HT_haina_receipt'] . "+" . $ep['HT_agency_receipt'] . ")"; <!-- <p><?php // echo "=" . $ep['TLD_total_price'] . "-(" . $ep['HT_haina_receipt'] . "+" . $ep['HT_agency_receipt'] . ")";
?></p> --> ?></p> -->
</td> </td>
<td <?php echo abs($ep['agency_receipt_err']) <= 1 ? "" : 'class=bgred'; ?>><?php echo $ep['agency_receipt_err']; ?></td> <td <?php echo abs($ep['agency_receipt_err']) <= 1 ? "" : 'class=bgred'; ?>>
<td <?php echo abs($ep['HT_receipt_err']) <= 1 ? "" : 'class=bgred'; ?>><?php echo $ep['HT_receipt_err']; ?></td> <?php if ($ep['agency_receipt_err'] > 0 &&
$ep['agency_receipt_err']==$ep['TLD_agency_receipt']
) {
echo "<p>HT未记录地接代收: " . $ep['TLD_agency_receipt'] . "</p>";
echo "<p class=\"text-left\">" . $ep["COLI_Memo"] . "</p>";
} else {
echo $ep['agency_receipt_err'];
}
?>
</td>
<td <?php echo abs($ep['HT_receipt_err']) <= 1 ? "" : 'class=bgred'; ?>>
<?php echo $ep['HT_receipt_err'];
?>
<?php if ($ep['HT_receipt_err']==$ep['refund']) {
echo "<p>地接账单未更新退款: " . $ep['refund'] . "</p>";
echo "<p class=\"text-left\">" . $ep["COLI_Memo"] . "</p>";
echo "<p class=\"text-left\">" . $ep["refund_memo"] . "</p>";
} elseif(abs($ep['HT_receipt_err'])==$ep['HT_haina_receipt']
&& mb_stripos($ep['combineNo'],'取消') > 0
) {
echo "<p>HT未更新退款: " . $ep['HT_receipt_err'] . "</p>";
} elseif ($ep['HT_receipt_err'] > 0) {
echo "<p class=\"text-left\">" . $ep["refund_memo"] . "</p>";
} elseif ($ep['vendor_order'] !== null) {
echo "<p>数据未更新, 请到HT中操作.</p>";
}
?>
</td>
<td><?php echo $ep['TLD_total_price']; ?></td> <td><?php echo $ep['TLD_total_price']; ?></td>
<td><?php echo $ep['TLD_agency_receipt']; ?></td> <td><?php echo $ep['TLD_agency_receipt']; ?></td>
<td><?php echo $ep['HT_haina_receipt']; ?></td> <td><?php echo $ep['HT_haina_receipt']; ?></td>

Loading…
Cancel
Save