Files
ERP_Distribution/Distribution/Models/StoreCreditMovement.cs
Kalana B. Thilakarathna 5707bd4c31
CI/CD - ERP Distribution / Build & Deploy Backend (pull_request) Failing after 12m30s
CI/CD - ERP Distribution / Build & Deploy Frontend (pull_request) Failing after 16m1s
Implement store credit tracking and enforcement
Introduced StoreCreditMovement entity and migration to track store credit usage and settlements. Updated payment flow to enforce credit limits and record credit movements. Modified outstanding balance calculation to use credit movements. Enhanced frontend to display real-time credit info and prevent over-credit payments. Updated API types, seed data, and DI registrations accordingly.
2026-10-20 11:45:11 +05:30

28 lines
802 B
C#

using System.ComponentModel.DataAnnotations.Schema;
namespace Distribution.Models
{
public class StoreCreditMovement : Template
{
public Guid FK_StoreId { get; set; }
[ForeignKey("FK_StoreId")]
public Store? Store { get; set; }
public StoreCreditMovementDirection Direction { get; set; }
public decimal Amount { get; set; }
public Guid? FK_InvoiceId { get; set; }
[ForeignKey("FK_InvoiceId")]
public Invoice? Invoice { get; set; }
public Guid? FK_PaymentId { get; set; }
[ForeignKey("FK_PaymentId")]
public Payment? Payment { get; set; }
public DateTime OccurredAt { get; set; } = DateTime.Now;
public Guid? RecordedBy { get; set; }
public string? Notes { get; set; }
}
}