@php $studentInfo = $invoice?->user->userable ?? null; $organization = $invoice?->course?->organization?->userable ?? null; $studentTranslations = parse_translation($studentInfo); $orgTranslations = parse_translation($organization); $course = $invoice->course; $instructors = $invoice?->course?->instructors ?? []; $general = get_theme_option('general') ?? []; $backendLogo = get_theme_option(key: 'backend_logo') ?? null; $invoiceLogo = isset($backendLogo['invoice_logo']) && fileExists('lms/theme-options', $backendLogo['invoice_logo']) == true ? asset("storage/lms/theme-options/{$backendLogo['invoice_logo']}") : asset('lms/assets/images/logo/logo.svg'); @endphp Invoice- {{ $invoice->purchase_number }}
logo
{{ translate('Item ID') }}: #{{ $invoice->course_id }}
{{ translate('Student Name') }}: {{ $studentTranslations['first_name'] ?? ($studentInfo->first_name ?? '') }} {{ $studentTranslations['last_name'] ?? ($studentInfo->last_name ?? '') }}
{{ translate('Student Phone') }}: {{ $studentInfo->phone }}
{{ translate('Student Email') }}: {{ $invoice?->user?->email ?? '' }}
@if ($organization)
{{ translate('Organization') }}: {{ $orgTranslations['name'] ?? ($organization->name ?? '') }}
@endif
{{ translate('Instructor') }}: @foreach ($instructors as $instructor) @php $instructorTranslations = parse_translation($instructor->userable); @endphp {{ $instructorTranslations['first_name'] ?? $instructor?->userable?->first_name }} {{ $instructorTranslations['last_name'] ?? $instructor?->userable?->last_name }} @if (!$loop->last) , @endif @endforeach
{{ translate('Address') }}: {{ $general['address'] ?? '' }}
{{ translate('Purchase Date') }}: {{ customDateFormate($invoice->created_at, format: 'd M y h:i A') }}
# {{ translate('Item') }} {{ translate('Type') }} {{ translate('Price') }} {{ translate('Discount Price') }} {{ translate('Total') }}
{{ $invoice?->course?->id ?? ($invoice?->courseBundle?->id ?? '') }} {{ $invoice?->course?->title ?? ($invoice?->courseBundle?->title ?? '') }} {{ $invoice?->purchase_type }} ${{ $invoice?->price }} ${{ $invoice?->discount_price }} @php $subTotal = dotZeroRemove($invoice?->discount_price) ? $invoice?->discount_price : $invoice?->price; @endphp @if (dotZeroRemove($invoice?->discount_price)) ${{ $invoice?->discount_price }} @else ${{ $invoice?->price }} @endif
{{ translate('Sub Total') }}:
${{ $subTotal }}
{{ translate('Platform Fee') }}:
${{ $invoice?->platform_fee }}
{{ translate('Total') }}
${{ $subTotal + $invoice?->platform_fee }}