Upedia Academy
10062 Al Ahli Bank Building
Zahraa Al Maadi, Cairo, Egypt

Invoice

#{{ $studentInvoice->invoice_number }}
Date: {{ $studentInvoice->created_at->format('Y-m-d') }}
Student Information
Name: {{ $studentInvoice->student->first_name }} {{ $studentInvoice->student->last_name }} Email: {{ $studentInvoice->student->email ?? 'Not available' }}
@if ($studentInvoice->transactions && $studentInvoice->transactions->count() > 0)
Transaction Details
@foreach ($studentInvoice->transactions as $index => $transaction) @endforeach
# Payment Type Amount Status
{{ $index + 1 }} {{ ucfirst($transaction->payment_type) }} {{ number_format($transaction->amount, 2) }} @if ($transaction->status == 'pending') Pending @elseif ($transaction->status == 'accepted') Accepted @elseif ($transaction->status == 'rejected') Rejected @else {{ ucfirst($transaction->status) }} @endif
@endif
@if ($studentInvoice->type === 'track') Track Details @elseif($studentInvoice->product) Product Details @else Course Details @endif
@if ($studentInvoice->type === 'track') @else @endif @if ($studentInvoice->type === 'track') @foreach ($studentInvoice->courseStudentInvoices as $item) @php $course = $item->course; @endphp @endforeach @else @foreach ($studentInvoice->courseStudentInvoices as $item) @php $course = $item->course; @endphp @endforeach @endif
Course Start End Teacher PriceName Start End Teacher Price
{{ $course->track->name_en }} {{ $course->start_date }} {{ $course->end_date }} @if ($course->staff) {{ $course->staff->first_name }} {{ $course->staff->last_name }} @else — @endif {{ number_format($studentInvoice->total_price, 2) }}
{{ $course->academyProduct->name_en }} {{ $course->start_date }} {{ $course->end_date }} @if ($course->staff) {{ $course->staff->first_name }} {{ $course->staff->last_name }} @else — @endif {{ number_format($studentInvoice->total_price, 2) }}
@if ($studentInvoice->promocode_id)
Promocode Details
Code: {{ $studentInvoice->promocode->code }} Type: {{ ucfirst($studentInvoice->promocode_type) }} Discount: @if ($studentInvoice->promocode_type == 'fixed') {{ number_format($studentInvoice->promocode_price, 2) }} @else {{ number_format($studentInvoice->promocode_price, 0) }}% @endif
@endif @if ($studentInvoice->discount_plan_id)
Pricing Plan Details
Plan: {{ $studentInvoice->discountPlan->name_en }} Total Price: {{ number_format($studentInvoice->total_price, 2) }} Discount: @if ($studentInvoice->discount_plan_type == 'fixed') {{ number_format($studentInvoice->discount_plan_price, 2) }} @else {{ number_format($studentInvoice->discount_plan_price, 0) }}% @endif After Discount: {{ number_format($studentInvoice->net_price, 2) }}
@endif
Final Total: {{ number_format($studentInvoice->net_price, 2) }}