@lang('order.orders')
@if (session('message'))
{{ session('message') }}
@endif @php $hasCancelledOrders = $orders->contains('last_status', 'cancelled'); @endphp @foreach ($orders as $order) {{-- --}} @if ($order->status === 'cancelled' && $order->cancellationReasons->isNotEmpty()) @else @endif @endforeach
@lang('order.ID') @lang('order.invoice_num') @lang('order.date') @lang('order.type') @lang('order.branch') @lang('order.client') @lang('order.total_price') @lang('order.status') @lang('order.status_paid') @lang('order.payment_method') @lang('order.reasons') @lang('order.type2') @lang('order.user_id') @lang('order.actions')
{{ $order->id }} {{ $order->invoice_number }} {{ $order->date }} @lang('order.' . strtolower($order->type)) {{ $order->branch ? (app()->getLocale() === 'ar' ? $order->branch->name_ar : $order->branch->name_en) : __('order.none') }} {{ $order->responsible_person }}{{ $order->client->name ?? __('order.client_deleted') }}{{ $order->total_price_after_tax }} {{ $order->branch->country->currency_symbol }} @if ($order->last_status == 'packing') @lang('order.readyForPickup') @else @lang('order.' . strtolower($order->last_status)) @endif @if ($order->transaction) @lang('order.' . strtolower($order['transaction']['payment_status'])) @else ----- @endif @if ($order->transaction) @lang('order.' . strtolower($order['transaction']['payment_method'])) @else ----- @endif @foreach ($order->cancellationReasons as $reason) {{ $reason->localized_reason }} @if (!$loop->last) , @endif @endforeach @foreach ($order->cancellationReasons as $reason) {{ $reason->type ?? '-----' }} @if (!$loop->last) , @endif @endforeach @foreach ($order->cancellationReasons as $reason) {{ $reason->user->name ?? 'N/A' }} @if (!$loop->last) , @endif @endforeach ----- ----- ----- @if (auth('admin')->user()->hasPermissionTo('detail report_cancelled_orders', 'admin')) @lang('order.show') @endif