|
|
@ -2561,6 +2561,7 @@ namespace ICSSoft.DataProject |
|
|
|
{ |
|
|
|
string TransType = string.Empty; |
|
|
|
string Identification = Guid.NewGuid().ToString(); |
|
|
|
DateTime createDate = DateTime.Now; |
|
|
|
foreach (var item in JsonData) |
|
|
|
{ |
|
|
|
TransType = item.TransType; |
|
|
@ -2594,7 +2595,7 @@ namespace ICSSoft.DataProject |
|
|
|
BusinessCode = TransTypeEnum.SalesReturnBack.GetDescription<DBValue>(); |
|
|
|
//入库
|
|
|
|
ICSWareHouseLotInfoService.WareHouseLotInfoUp(Identification, itemInfo.LocationCode, itemInfo.LotNo, itemInfo.Quantity, |
|
|
|
item.User, item.WorkPoint, WHTransType, BusinessCode, cmd, language, itemInfo.LogID, itemInfo.InvCode + itemInfo.WarehouseCode); |
|
|
|
item.User, item.WorkPoint, WHTransType, BusinessCode, cmd, language, itemInfo.LogID, itemInfo.InvCode + itemInfo.WarehouseCode,createDate.ToString()); |
|
|
|
|
|
|
|
////更新日志表源头单据信息
|
|
|
|
//string sql = @"UPDATE ICSWareHouseLotInfoLog SET TransCode='{3}',TransSequence='{4}'
|
|
|
@ -2682,6 +2683,13 @@ namespace ICSSoft.DataProject |
|
|
|
//更新源头单据数量
|
|
|
|
ICSManufactureService.MOIssueDocNegative(TransType, itemInfo.LogID, itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); |
|
|
|
BusinessCode = TransTypeEnum.MOIssueDocNegative.GetDescription<DBValue>(); |
|
|
|
var getDate = $@"SELECT top 1 MTIME FROM ICSWareHouseLotInfo WHERE InvCode='{itemInfo.InvCode}' AND Quantity>0 ORDER BY MTIME "; |
|
|
|
var date=DBHelper.ExecuteScalar(getDate, cmd); |
|
|
|
if (date!=null||date.ToString()!="") |
|
|
|
{ |
|
|
|
createDate = Convert.ToDateTime(date).AddDays(-1); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
#endregion
|
|
|
|
#region 生产入库
|
|
|
@ -2738,7 +2746,7 @@ namespace ICSSoft.DataProject |
|
|
|
} |
|
|
|
//入库
|
|
|
|
ICSWareHouseLotInfoService.WareHouseLotInfoUp(Identification, itemInfo.LocationCode, itemInfo.LotNo, itemInfo.Quantity, |
|
|
|
item.User, item.WorkPoint, WHTransType, BusinessCode, cmd, language, itemInfo.LogID, itemInfo.InvCode + itemInfo.WarehouseCode); |
|
|
|
item.User, item.WorkPoint, WHTransType, BusinessCode, cmd, language, itemInfo.LogID, itemInfo.InvCode + itemInfo.WarehouseCode,createDate.ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
//上传ERP
|
|
|
@ -2886,7 +2894,7 @@ namespace ICSSoft.DataProject |
|
|
|
} |
|
|
|
//入库
|
|
|
|
ICSWareHouseLotInfoService.WareHouseLotInfoUp(Identification, itemInfo.LocationCode, itemInfo.LotNo, itemInfo.Quantity, |
|
|
|
itemInfo.User, JsonData.DATA.Head[0].WorkPoint, WHTransType, BusinessCode, cmd, language, itemInfo.LogID, itemInfo.InvCode + itemInfo.WarehouseCode); |
|
|
|
itemInfo.User, JsonData.DATA.Head[0].WorkPoint, WHTransType, BusinessCode, cmd, language, itemInfo.LogID, itemInfo.InvCode + itemInfo.WarehouseCode,DateTime.Now.ToString()); |
|
|
|
} |
|
|
|
//上传ERP
|
|
|
|
if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UploadERP"])) |
|
|
|