diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs index a34b0408..ab43d89d 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs @@ -324,28 +324,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers List details = new List(); foreach (var itm1 in ls) { - var _detailEntity = new PUB_CAN_SA_DETAIL( - guid: GuidGenerator.Create(), - keyCode: itm1.KeyCode, - version: itm1.Version, - billNum: string.Empty, - settleBillNum: itm1.SettleBillNum, - lU: itm1.LU, - pN: itm1.PN, - site: itm1.Site, - qty: itm1.Qty, - price: itm1.Price, - businessType: itm1.BusinessType, - settleDate: itm1.SettleDate, - groupNum: itm1.GroupNum, - invGroupNum: string.Empty, - invbillnum: string.Empty, - partcode: itm1.PartCode, - pobillnum: itm1.PoBillNum - - ); - _detailEntity.RealPartCode = itm1.RealPartCode; - details.Add(_detailEntity); + sum += (itm1.Qty * itm1.Price); if (sum > 10000000) { @@ -369,6 +348,28 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers details = new List(); sum = (itm1.Qty * itm1.Price); } + var _detailEntity = new PUB_CAN_SA_DETAIL( + guid: GuidGenerator.Create(), + keyCode: itm1.KeyCode, + version: itm1.Version, + billNum: string.Empty, + settleBillNum: itm1.SettleBillNum, + lU: itm1.LU, + pN: itm1.PN, + site: itm1.Site, + qty: itm1.Qty, + price: itm1.Price, + businessType: itm1.BusinessType, + settleDate: itm1.SettleDate, + groupNum: itm1.GroupNum, + invGroupNum: string.Empty, + invbillnum: string.Empty, + partcode: itm1.PartCode, + pobillnum: itm1.PoBillNum + + ); + _detailEntity.RealPartCode = itm1.RealPartCode; + details.Add(_detailEntity); } var billNum1 = OrderNumberGenerator.GenerateOrderNumber("N"); var bbac_sa1 = new PUB_CAN_SA();