|
|
@ -1818,36 +1818,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
{ |
|
|
|
notDetialList.AddRange(innotls); |
|
|
|
} |
|
|
|
if (p_notlist != null && p_notlist.Count > 0) |
|
|
|
{ |
|
|
|
var innotls1 = new List<INVOICE_NOT_SETTLE>(); |
|
|
|
var groupnum = itm.Value; |
|
|
|
if (count == i)//最后一张发票追加
|
|
|
|
{ |
|
|
|
groupnum.AddRange(nolist);//追加完全不可结
|
|
|
|
} |
|
|
|
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }) |
|
|
|
.Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = itm.Key }); |
|
|
|
foreach (var nitm in notls) |
|
|
|
{ |
|
|
|
innotls1.Add(new INVOICE_NOT_SETTLE( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
version: p_version, |
|
|
|
invGroupNum: p_InvGroupNum, |
|
|
|
settleGroupNum: nitm.GroupNum, |
|
|
|
lU: nitm.LU, |
|
|
|
lU1: nitm.LU, |
|
|
|
extend1: "不可结算", |
|
|
|
extend2: string.Empty, |
|
|
|
qty: nitm.Qty, |
|
|
|
p_invbillnum: itm.Key |
|
|
|
)); |
|
|
|
} |
|
|
|
if (innotls.Count > 0) |
|
|
|
{ |
|
|
|
notDetialList.AddRange(innotls1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var invbill = new INVOICE_GRP |
|
|
|
(guid: GuidGenerator.Create(), |
|
|
|
realnvBillNum: string.Empty, |
|
|
@ -1888,6 +1859,37 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
invlist.Add(invbill); |
|
|
|
i++; |
|
|
|
} |
|
|
|
|
|
|
|
if (p_notlist != null && p_notlist.Count > 0) |
|
|
|
{ |
|
|
|
var innotls1 = new List<INVOICE_NOT_SETTLE>(); |
|
|
|
|
|
|
|
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }) |
|
|
|
.Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = invlist.FirstOrDefault().InvbillNum }); |
|
|
|
foreach (var nitm in notls) |
|
|
|
{ |
|
|
|
innotls1.Add(new INVOICE_NOT_SETTLE( |
|
|
|
guid: GuidGenerator.Create(), |
|
|
|
version: p_version, |
|
|
|
invGroupNum: p_InvGroupNum, |
|
|
|
settleGroupNum: nitm.GroupNum, |
|
|
|
lU: nitm.LU, |
|
|
|
lU1: nitm.LU, |
|
|
|
extend1: "不可结算", |
|
|
|
extend2: string.Empty, |
|
|
|
qty: nitm.Qty, |
|
|
|
p_invbillnum: invlist.FirstOrDefault().InvbillNum |
|
|
|
)); |
|
|
|
} |
|
|
|
if (innotls1.Count > 0) |
|
|
|
{ |
|
|
|
notDetialList.AddRange(innotls1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//using (var transaction = _repository.DbContext.Database.BeginTransaction())
|
|
|
|
//{
|
|
|
|
// try
|
|
|
@ -2156,7 +2158,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers |
|
|
|
p_invbillnum: itm.Key |
|
|
|
)); |
|
|
|
} |
|
|
|
if (innotls.Count > 0) |
|
|
|
if (innotls1.Count > 0) |
|
|
|
{ |
|
|
|
notDetialList.AddRange(innotls1); |
|
|
|
} |
|
|
|