10.
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.
This commit is contained in:
@@ -68,4 +68,10 @@ namespace Distribution.Models
|
||||
public enum ReceivedChequeStatusAction { Deposit, Clear, Return, Cancel }
|
||||
|
||||
public enum ReceivedFromType { Customer, Supplier, Other }
|
||||
|
||||
public enum ExpenseStatus { Draft, Posted, Paid, Void }
|
||||
|
||||
public enum ExpenseAction { Draft, Post, Pay }
|
||||
|
||||
public enum RecurringFrequency { Weekly, Monthly, Quarterly, Yearly }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
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; } = [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Distribution.Models
|
||||
{
|
||||
public class ExpenseAttachment : Template
|
||||
{
|
||||
public Guid FK_ExpenseId { get; set; }
|
||||
[ForeignKey("FK_ExpenseId")]
|
||||
public Expense? Expense { get; set; }
|
||||
|
||||
public string OriginalFileName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Absolute path on disk. Served through a streaming endpoint, never statically.</summary>
|
||||
public string StoredPath { get; set; } = string.Empty;
|
||||
|
||||
public string ContentType { get; set; } = string.Empty;
|
||||
public long SizeBytes { get; set; }
|
||||
|
||||
public Guid UploadedByUserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Distribution.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Two-level tree: top-level categories (e.g. "Salaries", "Utilities") and
|
||||
/// child "titles" (e.g. "Bonus", "Electricity"). Expenses link to a leaf (Title).
|
||||
/// </summary>
|
||||
public class ExpenseCategory : Template
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Code { get; set; }
|
||||
|
||||
public Guid? FK_ParentCategoryId { get; set; }
|
||||
[ForeignKey("FK_ParentCategoryId")]
|
||||
public ExpenseCategory? Parent { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Distribution.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Lightweight vendor directory used only by the Expenses module. Kept
|
||||
/// separate from Supplier (which has performance scores, PO/GRN linkage).
|
||||
/// </summary>
|
||||
public class ExpenseVendor : Template
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? ContactInfo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Distribution.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Blueprint for a recurring expense. Materialized into Expense rows by
|
||||
/// POST /api/recurring-expenses/run-due based on NextRunDate.
|
||||
/// </summary>
|
||||
public class RecurringExpenseTemplate : Template
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public Guid FK_CategoryId { get; set; }
|
||||
[ForeignKey("FK_CategoryId")]
|
||||
public ExpenseCategory? Category { get; set; }
|
||||
|
||||
public Guid? FK_WarehouseId { get; set; }
|
||||
[ForeignKey("FK_WarehouseId")]
|
||||
public Warehouse? Warehouse { get; set; }
|
||||
|
||||
public Guid? FK_VendorId { get; set; }
|
||||
[ForeignKey("FK_VendorId")]
|
||||
public ExpenseVendor? Vendor { get; set; }
|
||||
|
||||
[Precision(18, 2)]
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
public string? Payee { get; set; }
|
||||
public string? Description { get; set; }
|
||||
|
||||
public RecurringFrequency Frequency { get; set; }
|
||||
/// <summary>1..31 for Monthly/Quarterly/Yearly. Ignored for Weekly.</summary>
|
||||
public int? DayOfMonth { get; set; }
|
||||
/// <summary>0..6 (Sun=0) for Weekly. Ignored otherwise.</summary>
|
||||
public int? DayOfWeek { get; set; }
|
||||
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public DateTime NextRunDate { get; set; }
|
||||
|
||||
/// <summary>When true, generated expenses jump straight to Posted; otherwise Draft.</summary>
|
||||
public bool AutoPost { get; set; }
|
||||
|
||||
public bool IsPaused { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user