|
@@ -53,7 +53,7 @@
|
|
|
|
|
|
AND omi.cInvCcode LIKE '19%'
|
|
|
AND om.cCode LIKE CONCAT(#{code},'%')
|
|
|
-and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) ))
|
|
|
+and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) )or om.cCloser='asuser')
|
|
|
GROUP BY om.ccode,ot.cInvCode,od.isosid,om.ccode,oti.cInvName ) AS t1
|
|
|
|
|
|
left join (SELECT ven.cVenAbbName AS cVenAbbName,bi.cInvCode,pod.isosid,SUM ( bi.iSum ) AS rmbAmount,SUM ( bi.iOriSum ) AS usdAmount,
|
|
@@ -99,7 +99,7 @@ and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY !=
|
|
|
|
|
|
AND omi.cInvCcode LIKE '19%'
|
|
|
AND om.cCode LIKE CONCAT(#{code},'%')
|
|
|
-and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) ))
|
|
|
+and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) )or om.cCloser='asuser')
|
|
|
GROUP BY om.ccode,ot.cInvCode,om.ccode,oti.cInvName ) AS t1
|
|
|
|
|
|
left join (
|
|
@@ -200,7 +200,7 @@ and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY !=
|
|
|
join UFDATA_103_2021.dbo.cost_allocation_accessories_view vif on om.ccode = vif.cCode and ot.cInvCode = vif.cInvCode
|
|
|
WHERE om.iVerifyStateNew = 2 and omi.cInvCcode like '19%'
|
|
|
and om.cCode LIKE CONCAT(#{code},'%')
|
|
|
- and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) ))
|
|
|
+ and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) )or om.cCloser='asuser')
|
|
|
group by om.ccode,ot.cInvCode,od.isosid,om.ccode,oti.cInvName
|
|
|
) as t1,
|
|
|
(
|
|
@@ -232,7 +232,7 @@ join UFDATA_103_2021.dbo.cost_allocation_accessories_view vif on om.ccode = vif.
|
|
|
join UFDATA_103_2021.dbo.cost_allocation_accessories_view vif on om.ccode = vif.cCode and ot.cInvCode = vif.cInvCode
|
|
|
WHERE om.iVerifyStateNew = 2 and omi.cInvCcode like '19%'
|
|
|
and om.cCode LIKE CONCAT(#{code},'%')
|
|
|
- and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) ))
|
|
|
+ and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) )or om.cCloser='asuser')
|
|
|
group by om.ccode,ot.cInvCode,od.isosid,om.ccode,oti.cInvName
|
|
|
) as t1
|
|
|
left join (
|
|
@@ -267,7 +267,7 @@ join UFDATA_103_2021.dbo.cost_allocation_accessories_view vif on om.ccode = vif.
|
|
|
join UFDATA_103_2021.dbo.cost_allocation_accessories_view vif on om.ccode = vif.cCode and ot.cInvCode = vif.cInvCode
|
|
|
WHERE om.iVerifyStateNew = 2 and omi.cInvCcode like '19%'
|
|
|
and om.cCode LIKE CONCAT(#{code},'%')
|
|
|
- and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) ))
|
|
|
+ and (om.cCloser is null or ( (od.iReceivedQTY is not null or od.iReceivedQTY != 0) and (ot.iSendQTY is not null or ot.iSendQTY !=0) )or om.cCloser='asuser')
|
|
|
group by om.ccode,ot.cInvCode,od.isosid,om.ccode,oti.cInvName
|
|
|
) as t1,
|
|
|
(
|