Replace literal Unicode special chars with HTML entities across all 233 views
Sweeps em dashes, en dashes, multiplication signs, ellipses, and curly quotes to their HTML entity equivalents (— – × … ‘ ’) in all .cshtml files, skipping <script> blocks. Prevents encoding corruption from AI tools and Windows encoding mismatches that caused recurring symbol bugs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,203 +0,0 @@
|
||||
@model PowderCoating.Core.Entities.JournalEntry
|
||||
@using PowderCoating.Core.Enums
|
||||
@{
|
||||
ViewData["Title"] = $"Journal Entry {Model.EntryNumber}";
|
||||
var accountMap = ViewBag.AccountMap as Dictionary<int, string> ?? new Dictionary<int, string>();
|
||||
bool isPosted = Model.Status == JournalEntryStatus.Posted;
|
||||
bool isDraft = Model.Status == JournalEntryStatus.Draft;
|
||||
bool isReversed = Model.Status == JournalEntryStatus.Reversed;
|
||||
bool alreadyReversed = ViewBag.ReversalEntryNumber != null;
|
||||
}
|
||||
|
||||
<div class="d-flex align-items-center mb-3 gap-2 flex-wrap">
|
||||
<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">@Model.EntryNumber</h4>
|
||||
|
||||
@if (isDraft)
|
||||
{
|
||||
<span class="badge bg-warning text-dark ms-1 fs-6">Draft</span>
|
||||
}
|
||||
else if (isPosted)
|
||||
{
|
||||
<span class="badge bg-success ms-1 fs-6">Posted</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-secondary ms-1 fs-6">Reversed</span>
|
||||
}
|
||||
|
||||
@if (Model.IsReversal)
|
||||
{
|
||||
<span class="badge bg-secondary ms-1">Reversal of @ViewBag.ReversalOfNumber</span>
|
||||
}
|
||||
|
||||
<div class="ms-auto d-flex gap-2">
|
||||
@if (isDraft)
|
||||
{
|
||||
<form asp-action="Post" asp-route-id="@Model.Id" method="post" class="d-inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-sm btn-success"
|
||||
onclick="return confirm('Post this journal entry to the GL? This cannot be undone.')">
|
||||
<i class="bi bi-check-circle me-1"></i>Post to GL
|
||||
</button>
|
||||
</form>
|
||||
<form asp-action="Delete" asp-route-id="@Model.Id" method="post" class="d-inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger"
|
||||
onclick="return confirm('Delete this draft entry?')">
|
||||
<i class="bi bi-trash me-1"></i>Delete
|
||||
</button>
|
||||
</form>
|
||||
}
|
||||
@if (isPosted && !alreadyReversed)
|
||||
{
|
||||
<form asp-action="Reverse" asp-route-id="@Model.Id" method="post" class="d-inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<button type="submit" class="btn btn-sm btn-outline-warning"
|
||||
onclick="return confirm('Create a reversal entry for @Model.EntryNumber? This will immediately post the reversal.')">
|
||||
<i class="bi bi-arrow-counterclockwise me-1"></i>Reverse
|
||||
</button>
|
||||
</form>
|
||||
}
|
||||
@if (alreadyReversed)
|
||||
{
|
||||
<a asp-action="Details" asp-route-id="@ViewBag.ReversalEntryId" class="btn btn-sm btn-outline-secondary">
|
||||
View Reversal (@ViewBag.ReversalEntryNumber)
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</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>
|
||||
}
|
||||
@if (TempData["Error"] != null)
|
||||
{
|
||||
<div class="alert alert-danger alert-permanent alert-dismissible fade show">
|
||||
@TempData["Error"]
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="row g-3 mb-3">
|
||||
<div class="col-md-8">
|
||||
<div class="card shadow-sm h-100">
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-4 text-muted">Entry Number</dt>
|
||||
<dd class="col-8 fw-semibold">@Model.EntryNumber</dd>
|
||||
|
||||
<dt class="col-4 text-muted">Date</dt>
|
||||
<dd class="col-8">@Model.EntryDate.ToString("MMMM d, yyyy")</dd>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Reference))
|
||||
{
|
||||
<dt class="col-4 text-muted">Reference</dt>
|
||||
<dd class="col-8">@Model.Reference</dd>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Description))
|
||||
{
|
||||
<dt class="col-4 text-muted">Description</dt>
|
||||
<dd class="col-8">@Model.Description</dd>
|
||||
}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm h-100">
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
@if (isPosted && Model.PostedAt.HasValue)
|
||||
{
|
||||
<dt class="col-5 text-muted">Posted</dt>
|
||||
<dd class="col-7 small">
|
||||
@Model.PostedAt.Value.ToLocalTime().ToString("MMM d, yyyy h:mm tt")<br />
|
||||
<span class="text-muted">by @(Model.PostedBy ?? "—")</span>
|
||||
</dd>
|
||||
}
|
||||
<dt class="col-5 text-muted">Created</dt>
|
||||
<dd class="col-7 small">@Model.CreatedAt.ToLocalTime().ToString("MMM d, yyyy")</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<span class="fw-semibold">Lines</span>
|
||||
@{
|
||||
var totalDebits = Model.Lines.Sum(l => l.DebitAmount);
|
||||
var totalCredits = Model.Lines.Sum(l => l.CreditAmount);
|
||||
bool balanced = totalDebits == totalCredits;
|
||||
}
|
||||
<div class="ms-auto small">
|
||||
<span class="me-3">Debits: <strong>@totalDebits.ToString("C")</strong></span>
|
||||
<span class="me-3">Credits: <strong>@totalCredits.ToString("C")</strong></span>
|
||||
@if (balanced)
|
||||
{
|
||||
<span class="badge bg-success">Balanced</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-danger">Out of Balance</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-sm mb-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
<th>Description</th>
|
||||
<th class="text-end">Debit</th>
|
||||
<th class="text-end">Credit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var line in Model.Lines.OrderBy(l => l.LineOrder))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@if (accountMap.TryGetValue(line.AccountId, out var accountName))
|
||||
{
|
||||
@accountName
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-muted">#@line.AccountId</span>
|
||||
}
|
||||
</td>
|
||||
<td class="text-muted small">@line.Description</td>
|
||||
<td class="text-end">
|
||||
@if (line.DebitAmount > 0)
|
||||
{
|
||||
@line.DebitAmount.ToString("C")
|
||||
}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
@if (line.CreditAmount > 0)
|
||||
{
|
||||
@line.CreditAmount.ToString("C")
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot class="table-light fw-semibold">
|
||||
<tr>
|
||||
<td colspan="2" class="text-end">Totals</td>
|
||||
<td class="text-end">@totalDebits.ToString("C")</td>
|
||||
<td class="text-end">@totalCredits.ToString("C")</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user