using System.Runtime.Serialization; using DS.Module.Core.Enums; using DS.WMS.Core.Application.Dtos; using DS.WMS.Core.Application.Entity; using Masuit.Tools.Systems; namespace DS.WMS.Core.Invoice.Dto { /// /// 发票 /// public class InvoiceDto { /// /// ID /// public long Id { get; set; } /// /// 发票号 /// public string InvoiceNO { get; set; } /// /// 发票业务编号 /// public string BillNO { get; set; } /// /// 开票时间 /// public DateTime InvoiceDate { get; set; } /// /// 开票单位ID /// public long CustomerId { get; set; } /// /// 开票单位名称 /// public string? CustomerName { get; set; } /// /// 发票抬头 /// public string? InvoiceHeader { get; set; } /// /// 收款单位账号 /// public string? Account { get; set; } /// /// 收款单位银行 /// public string? BankName { get; set; } /// /// 申请金额(费用明细的合计) /// public decimal ApplyAmount { get; set; } /// /// 币别 /// public string Currency { get; set; } /// /// 实收币别 /// public string? ReceiptCurrency { get; set; } /// /// 锁定状态 /// public bool IsLocked { get; set; } /// /// 锁定人ID /// [IgnoreDataMember] public long? LockUserId { get; set; } /// /// 锁定人 /// public string? LockUserName { get; set; } /// /// 锁定时间 /// public DateTime? LockTime { get; set; } /// /// 开票人ID /// public long? OperatorId { get; set; } /// /// 开票人 /// public string? OperatorName { get; set; } /// /// 开票方式 /// public InvoiceMode Type { get; set; } /// /// 开票方式文本 /// public string TypeText => Type.GetDescription(); /// /// 是否已打印 /// public bool IsPrinted { get; set; } /// /// 是否已结算 /// public bool IsSettled { get; set; } /// /// 开票税率 /// public decimal TaxRate { get; set; } /// /// 税额 /// public decimal Tax => ApplyAmount - ApplyAmount * TaxRate; /// /// 不含税金额 /// public decimal NoTaxAmount => ApplyAmount - Tax; /// /// 所属机构(公司) /// [IgnoreDataMember] public long? OrgId { get; set; } /// /// 所属部门 /// public string? OrgName { get; set; } /// /// 纳税人识别号 /// public string? TaxID { get; set; } /// /// 客户地址 /// public string? CustomerAddress { get; set; } /// /// 客户电话 /// public string? CustomerPhone { get; set; } /// /// 客户银行 /// public string? CustomerBankName { get; set; } /// /// 客户银行账号 /// public string? CustomerAccount { get; set; } /// /// 代开客户 /// public string? AutualCustomerName { get; set; } /// /// 发票类别 /// public InvoiceCategory Category { get; set; } /// /// 发票类别文本 /// public string CategoryText => Category.GetDescription(); /// /// 开票金额(开票明细的合计) /// public decimal InvoiceAmount { get; set; } /// /// 原币金额 /// public string OriginalAmount => Details == null ? string.Empty : string.Join(" ", Details.Select(x => x.Currency + x.OriginalAmount)); /// /// 开票分公司ID(所属机构) /// [IgnoreDataMember] public long? SaleDeptId { get; set; } /// /// 所属分部 /// public string? SaleDeptName { get; set; } /// /// 电子发票PDF地址 /// public string? PDFUrl { get; set; } /// /// 是否已作废 /// public bool IsCancelled { get; set; } /// /// 作废人ID /// [IgnoreDataMember] public long? CancelUserId { get; set; } /// /// 作废人 /// public string? CancelUserName { get; set; } /// /// 作废时间 /// public DateTime? CancelTime { get; set; } /// /// 创建时间 /// public DateTime CreateTime { get; set; } /// /// 创建人ID /// [IgnoreDataMember] public long CreateBy { get; set; } /// /// 创建人 /// public string? CreateByName { get; set; } [IgnoreDataMember] public IEnumerable? InvoiceApplicationList { get; set; } /// /// 发票申请单号 /// public string InvoiceApplicationNO => InvoiceApplicationList == null ? string.Empty : string.Join(',', InvoiceApplicationList); /// /// 费用明细 /// public List? Details { get; set; } /// /// 发票明细 /// public List? InvoiceDetails { get; set; } /// /// 费用明细汇总 /// public List? Summary { get; set; } } }