|
|
@ -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<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>(); |
|
|
|
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; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
@ -784,9 +779,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
); |
|
|
|
invlist.Add(invbill); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return detailList; |
|
|
|
} |
|
|
|
|
|
|
|