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>
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
@model IEnumerable<PowderCoating.Core.Entities.BankReconciliation>
|
||||
@using PowderCoating.Core.Enums
|
||||
@{
|
||||
ViewData["Title"] = "Bank Reconciliation";
|
||||
}
|
||||
|
||||
<div class="d-flex align-items-center mb-3 gap-2">
|
||||
<h4 class="mb-0 fw-semibold">Bank Reconciliation</h4>
|
||||
<a asp-action="Create" class="btn btn-sm btn-primary ms-auto">
|
||||
<i class="bi bi-plus-lg me-1"></i>Start New Reconciliation
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if (TempData["Success"] != null)
|
||||
{
|
||||
<div class="alert alert-success alert-permanent alert-dismissible fade show">
|
||||
@TempData["Success"]
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover mb-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
<th>Statement Date</th>
|
||||
<th class="text-end">Beginning Balance</th>
|
||||
<th class="text-end">Ending Balance</th>
|
||||
<th>Status</th>
|
||||
<th>Completed By</th>
|
||||
<th class="text-end">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (!Model.Any())
|
||||
{
|
||||
<tr>
|
||||
<td colspan="7" class="text-center text-muted py-4">
|
||||
No reconciliations yet.
|
||||
<a asp-action="Create">Start your first one.</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@foreach (var br in Model)
|
||||
{
|
||||
<tr>
|
||||
<td class="fw-semibold">@br.Account?.Name</td>
|
||||
<td>@br.StatementDate.ToString("MMM d, yyyy")</td>
|
||||
<td class="text-end">@br.BeginningBalance.ToString("C")</td>
|
||||
<td class="text-end">@br.EndingBalance.ToString("C")</td>
|
||||
<td>
|
||||
@if (br.Status == BankReconciliationStatus.Completed)
|
||||
{
|
||||
<span class="badge bg-success">Completed</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-warning text-dark">In Progress</span>
|
||||
}
|
||||
</td>
|
||||
<td class="text-muted small">
|
||||
@if (br.CompletedAt.HasValue)
|
||||
{
|
||||
@($"{br.CompletedBy} on {br.CompletedAt.Value.ToLocalTime():MMM d, yyyy}")
|
||||
}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
@if (br.Status == BankReconciliationStatus.Completed)
|
||||
{
|
||||
<a asp-action="Report" asp-route-id="@br.Id" class="btn btn-sm btn-outline-secondary">
|
||||
<i class="bi bi-file-earmark-text me-1"></i>Report
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a asp-action="Reconcile" asp-route-id="@br.Id" class="btn btn-sm btn-outline-primary">
|
||||
<i class="bi bi-check2-square me-1"></i>Continue
|
||||
</a>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user