|
|
@ -36,46 +36,7 @@ namespace DS.WMS.Core.Settlement.Method
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var model = await TenantDb.Queryable<ApplicationSettlement>().Select(x => new PaymentSettlementDto
|
|
|
|
var model = await TenantDb.Queryable<ApplicationSettlement>().Select(x => new PaymentSettlementDto
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Id = x.Id,
|
|
|
|
}, true).FirstAsync(x => x.Id == id);
|
|
|
|
ApplicationNO = x.ApplicationNO, //申请编号
|
|
|
|
|
|
|
|
SettlementNO = x.SettlementNO, //结算单号
|
|
|
|
|
|
|
|
CustomerId = x.CustomerId, //结算单位
|
|
|
|
|
|
|
|
CustomerName = x.CustomerName,
|
|
|
|
|
|
|
|
Mode = x.Mode, //结算类型
|
|
|
|
|
|
|
|
SettlementDate = x.SettlementDate, //结算日期
|
|
|
|
|
|
|
|
SettlementTypeId = x.SettlementTypeId, //结算方式
|
|
|
|
|
|
|
|
CustomerBankId = x.CustomerBankId, //客户银行
|
|
|
|
|
|
|
|
Account = x.Account, //客户账户
|
|
|
|
|
|
|
|
Currency = x.Currency, //币别
|
|
|
|
|
|
|
|
Amount = x.Amount, //金额
|
|
|
|
|
|
|
|
ExchangeRate = x.ExchangeRate, //汇率
|
|
|
|
|
|
|
|
IsLocked = x.IsLocked, //锁定状态
|
|
|
|
|
|
|
|
SaleDeptId = x.SaleDeptId, //所属分部
|
|
|
|
|
|
|
|
BillType = x.BillType, //单据类型
|
|
|
|
|
|
|
|
Category = x.Category, //业务类别
|
|
|
|
|
|
|
|
LedgerVoucherNO = x.LedgerVoucherNO, //总账凭证号
|
|
|
|
|
|
|
|
RelativeNO = x.RelativeNO, //相关号码
|
|
|
|
|
|
|
|
InvoiceAmount = x.InvoiceAmount,
|
|
|
|
|
|
|
|
InvoiceDate = x.InvoiceDate,
|
|
|
|
|
|
|
|
InvoiceNO = x.InvoiceNO,
|
|
|
|
|
|
|
|
Note = x.Note, //备注
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AccountAmount = x.AccountAmount, //记账资料
|
|
|
|
|
|
|
|
AccountCurrency = x.AccountCurrency,
|
|
|
|
|
|
|
|
AccountRate = x.AccountRate,
|
|
|
|
|
|
|
|
PrePayAmount = x.PrePayAmount, //预付支资料
|
|
|
|
|
|
|
|
PrePayCurrency = x.PrePayCurrency,
|
|
|
|
|
|
|
|
PrePayRate = x.PrePayRate,
|
|
|
|
|
|
|
|
AHSRAmount = x.AHSRAmount, //实收支资料
|
|
|
|
|
|
|
|
AHSRCurrency = x.AHSRCurrency,
|
|
|
|
|
|
|
|
AHSRRate = x.AHSRRate,
|
|
|
|
|
|
|
|
FinancialAmount = x.FinancialAmount,//财务费用
|
|
|
|
|
|
|
|
FinancialCurrency = x.FinancialCurrency,
|
|
|
|
|
|
|
|
FinancialRate = x.FinancialRate,
|
|
|
|
|
|
|
|
AdvanceAmount = x.AdvanceAmount, //预收支资料
|
|
|
|
|
|
|
|
AdvanceCurrency = x.AdvanceCurrency,
|
|
|
|
|
|
|
|
AdvanceRate = x.AdvanceRate,
|
|
|
|
|
|
|
|
}, true).FirstAsync(x => x.Id == id && x.Mode == SettlementMode.Payment);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (model != null)
|
|
|
|
if (model != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -216,9 +177,13 @@ namespace DS.WMS.Core.Settlement.Method
|
|
|
|
d.Currency,
|
|
|
|
d.Currency,
|
|
|
|
d.OriginalCurrency,
|
|
|
|
d.OriginalCurrency,
|
|
|
|
d.OriginalAmount,
|
|
|
|
d.OriginalAmount,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
i.CustomerName,
|
|
|
|
|
|
|
|
i.InvoiceAmount,
|
|
|
|
|
|
|
|
i.InvoiceHeader,
|
|
|
|
|
|
|
|
i.InvoiceDate,
|
|
|
|
i.InvoiceNO,
|
|
|
|
i.InvoiceNO,
|
|
|
|
i.BillNO,
|
|
|
|
i.BillNO,
|
|
|
|
i.SN,
|
|
|
|
|
|
|
|
i.CreateTime,
|
|
|
|
i.CreateTime,
|
|
|
|
i.CreateBy,
|
|
|
|
i.CreateBy,
|
|
|
|
i.Note
|
|
|
|
i.Note
|
|
|
@ -242,10 +207,10 @@ namespace DS.WMS.Core.Settlement.Method
|
|
|
|
var dto = new SettlementDetailDto
|
|
|
|
var dto = new SettlementDetailDto
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ApplicationId = g.Key,
|
|
|
|
ApplicationId = g.Key,
|
|
|
|
//Ids = g.Select(x => x.Id),
|
|
|
|
|
|
|
|
RMBApplyAmount = g.Where(x => x.OriginalCurrency == FeeCurrency.RMB_CODE).Sum(x => x.ApplyAmount),
|
|
|
|
RMBApplyAmount = g.Where(x => x.OriginalCurrency == FeeCurrency.RMB_CODE).Sum(x => x.ApplyAmount),
|
|
|
|
USDApplyAmount = g.Where(x => x.OriginalCurrency == FeeCurrency.USD_CODE).Sum(x => x.ApplyAmount),
|
|
|
|
USDApplyAmount = g.Where(x => x.OriginalCurrency == FeeCurrency.USD_CODE).Sum(x => x.ApplyAmount),
|
|
|
|
ApplicationNO = firstItem.BillNO,
|
|
|
|
|
|
|
|
|
|
|
|
BillNO = firstItem.BillNO,
|
|
|
|
InvoiceNO = firstItem.InvoiceNO,
|
|
|
|
InvoiceNO = firstItem.InvoiceNO,
|
|
|
|
CreateTime = firstItem?.CreateTime,
|
|
|
|
CreateTime = firstItem?.CreateTime,
|
|
|
|
CreateBy = firstItem?.CreateBy,
|
|
|
|
CreateBy = firstItem?.CreateBy,
|
|
|
|