Files
ERP_Distribution/Distribution/Models/RecurringExpenseTemplate.cs
T
Kalana B. Thilakarathna c775146b64
CI/CD - ERP Distribution / Build & Deploy Frontend (pull_request) Failing after 13m39s
CI/CD - ERP Distribution / Build & Deploy Backend (pull_request) Failing after 15m1s
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.
2026-10-22 17:47:49 +05:30

48 lines
1.6 KiB
C#

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; }
}
}