feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
baodev0
2026-10-19 16:37:56 +07:00
co-authored by Claude Sonnet 5.5
parent ea9a53f742
commit 25f23d541e
134 changed files with 4926 additions and 185 deletions
+6 -1
View File
@@ -15,6 +15,9 @@ class AdminPaymentNotifier
$invoice->loadMissing(['customer', 'order']);
$outstanding = InvoicePaymentService::outstanding($invoice);
$reference = $invoice->order?->order_num ?? $invoice->invoice_number;
$detailLink = $invoice->order
? '/order-invoice/' . $invoice->order->order_num
: '/order-invoice';
$label = $paymentType === 'order' ? 'đơn hàng' : 'hóa đơn';
$amountFormatted = number_format($amount, 0, ',', '.') . ' VNĐ';
@@ -22,10 +25,12 @@ class AdminPaymentNotifier
'type' => 'payment_received',
'title' => 'Khách hàng thanh toán ' . $label,
'body' => "{$invoice->customer->fullname} đã thanh toán {$amountFormatted} cho {$label} #{$reference}.",
'link' => '/order-invoice',
'link' => $detailLink,
'data' => [
'invoice_id' => $invoice->id,
'order_id' => $invoice->order_id,
'order_num' => $invoice->order?->order_num,
'invoice_number' => $invoice->invoice_number,
'amount' => $amount,
'outstanding' => $outstanding,
],