Browse Source

修改导入发票号时SA和合同号丢失问题

master
学 赵 1 year ago
parent
commit
14b42e5d23
  1. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  2. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -957,10 +957,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
inv.TaxDiff = newinv.PreTaxDiff;
// inv.ClientCode = newinv.ClientCode;
}
foreach (var detail in invdetail)
{
detail.Extend1 = Math.Round(detail.Amt * first.Tax, 2).ToString();
}
//foreach (var detail in invdetail)//明细EXTEND1字段BBAC不能占用
//{
// detail.Extend1 = Math.Round(detail.Amt * first.Tax, 2).ToString();
//}
await _repository.DbContext.BulkUpdateAsync(invlist).ConfigureAwait(false);
await _repository.DbContext.BulkUpdateAsync(invdetail).ConfigureAwait(false);
return ApplicationConsts.SuccessStr;

10
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

@ -107,15 +107,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//if (adjlist != null && adjlist.Count > 0)
//{
// 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)
// {
// return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = await ExportErrorReportAsync(errors).ConfigureAwait(false) });
// }
// foreach (var itm in adjlist)
// {
// publist.Add(new PUB_CAN_SA_DETAIL(
@ -159,16 +156,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo });
}
break;
default:
priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单
break;
}
//if (inv.BusinessType == EnumBusinessType.BeiJian)
//{
// var priceListbj = _pricebjRepository.ToList();//价格单
@ -185,7 +177,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
// priceList.Add(new PriceList() { LU = itm.LU, BeginTime = itm.BeginDate, EndTime = itm.EndDate, Price = itm.Price, ClientCode = "1041", ContractNo = itm.ContractNo });
// }
//}
//else
//{
// priceList = _priceRepository.Where(p => p.IsCancel == false && p.ClientCode == inv.Site).ToList();//价格单
@ -219,7 +210,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
EndDate = p.EndTime,
PartCode = d.PartCode,//客户零件号
LineCode = d.IndexNum
};
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)

Loading…
Cancel
Save