diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs index d9a9eeb9..821f7a9e 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs @@ -561,7 +561,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ } var entitys = bbaclist;//合并库存调整单和就发票可结算明细数据 var gNumList = entitys.Select(p => p.GroupNum).Distinct().ToList(); - var priceList = _priceRepository.ToList();//价格单 //var errorList = await CheckInvoiceGenerationRules(entitys, priceList, inv.BusinessType); //if (errorList.Count() > 0) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs index 7bab5814..2fe7c81a 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs @@ -312,7 +312,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers var ls = itm.Value;//结算分组号列表 //反向查找结算数据 var invdetails = p_list.Where(p => ls.Contains(p.GroupNum)).ToList(); - var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode,p.LU, p.Price, p.BeginDate, p.EndDate, p.ContractDocID }) .Select(itm => new { @@ -329,8 +328,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers .ToList(); decimal amt = detailDtos.Sum(k => k.Amt);//金额 decimal txtAmt = detailDtos.Sum(k => k.Amt) + Math.Round(detailList.Sum(k => k.Amt) * 0.13m, 2);//税后金额 - decimal realAmt = Math.Round(detailDtos.Sum(k => k.Amt) * 0.13m, 2);//税额 - + decimal realAmt = Math.Round(detailDtos.Sum(k => k.Amt) * 0.13m, 2);//税额 List _entityDetailList = new List(); foreach (var detail in detailDtos) { @@ -356,7 +354,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers { detailList.AddRange(_entityDetailList); } - var invbill = new INVOICE_GRP (guid: GuidGenerator.Create(), realnvBillNum: string.Empty, @@ -368,18 +365,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers invGroupNum: p_InvGroupNum, state: SettleBillState.已开票, invoiceBillState: InvoiceBillState.正常, - tax: 0, - parent: string.Empty, - preTaxDiff: 0, + tax: 0, + parent: string.Empty, + preTaxDiff: 0, taxDiff: 0, clientCode: string.Empty, realAmt: realAmt ); invlist.Add(invbill); } - } - return detailList; } /// @@ -784,9 +779,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers ); invlist.Add(invbill); } - } - return detailList; }