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>
93 lines
4.8 KiB
Plaintext
93 lines
4.8 KiB
Plaintext
@model PowderCoating.Web.Controllers.CreditMemoCreateVm
|
|
@{
|
|
ViewData["Title"] = "Issue Credit Memo";
|
|
var linkedInvoiceNumber = ViewBag.LinkedInvoiceNumber as string;
|
|
var customers = ViewBag.Customers as List<Microsoft.AspNetCore.Mvc.Rendering.SelectListItem> ?? new();
|
|
}
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
|
<h4 class="mb-0"><i class="bi bi-journal-minus me-2 text-primary"></i>Issue Credit Memo</h4>
|
|
<a asp-action="Index" class="btn btn-outline-secondary">
|
|
<i class="bi bi-arrow-left me-1"></i>Back to Credit Memos
|
|
</a>
|
|
</div>
|
|
|
|
<div class="row justify-content-center">
|
|
<div class="col-lg-7">
|
|
<div class="card">
|
|
<div class="card-header fw-semibold">Credit Memo Details</div>
|
|
<div class="card-body">
|
|
<form asp-action="Create" method="post">
|
|
@Html.AntiForgeryToken()
|
|
<asp-validation-summary asp-validation-summary="All" class="alert alert-danger alert-permanent"></asp-validation-summary>
|
|
|
|
@if (Model.OriginalInvoiceId.HasValue && !string.IsNullOrEmpty(linkedInvoiceNumber))
|
|
{
|
|
<input type="hidden" asp-for="OriginalInvoiceId" />
|
|
<div class="alert alert-info alert-permanent py-2 mb-3 small">
|
|
<i class="bi bi-link-45deg me-1"></i>
|
|
Linked to invoice <strong>@linkedInvoiceNumber</strong>
|
|
</div>
|
|
}
|
|
|
|
<div class="mb-3">
|
|
<label asp-for="CustomerId" class="form-label">Customer <span class="text-danger">*</span></label>
|
|
<select asp-for="CustomerId" asp-items="customers" class="form-select">
|
|
<option value="0">— select customer —</option>
|
|
</select>
|
|
<span asp-validation-for="CustomerId" class="text-danger small"></span>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label asp-for="Amount" class="form-label">Credit Amount <span class="text-danger">*</span></label>
|
|
<div class="input-group">
|
|
<span class="input-group-text">$</span>
|
|
<input asp-for="Amount" type="number" step="0.01" min="0.01"
|
|
class="form-control" placeholder="0.00" />
|
|
</div>
|
|
<span asp-validation-for="Amount" class="text-danger small"></span>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label asp-for="Reason" class="form-label">Reason <span class="text-danger">*</span></label>
|
|
<input asp-for="Reason" class="form-control"
|
|
placeholder="e.g. Price adjustment, billing error, goodwill credit…" />
|
|
<span asp-validation-for="Reason" class="text-danger small"></span>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label asp-for="Notes" class="form-label">Internal Notes</label>
|
|
<textarea asp-for="Notes" class="form-control" rows="3"
|
|
placeholder="Additional context for your records (not shown to customer)"></textarea>
|
|
<span asp-validation-for="Notes" class="text-danger small"></span>
|
|
</div>
|
|
|
|
<div class="mb-4">
|
|
<label asp-for="ExpiryDate" class="form-label">
|
|
Expiry Date
|
|
<span class="text-muted small ms-1">(optional — leave blank for no expiry)</span>
|
|
</label>
|
|
<input asp-for="ExpiryDate" type="date" class="form-control" />
|
|
<span asp-validation-for="ExpiryDate" class="text-danger small"></span>
|
|
</div>
|
|
|
|
<div class="d-flex gap-2">
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="bi bi-check-lg me-1"></i>Issue Credit Memo
|
|
</button>
|
|
<a asp-action="Index" class="btn btn-outline-secondary">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mt-3 border-0 bg-light">
|
|
<div class="card-body py-2 small text-muted">
|
|
<i class="bi bi-info-circle me-1"></i>
|
|
Issuing a credit memo immediately adds the amount to the customer's credit balance.
|
|
You can apply it to one or more open invoices from the Credit Memo Details page.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|