diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs index 17a7488..7f250de 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs @@ -1016,8 +1016,8 @@ LEFT JOIN ICSConfiguration conWhCode ON conWhCode.Code='ERPWHCode' AND a.WorkPoi JObject det = (JObject)detail; string ERPupdate = @"update ICSODeliveryNotice set ODNCode='{0}',Sequence='{1}',ODNID='{2}',ODNDetailID='{3}' - where OODetailID='{4}' AND ODNType='1' AND ODNCode='{5}' and Sequence='{1}'"; - ERPupdate = string.Format(ERPupdate, jo["ODNCode"], det["Sequence"], jo["ID"], det["DetailID"], det["OODetailID"], ODNCode); + where OODetailID='{4}' AND ODNType='1' AND ODNCode='{5}' and Sequence='{6}'"; + ERPupdate = string.Format(ERPupdate, jo["ODNCode"], det["Sequence"], jo["ID"], det["DetailID"], det["OODetailID"], ODNCode, det["Sequence"].ToString().Substring(0, det["Sequence"].ToString().Length - 1)); if (!DBHelper.ExecuteNonQuery(ERPupdate, cmd)) { diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs index 648b6c6..98cd9eb 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs @@ -80,8 +80,8 @@ namespace ICSSoft.DataProject JObject det = (JObject)detail; string ERPupdate = @"update ICSDeliveryNotice set DNCode='{0}',Sequence='{1}',DNID='{2}',DNDetailID='{3}' - where PODetailID='{4}' AND DNType='1' AND DNCode='{5}' and Sequence='{1}'"; - ERPupdate = string.Format(ERPupdate, jo["DNCode"], det["Sequence"], jo["ID"], det["DetailID"], det["PODetailID"],DNCode); + where PODetailID='{4}' AND DNType='1' AND DNCode='{5}' and Sequence='{6}'"; + ERPupdate = string.Format(ERPupdate, jo["DNCode"], det["Sequence"], jo["ID"], det["DetailID"], det["PODetailID"],DNCode, det["Sequence"].ToString().Substring(0, det["Sequence"].ToString().Length - 1)); if (!DBHelper.ExecuteNonQuery(ERPupdate, cmd)) {