You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
163 lines
4.5 KiB
C#
163 lines
4.5 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.Fee.Method;
|
|
using DS.WMS.Core.Op.Entity;
|
|
|
|
namespace DS.WMS.Core.Settlement.Dtos
|
|
{
|
|
/// <summary>
|
|
/// 费用表单
|
|
/// </summary>
|
|
public class FeeForm
|
|
{
|
|
readonly List<FeeItem> _items;
|
|
|
|
/// <summary>
|
|
/// 费用记录项
|
|
/// </summary>
|
|
public List<FeeItem> Items => _items;
|
|
|
|
/// <summary>
|
|
/// 使用指定的数据源初始化统计。
|
|
/// </summary>
|
|
/// <param name="source">数据源</param>
|
|
public FeeForm(List<FeeItem> 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);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 人民币未收
|
|
/// </summary>
|
|
public decimal UnchargedRMB { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 人民币未付
|
|
/// </summary>
|
|
public decimal UnpaidRMB { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 美元未收
|
|
/// </summary>
|
|
public decimal UnchargedUSD { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 美元未付
|
|
/// </summary>
|
|
public decimal UnpaidUSD { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 其他未收
|
|
/// </summary>
|
|
public decimal UnchargedOther { get; private set; }
|
|
|
|
/// <summary>
|
|
/// 其他未付
|
|
/// </summary>
|
|
public decimal UnpaidOther { get; private set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 费用项
|
|
/// </summary>
|
|
public class FeeItem
|
|
{
|
|
/// <summary>
|
|
/// 费用记录ID
|
|
/// </summary>
|
|
public long RecordId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 业务ID
|
|
/// </summary>
|
|
public long BusinessId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 业务类型
|
|
/// </summary>
|
|
public BusinessType BusinessType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 客户ID
|
|
/// </summary>
|
|
public long CustomerId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 客户名称
|
|
/// </summary>
|
|
public string? CustomerName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 费用ID
|
|
/// </summary>
|
|
public long FeeId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 费用名称
|
|
/// </summary>
|
|
public string? FeeName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 费用类型
|
|
/// </summary>
|
|
public FeeType FeeType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 总金额
|
|
/// </summary>
|
|
public decimal TotalAmount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 币别
|
|
/// </summary>
|
|
public string Currency { get; set; }
|
|
|
|
/// <summary>
|
|
/// 未结金额
|
|
/// </summary>
|
|
public decimal RestAmount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 本次结算金额
|
|
/// </summary>
|
|
public decimal Amount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 本次结算原始金额
|
|
/// </summary>
|
|
public decimal OriginalAmount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 原始汇率
|
|
/// </summary>
|
|
public decimal? OriginalRate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 开票金额
|
|
/// </summary>
|
|
public decimal? InvoiceAmount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 财务税率
|
|
/// </summary>
|
|
public decimal AccTaxRate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 录入方式
|
|
/// </summary>
|
|
public string? InputMethod { get; set; }
|
|
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string? Remark { get; set; }
|
|
}
|
|
}
|