|
|
@ -38,7 +38,8 @@ namespace ICSSoft.DataProject |
|
|
|
{ |
|
|
|
///添加库存(原条码退回,更新库存;新条码直接入库)
|
|
|
|
string sql = string.Empty; |
|
|
|
if (BusinessCode != TransTypeEnum.SalesReturnBack.GetDescription<DBValue>()) |
|
|
|
if (BusinessCode != TransTypeEnum.SalesReturnBack.GetDescription<DBValue>() |
|
|
|
&& string.IsNullOrWhiteSpace(LogID)) |
|
|
|
{ |
|
|
|
sql = @"IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}')
|
|
|
|
BEGIN |
|
|
@ -644,7 +645,7 @@ namespace ICSSoft.DataProject |
|
|
|
RETURN |
|
|
|
END |
|
|
|
INSERT INTO ICSInventoryLot(ID,LotNo,InvCode,ProductDate,ExpirationDate,Quantity,ExtensionID,Type,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) |
|
|
|
SELECT NEWID(),'{4}' ,a.InvCode,a.ProductDate,a.ExpirationDate ,'{3}',a.ExtensionID,'10',f.F_Account ,f.F_RealName ,SYSDATETIME() ,a.WorkPoint ,a.LotNo |
|
|
|
SELECT NEWID(),'{4}' ,a.InvCode,a.ProductDate,a.ExpirationDate ,'{3}',a.ExtensionID,'101',f.F_Account ,f.F_RealName ,SYSDATETIME() ,a.WorkPoint ,a.LotNo |
|
|
|
FROM ICSInventoryLot a |
|
|
|
INNER JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location |
|
|
|
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'";
|
|
|
|