diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index 37e9c03..3536cae 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -1704,7 +1704,7 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo RAISERROR('条码{lotNo}和单据{transCode}行{tableModel.Rows[i]["SAPSequence"]}仓库不一致',16,1); RETURN 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 RAISERROR('条码{lotNo}的库存可分配数量小于单据数量',16,1); RETURN @@ -2065,7 +2065,7 @@ left join (select distinct TransCode,TransType,WorkPoint from dbo.ICSWareHouseLo } 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 RAISERROR('条码{9}的库存可分配数量小于单据数量', 16, 1);