update email template

This commit is contained in:
baodev0
2026-09-09 16:56:22 +07:00
parent d3d9f76ba0
commit 2365ef72e9
210 changed files with 6335 additions and 4688 deletions
@@ -36,7 +36,9 @@ class CheckOverdueInvoices extends Command
}
$invoices = Invoice::query()
->with('order:id,status')
// customer_id must be selected too: OrderObserver::updated() reads it when
// logging the status change below, and a NULL there violates log.customer_id NOT NULL.
->with('order:id,status,customer_id')
->whereNotNull('due_date')
->whereDate('due_date', '<', $today)
->whereIn('status', [InvoiceStatus::UNPAID->value, InvoiceStatus::OVERDUE->value])