|
@ -602,7 +602,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
List<string> _invls = new List<string>(); |
|
|
List<string> _invls = new List<string>(); |
|
|
var groupDtos = dtos.GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID, p.LU })//明细
|
|
|
var groupDtos = dtos.GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID, p.LU })//明细 合同号BBAC专有其他业务全默认成1
|
|
|
.Select(itm => new GroupPartCode |
|
|
.Select(itm => new GroupPartCode |
|
|
{ |
|
|
{ |
|
|
PartCode = itm.Key.PartCode, |
|
|
PartCode = itm.Key.PartCode, |
|
@ -611,7 +611,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
ContactDocID = itm.Key.ContractDocID, |
|
|
ContactDocID = itm.Key.ContractDocID, |
|
|
Price = itm.Key.Price, |
|
|
Price = itm.Key.Price, |
|
|
Amt = Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),//税前
|
|
|
Amt = Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),//税前
|
|
|
Tax = Math.Round(Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2) * 0.13m, 2),//税
|
|
|
Tax = Math.Round(Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2) * 0.13m, 2),//税额
|
|
|
TaxAmt = Math.Round(Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2) * 0.13m, 2) + Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),//税后进
|
|
|
TaxAmt = Math.Round(Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2) * 0.13m, 2) + Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),//税后进
|
|
|
Qty = itm.Sum(k => k.Qty), |
|
|
Qty = itm.Sum(k => k.Qty), |
|
|
BeginDate = itm.Key.BeginDate, |
|
|
BeginDate = itm.Key.BeginDate, |
|
@ -664,8 +664,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
var invlist = new List<INVOICE_GRP>(); |
|
|
var invlist = new List<INVOICE_GRP>(); |
|
|
var salist = new List<TDetail>(); |
|
|
var salist = new List<TDetail>(); |
|
|
var adjlist = new List<PUB_ADJ_DETAIL>(); |
|
|
var adjlist = new List<PUB_ADJ_DETAIL>(); |
|
|
foreach (var big in biglist)//单条大于1000W的开票
|
|
|
foreach (var big in biglist)//单条大于1000W的开票,拆成多张
|
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
var list = p_list.Where(p => p.InvGroupNum == big.InvGroupNum && p.PartCode == big.PartCode && p.Price == big.Price && p.LU == big.LU ); |
|
|
var list = p_list.Where(p => p.InvGroupNum == big.InvGroupNum && p.PartCode == big.PartCode && p.Price == big.Price && p.LU == big.LU ); |
|
|
var gener = new InvoiceGeneratorSame<TDetail>(); |
|
|
var gener = new InvoiceGeneratorSame<TDetail>(); |
|
|
|
|
|
|
|
@ -736,8 +737,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
if (parlist is List<BBAC_CAN_SA_DETAIL>) |
|
|
if (parlist is List<BBAC_CAN_SA_DETAIL>) |
|
|
{ |
|
|
{ |
|
|
var partlist1 = parlist as List<BBAC_CAN_SA_DETAIL>; |
|
|
var partlist1 = parlist as List<BBAC_CAN_SA_DETAIL>; |
|
|
var sq = partlist1.GroupBy(p => new { p.LU, p.GroupNum, p.InvbillNum }) |
|
|
var sq = partlist1.GroupBy(p => new { p.LU, p.GroupNum, p.InvbillNum,p.ContractDocID }) |
|
|
.Select(p => new { version = p_version, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = p.Key.InvbillNum, GroupNum = p.Key.GroupNum }); |
|
|
.Select(p => new { version = p_version, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = p.Key.InvbillNum, GroupNum = p.Key.GroupNum, ContractDocID = p.Key.ContractDocID }); |
|
|
foreach (var sitm in sq) |
|
|
foreach (var sitm in sq) |
|
|
{ |
|
|
{ |
|
|
innotls.Add(new INVOICE_NOT_SETTLE( |
|
|
innotls.Add(new INVOICE_NOT_SETTLE( |
|
@ -748,7 +749,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs |
|
|
lU: sitm.LU, |
|
|
lU: sitm.LU, |
|
|
lU1: sitm.LU, |
|
|
lU1: sitm.LU, |
|
|
extend1: "可结算", |
|
|
extend1: "可结算", |
|
|
extend2: string.Empty, |
|
|
extend2: sitm.ContractDocID, |
|
|
qty: sitm.Qty, |
|
|
qty: sitm.Qty, |
|
|
p_invbillnum: inv.InvBillNum |
|
|
p_invbillnum: inv.InvBillNum |
|
|
)); |
|
|
)); |
|
|