a0bdd2b5b4
Replace all corruption variants with HTML entities across 226 view files: - 3-char UTF-8-as-Win1252 sequences (ae-corruption) - Standalone smart/curly quotes that break C# Razor expressions - Partially re-corrupted variants where the 3rd byte was normalised to ASCII tools/Fix-Encoding.ps1: re-runnable sweep; uses [char] code points so the script itself never contains a literal non-ASCII character; supports -DryRun .githooks/pre-commit: blocks commits containing the ae-corruption byte signature (xc3xa2xe2x82xac); git core.hooksPath = .githooks so the hook is repo-committed and active for all future work on this machine. Build clean; 225 unit tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
111 lines
4.9 KiB
Plaintext
111 lines
4.9 KiB
Plaintext
@model PowderCoating.Web.ViewModels.Reports.InvoiceAgingDetailViewModel
|
|
@{ ViewData["Title"] = "Invoice Aging Detail"; }
|
|
|
|
<partial name="_ReportHeader" model="Model" />
|
|
|
|
<div class="row g-3 mb-3">
|
|
<div class="col-sm-6 col-md-3">
|
|
<div class="card text-bg-danger">
|
|
<div class="card-body py-2">
|
|
<div class="small">Total Outstanding</div>
|
|
<div class="fs-5 fw-bold">@Model.TotalBalance.ToString("C")</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-md-3">
|
|
<div class="card border-secondary">
|
|
<div class="card-body py-2 text-center">
|
|
<div class="small text-muted">Open Invoices</div>
|
|
<div class="fs-5 fw-bold">@Model.Items.Count</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-md-3">
|
|
<div class="card border-warning">
|
|
<div class="card-body py-2 text-center">
|
|
<div class="small text-muted">Overdue (1–30 days)</div>
|
|
<div class="fs-5 fw-bold text-warning">
|
|
@Model.Items.Where(i => i.AgingBucket == "1–30 Days").Sum(i => i.BalanceDue).ToString("C")
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-md-3">
|
|
<div class="card border-danger">
|
|
<div class="card-body py-2 text-center">
|
|
<div class="small text-muted">Overdue (90+ days)</div>
|
|
<div class="fs-5 fw-bold text-danger">
|
|
@Model.Items.Where(i => i.AgingBucket == "90+ Days").Sum(i => i.BalanceDue).ToString("C")
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-hover mb-0">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Invoice #</th>
|
|
<th>Customer</th>
|
|
<th>Invoice Date</th>
|
|
<th>Due Date</th>
|
|
<th class="text-end">Total</th>
|
|
<th class="text-end">Paid</th>
|
|
<th class="text-end">Balance Due</th>
|
|
<th class="text-end">Days Overdue</th>
|
|
<th>Aging Bucket</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in Model.Items)
|
|
{
|
|
var bucketClass = item.AgingBucket switch {
|
|
"Current" => "text-success",
|
|
"1–30 Days" => "text-warning",
|
|
"31–60 Days" => "text-orange",
|
|
"61–90 Days" => "text-danger",
|
|
"90+ Days" => "fw-bold text-danger",
|
|
_ => ""
|
|
};
|
|
<tr>
|
|
<td>
|
|
<a asp-controller="Invoices" asp-action="Details" asp-route-id="@item.InvoiceId">
|
|
@item.InvoiceNumber
|
|
</a>
|
|
</td>
|
|
<td>
|
|
@item.CustomerName
|
|
@if (!string.IsNullOrEmpty(item.CustomerEmail))
|
|
{
|
|
<div class="small text-muted">@item.CustomerEmail</div>
|
|
}
|
|
</td>
|
|
<td>@item.InvoiceDate.ToString("MMM d, yyyy")</td>
|
|
<td>@(item.DueDate?.ToString("MMM d, yyyy") ?? "—")</td>
|
|
<td class="text-end">@item.Total.ToString("C")</td>
|
|
<td class="text-end text-success">@item.AmountPaid.ToString("C")</td>
|
|
<td class="text-end fw-semibold">@item.BalanceDue.ToString("C")</td>
|
|
<td class="text-end @bucketClass">
|
|
@(item.DaysOverdue > 0 ? item.DaysOverdue.ToString() : "—")
|
|
</td>
|
|
<td><span class="badge @bucketClass bg-opacity-10 border">@item.AgingBucket</span></td>
|
|
<td><span class="badge bg-secondary-subtle text-secondary">@item.StatusDisplay</span></td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
<tfoot class="table-light fw-bold">
|
|
<tr>
|
|
<td colspan="6">Total Outstanding</td>
|
|
<td class="text-end">@Model.TotalBalance.ToString("C")</td>
|
|
<td colspan="3"></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|