Commit 77bf19c8 authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix: invoice contact_name uses participant name, not guardian

NewRegistrationWizard was setting contact_name to guardian_name_ar
which made invoices appear under the parent's name instead of the
participant (child). Now uses participant's own person name_ar.

Also fixed 75 existing invoices in production via direct DB update.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent a5e24d39
...@@ -1094,8 +1094,8 @@ public function confirm(): void ...@@ -1094,8 +1094,8 @@ public function confirm(): void
'type' => 'standard', 'type' => 'standard',
'billable_type' => Participant::class, 'billable_type' => Participant::class,
'billable_id' => $participant->id, 'billable_id' => $participant->id,
'contact_name' => $this->guardian_name_ar, 'contact_name' => $participant->person?->name_ar ?? $this->guardian_name_ar,
'contact_phone' => $this->guardian_phone, 'contact_phone' => $participant->person?->phone ?? $this->guardian_phone,
'subtotal_amount' => $subtotal, 'subtotal_amount' => $subtotal,
'discount_amount' => $discountAmount, 'discount_amount' => $discountAmount,
'tax_amount' => 0, 'tax_amount' => 0,
......
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