Refactor sales pipeline: ShopPO, Invoice, SysConfig models

Major refactor replacing Sale/Order with ShopPO → Invoice → LoadingSheet flow. Removed legacy Sale/Order models and features; introduced ShopPO, ShopPOItem, Invoice, LoadingSheetOrder, and SysConfig models. Updated related entities, enums, repositories, and controllers. Added new migrations for schema changes and system config. Overhauled business logic and DI registrations. Updated documentation with migration plan.
This commit is contained in:
Kalana B. Thilakarathna
2026-09-17 10:03:22 +05:30
parent 6c40421b2d
commit 93f2f1bd3b
83 changed files with 11274 additions and 2538 deletions
+26
View File
@@ -0,0 +1,26 @@
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; }
public decimal TotalAmount { get; set; }
public ICollection<Payment> Payments { get; set; } = new List<Payment>();
}
}