|
@@ -210,7 +210,7 @@
|
|
|
d.cVCName,c.cVenName,c.cVenAbbName,
|
|
|
x.cInvCode as cInvCode,y.cInvName as cInvName,isnull(x.cFree1,'') as cColor,isnull(x.cBatch,'') as cBatch,
|
|
|
isnull(x.iQuantity,0) as iQuantityIn,
|
|
|
- isnull(isnull((select sum(n.iSum) from PurBillVouchs n where n.RdsId =x.autoid),x.iProcessFee),0) as iProcessFee,
|
|
|
+ isnull(isnull((select sum(n.iSum) from PurBillVouchs n where n.RdsId =x.autoid),0),0) as iProcessFee,
|
|
|
isnull(x.iSumBillQuantity,0) as iSumBillQuantity,isnull(x.iSQuantity,0) as iSQuantity,
|
|
|
isnull((select sum(isnull(iquantity,0)) as iQuantityOut from rdrecords11 d where d.iOMoDID=b.MODetailsID),0) as iQuantityOut,
|
|
|
y.cInvCCode
|
|
@@ -392,7 +392,7 @@
|
|
|
<select id="getOmInOutInfoListByDetailId" resultType="map">
|
|
|
|
|
|
select a.MODetailsID,
|
|
|
- isnull((select isnull(sum(y.iSum),sum(x.iProcessFee)) from rdrecords01 x inner join PurBillVouchs y on y.RdsId =x.autoid where x.iOMoDID=a.MODetailsID),0) as iProcessFee,
|
|
|
+ isnull((select isnull(sum(y.iSum),0) from rdrecords01 x inner join PurBillVouchs y on y.RdsId =x.autoid where x.iOMoDID=a.MODetailsID),0) as iProcessFee,
|
|
|
isnull((select sum(x.iQuantity) from rdrecords01 x where x.iOMoDID=a.MODetailsID),0) as iQuantityIn,
|
|
|
b.cinvcode+isnull(b.cfree1,'')+isnull(b.cbatch,'') as cInvIdOut,b.iQuantity as iQuantityOut
|
|
|
from OM_MODetails a
|
|
@@ -549,7 +549,7 @@
|
|
|
d.cVCName,c.cVenName,c.cVenAbbName,
|
|
|
x.cInvCode as cInvCode,y.cInvName as cInvName,isnull(x.cFree1,'') as cColor,isnull(x.cBatch,'') as cBatch,
|
|
|
isnull(x.iQuantity,0) as iQuantityIn,
|
|
|
- isnull(isnull((select sum(n.iSum) from PurBillVouchs n where n.RdsId =x.autoid),x.iProcessFee),0) as iProcessFee,
|
|
|
+ isnull(isnull((select sum(n.iSum) from PurBillVouchs n where n.RdsId =x.autoid),0),0) as iProcessFee,
|
|
|
isnull(x.iSumBillQuantity,0) as iSumBillQuantity,isnull(x.iSQuantity,0) as iSQuantity,
|
|
|
(select sum(isnull(iquantity,0)) as iQuantityOut from rdrecords11 d where d.iOMoDID=b.MODetailsID) as iQuantityOut,
|
|
|
y.cInvCCode
|