Commit 3e0ea572 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix: auto-generated renewal invoices marked as 'sent' immediately

Without this, invoices stay in 'draft' and don't appear in the payment
wizard (which only queries sent/partially_paid/overdue).
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent a2ad6e54
...@@ -99,6 +99,9 @@ public function handle(InvoiceService $invoiceService, PricingService $pricingSe ...@@ -99,6 +99,9 @@ public function handle(InvoiceService $invoiceService, PricingService $pricingSe
], ],
], $systemUser); ], $systemUser);
// Mark as sent immediately so it appears in payment wizard
$invoice->update(['status' => \App\Domain\Financial\Enums\InvoiceStatus::Sent]);
$this->advanceNextBillingDate($enrollment); $this->advanceNextBillingDate($enrollment);
$enrollment->update([ $enrollment->update([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment