@ -447,11 +447,15 @@ class Vendor_money_model extends CI_Model {
select
gri.GRI_Name,
ro.money total_income,
(select SUM(COLD_TotalPrice) from BIZ_ConfirmLineDetail d where d.DeleteFlag=0 and d.COLD_PlanVEI_SN not in ($all_vendor)
(select SUM(COLD_TotalPrice) from BIZ_ConfirmLineDetail d
inner join BIZ_PackageOrderInfo p on p.POI_COLD_SN=d.COLD_SN
where d.DeleteFlag=0
and COLD_COLI_SN=coli.COLI_SN
and ( d.COLD_PlanVEI_SN not in ($all_vendor) or
p.POI_QuotationType=4 )
) as other_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 and GCI_combineNo is not null ) as TLD_agency_receipt,
(select isnull(SUM(cast(GCI_priceCNY as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN and isnull(GCI_combineNo,'') not in ('','cancel','forbidden') ) as TLD_total_price,
(select isnull(SUM(cast(GCI_agencyReceipt as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN and isnull(GCI_combineNo,'') not in ('','cancel','forbidden') ) as TLD_agency_receipt,
(select isnull(SUM(cast(GAI_SSJE as decimal(10,2))),0) from BIZ_GroupAccountInfo where GAI_COLI_SN=COLI_SN