e4a256a6c4
Subscription expiry (SubscriptionExpiryBackgroundService): - Trials with no grace period now go directly Active -> Expired instead of briefly entering GracePeriod for a day, which was causing repeated 'Grace Period Started' admin notification emails - Remove redundant isTrial variable (query already filters to non-Stripe companies, so all processed companies are trials by definition) - Save per-company inside the loop so a single SaveChangesAsync failure no longer discards all other companies' status changes and notification log entries (which was the other cause of repeated emails) HTML entities in page titles (33 views): - Replace – / — with plain ' - ' in ViewData["Title"] C# strings; Razor HTML-encodes these when rendering @ViewData["Title"], causing browsers to display the literal text '–' instead of a dash Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
110 lines
5.0 KiB
Plaintext
110 lines
5.0 KiB
Plaintext
@model PowderCoating.Core.Entities.BankReconciliation
|
|
@using PowderCoating.Web.Controllers
|
|
@{
|
|
ViewData["Title"] = $"Reconciliation Report - {Model.Account?.Name}";
|
|
var clearedDeposits = ViewBag.ClearedDeposits as IEnumerable<PowderCoating.Core.Entities.Payment> ?? Enumerable.Empty<PowderCoating.Core.Entities.Payment>();
|
|
var clearedPayments = ViewBag.ClearedPayments as List<ReconciliationItem> ?? new();
|
|
}
|
|
|
|
<div class="d-flex align-items-center mb-3 gap-2 no-print">
|
|
<a asp-action="Index" class="btn btn-sm btn-outline-secondary">
|
|
<i class="bi bi-arrow-left me-1"></i>Back
|
|
</a>
|
|
<h4 class="mb-0 fw-semibold ms-2">Reconciliation Report</h4>
|
|
<button class="btn btn-sm btn-outline-secondary ms-auto" onclick="window.print()">
|
|
<i class="bi bi-printer me-1"></i>Print
|
|
</button>
|
|
</div>
|
|
|
|
<div class="card shadow-sm mb-3">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<h5 class="fw-semibold">@Model.Account?.Name</h5>
|
|
<p class="text-muted mb-0">Statement Date: @Model.StatementDate.ToString("MMMM d, yyyy")</p>
|
|
@if (Model.CompletedAt.HasValue)
|
|
{
|
|
<p class="text-muted small">Completed by @Model.CompletedBy on @Model.CompletedAt.Value.ToLocalTime().ToString("MMM d, yyyy")</p>
|
|
}
|
|
</div>
|
|
<div class="col-md-6 text-md-end">
|
|
<table class="table table-sm table-borderless mb-0 ms-auto" style="width:auto">
|
|
<tr>
|
|
<td class="text-muted">Beginning Balance:</td>
|
|
<td class="fw-semibold text-end">@Model.BeginningBalance.ToString("C")</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">+ Cleared Deposits:</td>
|
|
<td class="fw-semibold text-end text-success">@clearedDeposits.Sum(p => p.Amount).ToString("C")</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text-muted">– Cleared Payments:</td>
|
|
<td class="fw-semibold text-end text-danger">@clearedPayments.Sum(p => p.Amount).ToString("C")</td>
|
|
</tr>
|
|
<tr class="border-top">
|
|
<td class="fw-semibold">Statement Ending Balance:</td>
|
|
<td class="fw-bold text-end">@Model.EndingBalance.ToString("C")</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<div class="card shadow-sm">
|
|
<div class="card-header fw-semibold">Cleared Deposits (@clearedDeposits.Count())</div>
|
|
<div class="card-body p-0">
|
|
<table class="table table-sm mb-0">
|
|
<thead class="table-light"><tr><th>Date</th><th>Reference</th><th class="text-end">Amount</th></tr></thead>
|
|
<tbody>
|
|
@foreach (var p in clearedDeposits.OrderBy(p => p.PaymentDate))
|
|
{
|
|
<tr>
|
|
<td class="small">@p.PaymentDate.ToString("MMM d")</td>
|
|
<td class="small">@p.Reference</td>
|
|
<td class="text-end">@p.Amount.ToString("C")</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
<tfoot class="table-light fw-semibold">
|
|
<tr><td colspan="2" class="text-end">Total</td><td class="text-end">@clearedDeposits.Sum(p=>p.Amount).ToString("C")</td></tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="card shadow-sm">
|
|
<div class="card-header fw-semibold">Cleared Payments (@clearedPayments.Count)</div>
|
|
<div class="card-body p-0">
|
|
<table class="table table-sm mb-0">
|
|
<thead class="table-light"><tr><th>Date</th><th>Reference</th><th class="text-end">Amount</th></tr></thead>
|
|
<tbody>
|
|
@foreach (var p in clearedPayments)
|
|
{
|
|
<tr>
|
|
<td class="small">@p.Date.ToString("MMM d")</td>
|
|
<td class="small">@p.Reference</td>
|
|
<td class="text-end">@p.Amount.ToString("C")</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
<tfoot class="table-light fw-semibold">
|
|
<tr><td colspan="2" class="text-end">Total</td><td class="text-end">@clearedPayments.Sum(p=>p.Amount).ToString("C")</td></tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Model.Notes))
|
|
{
|
|
<div class="card shadow-sm mt-3">
|
|
<div class="card-header fw-semibold">Notes</div>
|
|
<div class="card-body">@Model.Notes</div>
|
|
</div>
|
|
}
|