|
|
@ -212,7 +212,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
// var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
|
if (adjlist != null && adjlist.Count > 0) |
|
|
|
{ |
|
|
|
var relationList = _relationRepository.Where(p => p.BusinessType == inv.BusinessType); |
|
|
|
var relationList = _relationRepository.Where(p => p.BusinessType == inv.BusinessType).ToList(); |
|
|
|
var relist = relationList.GroupBy(p => new { p.SettleMaterialCode, p.ErpMaterialCode }).Select(p => p.FirstOrDefault()); |
|
|
|
var errors = await CheckAdJRules(adjlist, relist.ToList(), inv.BusinessType); |
|
|
|
if (errors.Count > 0) |
|
|
@ -235,7 +235,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
businessType: itm.BusinessType, |
|
|
|
settleDate: itm.SettleDate, |
|
|
|
groupNum: itm.GroupNum, |
|
|
|
invGroupNum: itm.InvGroupNum, |
|
|
|
invGroupNum: inv.InvGroupNum, |
|
|
|
invbillnum: string.Empty, |
|
|
|
partcode: relist.FirstOrDefault(p => p.SettleMaterialCode == itm.LU).ErpMaterialCode |
|
|
|
)); |
|
|
@ -344,7 +344,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
var bbaclist = await _hbpoMng.GetContainsAsync(inv.InvbillNum).ConfigureAwait(false);//结算分组对应结算零件 //var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
|
if (adjlist != null && adjlist.Count > 0) |
|
|
|
{ |
|
|
|
var relationList = _relationRepository.Where(p => p.BusinessType == inv.BusinessType); |
|
|
|
var relationList = _relationRepository.Where(p => p.BusinessType == inv.BusinessType).ToList(); |
|
|
|
var relist = relationList.GroupBy(p => new { p.SettleMaterialCode, p.ErpMaterialCode }).Select(p => p.FirstOrDefault()); |
|
|
|
foreach (var itm in adjlist) |
|
|
|
{ |
|
|
@ -491,7 +491,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
|
//var adjlist = await _adjRepository.Where(p => p.OldInvBillNum == inv.InvbillNum).ToListAsync();//调整表明细
|
|
|
|
if (adjlist != null && adjlist.Count > 0) |
|
|
|
{ |
|
|
|
var relationList = _relationRepository.Where(p => p.BusinessType == inv.BusinessType); |
|
|
|
var relationList = _relationRepository.Where(p => p.BusinessType == inv.BusinessType).ToList(); |
|
|
|
|
|
|
|
var relist = relationList.GroupBy(p => new { p.SettleMaterialCode, p.ErpMaterialCode }).Select(p => p.FirstOrDefault()); |
|
|
|
|
|
|
|