Files
PowderCoatingLogix/src/PowderCoating.Core/Entities/Payment.cs
T
spouliot 1229081436 Phase E: Add Bank Reconciliation
- IsCleared + ClearedDate added to Payment, BillPayment, Expense entities
- BankReconciliation entity (account, statement date, beginning/ending balance, status)
- BankReconciliationStatus enum (InProgress, Completed)
- Migration AddBankReconciliation: new BankReconciliations table + IsCleared/ClearedDate columns
- IUnitOfWork/UnitOfWork wired with BankReconciliations repo
- BankReconciliationsController: Index, Create, Reconcile, ToggleCleared (AJAX), Complete, Report
- Reconcile view: deposit/payment checkboxes with live running balance and difference via JS
- Complete is gated: only enabled when difference == $0.00
- Nav: Bank Reconciliation added to Finance section in _Layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 00:10:38 -04:00

30 lines
1.0 KiB
C#

using PowderCoating.Core.Enums;
namespace PowderCoating.Core.Entities;
public class Payment : BaseEntity
{
public int InvoiceId { get; set; }
public decimal Amount { get; set; }
public DateTime PaymentDate { get; set; } = DateTime.UtcNow;
public PaymentMethod PaymentMethod { get; set; }
public string? Reference { get; set; }
public string? Notes { get; set; }
public string? RecordedById { get; set; }
/// <summary>
/// Bank/checking account the payment is deposited into.
/// When null, no specific deposit account is tracked.
/// </summary>
public int? DepositAccountId { get; set; }
/// <summary>True once this payment has been matched against a bank statement during reconciliation.</summary>
public bool IsCleared { get; set; } = false;
public DateTime? ClearedDate { get; set; }
// Navigation
public virtual Invoice Invoice { get; set; } = null!;
public virtual ApplicationUser? RecordedBy { get; set; }
public virtual Account? DepositAccount { get; set; }
}