|
@ -1562,7 +1562,7 @@ WHERE |
|
|
AND a.WarehouseCode= (SELECT TOP 1 WHCode FROM ICSDeliveryNotice WHERE DNCode='{DNCode}' And Sequence='{Sequence}' ) |
|
|
AND a.WarehouseCode= (SELECT TOP 1 WHCode FROM ICSDeliveryNotice WHERE DNCode='{DNCode}' And Sequence='{Sequence}' ) |
|
|
AND a.InvCode= '{INVCode}' |
|
|
AND a.InvCode= '{INVCode}' |
|
|
AND a.Quantity>0 |
|
|
AND a.Quantity>0 |
|
|
ORDER BY Quantity) |
|
|
|
|
|
|
|
|
ORDER BY InDate DESC) |
|
|
PRINT(@locationCodeCurrent) |
|
|
PRINT(@locationCodeCurrent) |
|
|
IF @locationCodeCurrent is NULL |
|
|
IF @locationCodeCurrent is NULL |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
@ -1722,7 +1722,7 @@ WHERE |
|
|
AND a.WarehouseCode= '{whCode}' |
|
|
AND a.WarehouseCode= '{whCode}' |
|
|
AND a.InvCode= '{invCode}' |
|
|
AND a.InvCode= '{invCode}' |
|
|
AND a.Quantity>0 |
|
|
AND a.Quantity>0 |
|
|
ORDER BY Quantity) |
|
|
|
|
|
|
|
|
ORDER BY InDate DESC) |
|
|
PRINT(@locationCodeCurrent) |
|
|
PRINT(@locationCodeCurrent) |
|
|
IF @locationCodeCurrent is NULL |
|
|
IF @locationCodeCurrent is NULL |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
@ -2107,7 +2107,7 @@ WHERE |
|
|
AND a.WarehouseCode= '{whCode}' |
|
|
AND a.WarehouseCode= '{whCode}' |
|
|
AND a.InvCode= '{invCode}' |
|
|
AND a.InvCode= '{invCode}' |
|
|
AND a.Quantity>0 |
|
|
AND a.Quantity>0 |
|
|
ORDER BY Quantity) |
|
|
|
|
|
|
|
|
ORDER BY InDate DESC) |
|
|
PRINT(@locationCodeCurrent) |
|
|
PRINT(@locationCodeCurrent) |
|
|
IF @locationCodeCurrent is NULL |
|
|
IF @locationCodeCurrent is NULL |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
@ -2271,7 +2271,7 @@ WHERE |
|
|
AND a.WarehouseCode= (SELECT TOP 1 WHCode FROM ICSManufactureReceive WHERE RCVCode='{RCVCode}' And Sequence='{Sequence}' ) |
|
|
AND a.WarehouseCode= (SELECT TOP 1 WHCode FROM ICSManufactureReceive WHERE RCVCode='{RCVCode}' And Sequence='{Sequence}' ) |
|
|
AND a.InvCode= (SELECT TOP 1 INVCode FROM ICSManufactureReceive WHERE RCVCode='{RCVCode}' And Sequence='{Sequence}') |
|
|
AND a.InvCode= (SELECT TOP 1 INVCode FROM ICSManufactureReceive WHERE RCVCode='{RCVCode}' And Sequence='{Sequence}') |
|
|
AND a.Quantity>0 |
|
|
AND a.Quantity>0 |
|
|
ORDER BY Quantity) |
|
|
|
|
|
|
|
|
ORDER BY InDate DESC) |
|
|
PRINT(@locationCodeCurrent) |
|
|
PRINT(@locationCodeCurrent) |
|
|
IF @locationCodeCurrent is NULL |
|
|
IF @locationCodeCurrent is NULL |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
|
BEGIN set @locationCodeCurrent=(SELECT |
|
|