{{ __('general.invoices') .' ('. $orders->total() .')'}}

@if( !$orders->isEmpty() ) @if(!empty(setting('_platform_fee.platform_fee_title')) && !empty(setting('_platform_fee.platform_fee'))) @else @endif @foreach($orders as $order) @php $options = $order?->options ?? []; $subject = $options['subject'] ?? ''; $image = $options['image'] ?? ''; @endphp @php $firstItem = $order?->items?->first(); $commission = is_numeric(getCommission($firstItem?->total)) ? getCommission($firstItem?->total) : 0; $options = $firstItem?->options; $tutor_payout = !empty($options['tutor_payout']) && is_numeric($options['tutor_payout']) ? $options['tutor_payout'] : ($firstItem?->total - $commission); @endphp @endforeach
{{ __('booking.id') }} {{ __('booking.transaction_id') }} {{ __('booking.items') }} {{ __('booking.student_name') }} {{ __('booking.payment_method') }} {{ __('booking.amount') }} {{ __('booking.tutor_payout') }} {{ __('booking.commission') }}{{ setting('_platform_fee.platform_fee_title') }}{{ __('booking.platform_fee') }}{{ __('booking.status') }} {{ __('general.actions') }}
{{ $order?->id }} {{ !empty($order?->transaction_id) ? $order->transaction_id : '-' }}
@if(!empty($order?->slot_bookings_count)) {{ $order?->slot_bookings_count == 1 ? __('booking.session_count', ['count' => $order?->slot_bookings_count]) : __('booking.sessions_count', ['count' => $order?->slot_bookings_count]) }} @endif @if(\Nwidart\Modules\Facades\Module::has('courses') && \Nwidart\Modules\Facades\Module::isEnabled('courses') && !empty($order?->courses_count) ) @if(!empty($order?->slot_bookings_count)) | @endif {{ $order?->courses_count == 1 ? __('booking.course_count', ['count' => $order?->courses_count]) : __('booking.courses_count', ['count' => $order?->courses_count]) }} @endif @if(\Nwidart\Modules\Facades\Module::has('subscriptions') && \Nwidart\Modules\Facades\Module::isEnabled('subscriptions') && !empty($order?->subscriptions_count)) @if(!empty($order?->slot_bookings_count) || !empty($order?->courses_count)) | @endif {{ $order?->subscriptions_count == 1 ? __('booking.subscription_count', ['count' => $order?->subscriptions_count]) : __('booking.subscriptions_count', ['count' => $order?->subscriptions_count]) }} @endif @if(\Nwidart\Modules\Facades\Module::has('coursebundles') && \Nwidart\Modules\Facades\Module::isEnabled('coursebundles') && !empty($order?->coursebundles_count)) @if(!empty($order?->slot_bookings_count) || !empty($order?->courses_count) || !empty($order?->subscriptions_count)) | @endif {{ $order?->coursebundles_count == 1 ? __('booking.coursebundle_count', ['count' => $order?->coursebundles_count]) : __('booking.coursebundles_count', ['count' => $order?->coursebundles_count]) }} @endif
@if (!empty($order?->userProfile?->image) && Storage::disk(getStorageDisk())->exists($order?->userProfile?->image)) {{$order?->userProfile?->image}} @else {{ $order?->orderable?->student?->image }} @endif {{ $order?->userProfile?->full_name }}
{{ __("settings." .$order?->payment_method. "_title") }} {!! formatAmount($order?->amount) !!} {{ formatAmount($tutor_payout) }} {!! empty($order?->subscription_id) ? formatAmount($order?->admin_commission) : formatAmount(0) !!} @if( !empty($order?->items?->first()?->extra_fee)) {!! empty($order?->subscription_id) ? formatAmount($order?->items?->first()?->extra_fee) : formatAmount(0) !!} @else - @endif
{{ $order?->status}}
{{ $orders->links('pagination.custom') }} @else @endif
@push('scripts') @endpush