Commit 28713729 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix invoice creation: type must be 'standard' not 'enrollment' (CHECK constraint)

invoices.type only allows: standard, recurring, credit_note, proforma.
The wizard was passing 'enrollment' which violated the DB constraint,
causing a silent failure caught by the try/catch.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent e8ed93cf
......@@ -311,7 +311,7 @@ public function confirm(): void
$invoice = $invoiceService->create([
'academy_id' => app('current_academy')->id,
'number' => $invoiceService->generateNumber(app('current_academy')->id),
'type' => 'enrollment',
'type' => 'standard',
'billable_type' => Participant::class,
'billable_id' => $participant->id,
'contact_name' => $this->guardian_name_ar,
......
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