Browse Source

提交

master
zhaoxinyu 3 months ago
parent
commit
ee02df3ef2
  1. 32
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

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

@ -337,12 +337,42 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
// 获取所属站点信息
var site = ls.FirstOrDefault().Site;
foreach (var itm1 in ls)
{
// 若ErpLoc为空则根据客户代码构建ErpLoc
if (string.IsNullOrEmpty(itm1.ErpLoc))
{
itm1.ErpLoc = $"C{invoice.ClientCode}";
switch (invoice.BusinessType)
{
case EnumBusinessType.YinDuJian:
itm1.ErpLoc = $"CC001";
break;
case EnumBusinessType.BeiJian:
itm1.ErpLoc = $"CC005";
break;
case EnumBusinessType.ZhiGongJianBBAC:
if (site == "1046")
{
itm1.ErpLoc = "CC171";
}
if (site == "1040")
{
itm1.ErpLoc = "CC001";
}
break;
case EnumBusinessType.ZhiGongJianHBPO:
itm1.ErpLoc = $"CC004";
break;
default:
itm1.ErpLoc = $"C{invoice.ClientCode}";
break;
}
}
}
// 按照ErpLoc、PartCode、BusinessType和Price对结算明细进行分组,并计算相关数据

Loading…
Cancel
Save