修改
This commit is contained in:
@@ -259,7 +259,7 @@ namespace NX.ERP.U8.Purchase
|
|||||||
(SELECT iAppIds, sum(iquantity) AS qty
|
(SELECT iAppIds, sum(iquantity) AS qty
|
||||||
FROM PO_Podetails WITH (nolock)
|
FROM PO_Podetails WITH (nolock)
|
||||||
GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'')
|
GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'')
|
||||||
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and
|
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(omm.cverifier, N'') <> N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and
|
||||||
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
|
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
|
||||||
GROUP BY cInvCode
|
GROUP BY cInvCode
|
||||||
) as tbl1
|
) as tbl1
|
||||||
@@ -291,7 +291,7 @@ namespace NX.ERP.U8.Purchase
|
|||||||
(SELECT iAppIds, sum(iquantity) AS qty
|
(SELECT iAppIds, sum(iquantity) AS qty
|
||||||
FROM PO_Podetails WITH (nolock)
|
FROM PO_Podetails WITH (nolock)
|
||||||
GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'')
|
GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'')
|
||||||
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and DATEDIFF(day,ddate ,GETDATE()) >=3 and
|
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(omm.cverifier, N'') <> N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and DATEDIFF(day,ddate ,GETDATE()) >=3 and
|
||||||
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
|
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
|
||||||
GROUP BY cInvCode
|
GROUP BY cInvCode
|
||||||
) as tbl1
|
) as tbl1
|
||||||
@@ -417,7 +417,7 @@ namespace NX.ERP.U8.Purchase
|
|||||||
left join
|
left join
|
||||||
(select cInvCode,cMaker from ( select cInvCode,ROW_NUMBER() over( partition by b.cInvCode order by a.poid desc) as rownumber ,a.cMaker from PO_Pomain a WITH (nolock), PO_Podetails b WITH (nolock) where a.poid=b.poid)
|
(select cInvCode,cMaker from ( select cInvCode,ROW_NUMBER() over( partition by b.cInvCode order by a.poid desc) as rownumber ,a.cMaker from PO_Pomain a WITH (nolock), PO_Podetails b WITH (nolock) where a.poid=b.poid)
|
||||||
as c where c.rownumber=1) f on ommds.cInvCode =f.cInvCode
|
as c where c.rownumber=1) f on ommds.cInvCode =f.cInvCode
|
||||||
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 AND
|
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(omm.cverifier, N'') <> N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 AND
|
||||||
ommds.fquantity - ISNULL(rds.qty, 0) > 0 ) puu
|
ommds.fquantity - ISNULL(rds.qty, 0) > 0 ) puu
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user