c775146b64
Implementation A partner, not just software HexDive Technologies' local team handles setup, data migration, training and ongoing support — in Sinhala, Tamil and English. [confirm] 1 Discovery Map your network, products and processes. 2 Configuration Set up depots, pricing, schemes, routes and users. 3 Migration & training Move your data and train every team. 4 Go-live & support Dedicated account manager and local support desk.
64 lines
2.4 KiB
C#
64 lines
2.4 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Distribution.Models
|
|
{
|
|
public class Expense : Template
|
|
{
|
|
/// <summary>Leaf category (Title). Parent is the user-facing Category group.</summary>
|
|
public Guid FK_CategoryId { get; set; }
|
|
[ForeignKey("FK_CategoryId")]
|
|
public ExpenseCategory? Category { get; set; }
|
|
|
|
/// <summary>Branch the expense is attributed to. Null = company-wide.</summary>
|
|
public Guid? FK_WarehouseId { get; set; }
|
|
[ForeignKey("FK_WarehouseId")]
|
|
public Warehouse? Warehouse { get; set; }
|
|
|
|
[Precision(18, 2)]
|
|
public decimal Amount { get; set; }
|
|
|
|
public DateTime BillDate { get; set; }
|
|
public DateTime? DueDate { get; set; }
|
|
/// <summary>First day of the month the expense covers (YYYY-MM-01).</summary>
|
|
public DateTime? PeriodCovered { get; set; }
|
|
|
|
public Guid? FK_VendorId { get; set; }
|
|
[ForeignKey("FK_VendorId")]
|
|
public ExpenseVendor? Vendor { get; set; }
|
|
|
|
public string? Payee { get; set; }
|
|
public string? BillRef { get; set; }
|
|
public string? Description { get; set; }
|
|
|
|
public ExpenseStatus Status { get; set; } = ExpenseStatus.Draft;
|
|
|
|
/// <summary>Payment settlement — null until Status transitions to Paid.</summary>
|
|
public PaymentMethod? Method { get; set; }
|
|
public Guid? FK_BankAccountId { get; set; }
|
|
[ForeignKey("FK_BankAccountId")]
|
|
public BankAccount? BankAccount { get; set; }
|
|
|
|
public Guid? FK_ChequePageId { get; set; }
|
|
[ForeignKey("FK_ChequePageId")]
|
|
public ChequePage? ChequePage { get; set; }
|
|
|
|
public DateTime? PaidAt { get; set; }
|
|
|
|
public Guid RecordedByUserId { get; set; }
|
|
public Guid? PostedByUserId { get; set; }
|
|
public DateTime? PostedAt { get; set; }
|
|
public Guid? PaidByUserId { get; set; }
|
|
public Guid? VoidedByUserId { get; set; }
|
|
public DateTime? VoidedAt { get; set; }
|
|
public string? VoidReason { get; set; }
|
|
|
|
/// <summary>Null for manually-entered expenses; set when generated by run-due.</summary>
|
|
public Guid? FK_RecurringTemplateId { get; set; }
|
|
[ForeignKey("FK_RecurringTemplateId")]
|
|
public RecurringExpenseTemplate? RecurringTemplate { get; set; }
|
|
|
|
public ICollection<ExpenseAttachment> Attachments { get; set; } = [];
|
|
}
|
|
}
|