Files
ERP_Distribution/Distribution/Models/Invoice.cs
T

32 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations.Schema;
namespace Distribution.Models
{
public class Invoice : Template
{
public Guid FK_ShopPOId { get; set; }
[ForeignKey("FK_ShopPOId")]
public ShopPO ShopPO { get; set; }
public InvoiceStatus Status { get; set; } = InvoiceStatus.Draft;
public PaymentStatus PaymentStatus { get; set; } = PaymentStatus.Pending;
public Guid CreatedBy { get; set; }
public DateTime? PrintedAt { get; set; }
public Guid? PrintedBy { get; set; }
public DateTime? FinalizedAt { get; set; }
public Guid? FinalizedBy { get; set; }
/// <summary>Scheme discount redeemed against the PO, subtracted from the billable lines to give TotalAmount.</summary>
public decimal DiscountAmount { get; set; }
/// <summary>Payable amount: billable lines minus DiscountAmount.</summary>
public decimal TotalAmount { get; set; }
public ICollection<InvoiceItem> Items { get; set; } = new List<InvoiceItem>();
public ICollection<Payment> Payments { get; set; } = new List<Payment>();
}
}