Student Information
Name: {{ $studentInvoice->student->first_name ?? '' }}
{{ $studentInvoice->student->last_name ?? '' }}
Email:
{{ $studentInvoice->student->email ?? 'Not available' }}
Course Details
@php
$showDiscountTable = false;
$discountAmount = 0;
if (
!$studentInvoice->product &&
$discountPlan &&
$studentInvoice->level &&
$studentInvoice->level->track
) {
$trackLevelNumbers = $studentInvoice->level->track->level_number;
if (
$discountPlan->level_from <= $trackLevelNumbers &&
$discountPlan->level_to >= $trackLevelNumbers
) {
$showDiscountTable = true;
$discountAmount =
$discountPlan->type == 'fixed'
? $discountPlan->discount
: $priceBeforeDiscount * ($discountPlan->discount / 100);
}
}
@endphp
{{-- @if ($showDiscountTable)
Discount Details
Discount Name:
Discount Levels:
Type:
Discount:
Discount Amount:
{{ $discountPlan->name_en ?? '' }}
From {{ $discountPlan->level_from ?? '' }} To
{{ $discountPlan->level_to ?? '' }}
{{ ucfirst($discountPlan->type ?? '') }}
@if ($discountPlan->type == 'fixed')
{{ number_format($discountPlan->discount, 2) }}
@else
{{ number_format($discountPlan->discount, 0) }}%
@endif
{{ number_format($discountAmount, 2) }}
@endif --}}
@if ($studentInvoice->promocode_id)
Promocode Details
Promocode:
Type:
Total Price:
Discount:
Net Price:
{{ $studentInvoice->promocode->code ?? '' }}
{{ $studentInvoice->discount_type ?? '' }}
{{ number_format($studentInvoice->total_price, 2) }}
@if ($studentInvoice->discount_type == 'fixed')
{{ number_format($studentInvoice->discount, 2) }}
@else
{{ number_format($studentInvoice->discount, 0) }}%
@endif
{{ number_format($studentInvoice->net_price, 2) }}
@endif
Final Total:
{{ number_format($studentInvoice->net_price, 2) }}