Переглянути джерело

成本分配表 辅料含税不含税金额

liuchaohui 1 рік тому
батько
коміт
f1a64e4ec8

+ 6 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationIngredientMapper.xml

@@ -37,8 +37,8 @@
 				join UFDATA_103_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 				join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
 				left join (
-						SELECT p.cInvCode,p.iorderdid,sum(bi.iMoney) as rmbAmount,sum(bi.iOriMoney) as usdAmount
-									,sum(bi.iMoney-bi.iTaxPrice) as priceExcludingtax,max(bi.iCost) as iCost
+						SELECT p.cInvCode,p.iorderdid,sum(bi.iSum) as rmbAmount,sum(bi.iOriSum) as usdAmount
+									,sum(bi.iMoney) as priceExcludingtax,max(bi.iCost) as iCost
 						from UFDATA_103_2021.dbo.PO_Podetails p      
 						join UFDATA_103_2021.dbo.PurBillVouchs bi  on bi.iPOsID=p.ID 
 						GROUP BY p.cInvCode,p.iorderdid 
@@ -100,8 +100,8 @@
 				join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 				join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
 				left join (
-						SELECT p.cInvCode,p.iorderdid,sum(bi.iMoney) as rmbAmount,sum(bi.iOriMoney) as usdAmount
-									,sum(bi.iMoney-bi.iTaxPrice) as priceExcludingtax,max(bi.iCost) as iCost
+						SELECT p.cInvCode,p.iorderdid,sum(bi.iSum) as rmbAmount,sum(bi.iOriSum) as usdAmount
+									,sum(bi.iMoney) as priceExcludingtax,max(bi.iCost) as iCost
 						from UFDATA_101_2021.dbo.PO_Podetails p
 						join UFDATA_101_2021.dbo.PO_Pomain pm on p.POID  = pm.POID
 						join UFDATA_101_2021.dbo.PurBillVouchs bi  on bi.iPOsID=p.ID
@@ -111,8 +111,8 @@
 						union all
 
 						 select
-						pod.cInvCode,pod.iorderdid,sum(bi.iMoney) as rmbAmount,sum(bi.iOriMoney) as usdAmount
-						,sum(bi.iMoney-bi.iTaxPrice) as priceExcludingtax,max(bi.iCost) as iCost
+						pod.cInvCode,pod.iorderdid,sum(bi.iSum) as rmbAmount,sum(bi.iOriSum) as usdAmount
+						,sum(bi.iMoney) as priceExcludingtax,max(bi.iCost) as iCost
 						 from UFDATA_101_2021.dbo.PO_Pomain pom
 						 join UFDATA_101_2021.dbo.PO_Podetails pod on pod.POID  = pom.POID
 						 join UFDATA_102_2021.dbo.SO_SODetails sd on sd.cSOCode=pom.cpoid and sd.irowno=pod.ivouchrowno