Add Credit Memos standalone management module
CreditMemosController with Index, Details, Create, Apply, and Void actions. All business logic (atomic apply transaction, RemainingBalance cap, customer.CreditBalance adjustment, auto-Paid invoice when BalanceDue hits zero) mirrors the invoice-centric IssueCreditMemo/ApplyCredit/VoidCreditMemo actions in InvoicesController but redirects back to the credit memo rather than an invoice. Views: Index (stats bar, status+search filter, table), Details (two-col layout with application history table and Bootstrap Apply/Void confirm modals), Create (customer dropdown, amount, reason, notes, optional expiry). Apply modal populates amount automatically from min(remaining credit, invoice balance due) via credit-memo.js data-attribute wiring (no inline scripts). Nav: Credit Memos added to Billing & Payments section in _Layout. Build: 0 errors. Unit tests: 200/200. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1077,6 +1077,10 @@
|
||||
<span>Online Payments</span>
|
||||
</a>
|
||||
}
|
||||
<a asp-controller="CreditMemos" asp-action="Index" class="nav-link">
|
||||
<i class="bi bi-journal-minus"></i>
|
||||
<span>Credit Memos</span>
|
||||
</a>
|
||||
<a asp-controller="GiftCertificates" asp-action="Index" class="nav-link">
|
||||
<i class="bi bi-gift"></i>
|
||||
<span>Gift Certificates</span>
|
||||
|
||||
Reference in New Issue
Block a user