using DS.Module.Core; using DS.WMS.Core.Fee.Method; using DS.WMS.Core.Op.Entity; namespace DS.WMS.Core.Settlement.Dtos { /// /// 费用表单 /// public class FeeForm { readonly List _items; /// /// 费用记录项 /// public List Items => _items; /// /// 使用指定的数据源初始化统计。 /// /// 数据源 public FeeForm(List source) { _items = source; UnchargedRMB = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount); UnchargedUSD = Items.FindAll(x => x.Currency == FeeServiceBase.USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount); UnchargedOther = Items.FindAll(x => x.Currency != FeeServiceBase.RMB_CODE && x.Currency != FeeServiceBase.USD_CODE && x.FeeType == FeeType.Receivable).Sum(x => x.RestAmount); UnpaidRMB = Items.FindAll(x => x.Currency == FeeServiceBase.RMB_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount); UnpaidUSD = Items.FindAll(x => x.Currency == FeeServiceBase.USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount); UnpaidOther = Items.FindAll(x => x.Currency != FeeServiceBase.RMB_CODE && x.Currency != FeeServiceBase.USD_CODE && x.FeeType == FeeType.Payable).Sum(x => x.RestAmount); } /// /// 人民币未收 /// public decimal UnchargedRMB { get; private set; } /// /// 人民币未付 /// public decimal UnpaidRMB { get; private set; } /// /// 美元未收 /// public decimal UnchargedUSD { get; private set; } /// /// 美元未付 /// public decimal UnpaidUSD { get; private set; } /// /// 其他未收 /// public decimal UnchargedOther { get; private set; } /// /// 其他未付 /// public decimal UnpaidOther { get; private set; } } /// /// 费用项 /// public class FeeItem { /// /// 费用记录ID /// public long RecordId { get; set; } /// /// 业务ID /// public long BusinessId { get; set; } /// /// 业务类型 /// public BusinessType BusinessType { get; set; } /// /// 客户ID /// public long CustomerId { get; set; } /// /// 客户名称 /// public string? CustomerName { get; set; } /// /// 费用ID /// public long FeeId { get; set; } /// /// 费用名称 /// public string? FeeName { get; set; } /// /// 费用类型 /// public FeeType FeeType { get; set; } /// /// 总金额 /// public decimal TotalAmount { get; set; } /// /// 币别 /// public string Currency { get; set; } /// /// 未结金额 /// public decimal RestAmount { get; set; } /// /// 本次结算金额 /// public decimal Amount { get; set; } /// /// 本次结算原始金额 /// public decimal OriginalAmount { get; set; } /// /// 原始汇率 /// public decimal? OriginalRate { get; set; } /// /// 开票金额 /// public decimal? InvoiceAmount { get; set; } /// /// 财务税率 /// public decimal AccTaxRate { get; set; } /// /// 录入方式 /// public string? InputMethod { get; set; } /// /// 备注 /// public string? Remark { get; set; } } }