Browse Source

添加QAD添加发票接口ERP库位,修改结算寄售库接口

master
学 赵 1 year ago
parent
commit
4476db44d7
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  2. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

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

@ -131,6 +131,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
.Where(t => t.State == SettleBillState.)
.FirstOrDefault();
if (invoiceGrp == null)
{
return;
@ -175,7 +179,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
InvoiceNetAmount = invoiceGrpDetail.Amt,
InvoiceTaxAmount = Math.Round(invoiceGrpDetail.Amt * 0.13m, 2),
TaxRate = 0.13m,
Location = $"C{invoiceGrp.ClientCode}",
Location = invoiceGrp.GetProperty("ErpToLoc",string.Empty),
begintime = invoiceGrpDetail.BeginDate,
endtime = invoiceGrpDetail.EndDate,
domain = "BJBMPT",

12
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -8,6 +8,7 @@ using SettleAccount.Domain.BQ;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.Application.Services;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Emailing;
using Volo.Abp.Uow;
@ -224,7 +225,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
//SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件,
CustPartCode = itm.LU,
SettlementVinCode = itm.PN,
SettlementVinCode = inv.InvbillNum,
DeliverBillType = bussinessType,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
@ -287,6 +288,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();//扣减单内容
var pdinvList = _dbcontext.Set<INVOICE_GRP>().Where(p => billList.Contains(p.InvbillNum)).ToList();
var pddetail = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => billList.Contains(p.BillNum)).ToList();
var erploc= ls.FirstOrDefault().ErpToLoc;
if (pdList.Count > 0)
{
if (flag == true)
@ -297,6 +300,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in pdinvList)
{
item.SetProperty("ErpToLoc", erploc);
item.State = SettleBillState.;
}
_dbcontext.BulkUpdate(pdList);
@ -310,6 +314,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in pdinvList)
{
item.SetProperty("ErpToLoc", erploc);
if (item.State == SettleBillState.QAD)
{
item.State = SettleBillState.;
@ -337,6 +342,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in bbacinvList)
{
item.SetProperty("ErpToLoc", erploc);
item.State = SettleBillState.;
}
_dbcontext.BulkUpdate(bbacList);
@ -350,6 +356,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in bbacinvList)
{
item.SetProperty("ErpToLoc", erploc);
if (item.State == SettleBillState.QAD)
{
item.State = SettleBillState.;
@ -377,6 +385,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in hbpoinvList)
{
item.SetProperty("ErpToLoc", erploc);
item.State = SettleBillState.;
}
_dbcontext.BulkUpdate(hbpoList);
@ -390,6 +399,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in hbpoinvList)
{
item.SetProperty("ErpToLoc", erploc);
if (item.State == SettleBillState.QAD)
{
item.State = SettleBillState.;

Loading…
Cancel
Save