|
@ -1704,7 +1704,7 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo |
|
|
RAISERROR('条码{lotNo}和单据{transCode}行{tableModel.Rows[i]["SAPSequence"]}仓库不一致',16,1); |
|
|
RAISERROR('条码{lotNo}和单据{transCode}行{tableModel.Rows[i]["SAPSequence"]}仓库不一致',16,1); |
|
|
RETURN |
|
|
RETURN |
|
|
END; |
|
|
END; |
|
|
IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{lotNo}' AND a.WorkPoint='{WorkPoint}' AND a.WarehouseCode='{whCode}' AND a.Quantity>A.LockQuantity+'{tableModel.Rows[i]["Quantity"]}') |
|
|
|
|
|
|
|
|
IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{lotNo}' AND a.WorkPoint='{WorkPoint}' AND a.WarehouseCode='{whCode}' AND a.Quantity>=A.LockQuantity+'{tableModel.Rows[i]["Quantity"]}') |
|
|
BEGIN |
|
|
BEGIN |
|
|
RAISERROR('条码{lotNo}的库存可分配数量小于单据数量',16,1); |
|
|
RAISERROR('条码{lotNo}的库存可分配数量小于单据数量',16,1); |
|
|
RETURN |
|
|
RETURN |
|
@ -2065,7 +2065,7 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo |
|
|
} |
|
|
} |
|
|
foreach (DataRow PickLog in table.Rows) |
|
|
foreach (DataRow PickLog in table.Rows) |
|
|
{ |
|
|
{ |
|
|
pikTbLogsql += @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{9}' AND a.WorkPoint='{8}' AND a.Quantity>A.LockQuantity+'{3}')
|
|
|
|
|
|
|
|
|
pikTbLogsql += @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{9}' AND a.WorkPoint='{8}' AND a.Quantity>=A.LockQuantity+'{3}')
|
|
|
BEGIN |
|
|
BEGIN |
|
|
|
|
|
|
|
|
RAISERROR('条码{9}的库存可分配数量小于单据数量', 16, 1); |
|
|
RAISERROR('条码{9}的库存可分配数量小于单据数量', 16, 1); |
|
|