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.

263 lines
6.5 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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