@lang('order.order_number') - #{{ $order->order_number }}
@if ($order->orderDetails) @forelse ($order->orderDetails as $detail) @php $addons = $order->orderAddons->filter( fn($addon) => $addon->order_details_id == $detail->id && $addon->Addon?->addons?->name_ar, ); @endphp @empty @endforelse @endif
@lang('order.image') @lang('order.item') @lang('order.size') @lang('order.order_addons') @lang('order.quantity') @lang('order.total_price') @lang('order.notes')
@if ($detail->dish && $detail->dish->image) Dish Image @else @lang('order.no_image') @endif @if ($detail->dish) {{ app()->getLocale() === 'ar' ? $detail->dish->name_ar : $detail->dish->name_en }} @else @lang('order.dish_not_found') @endif @if ($detail->dish && $detail->dishSize) {{ app()->getLocale() === 'ar' ? $detail->dishSize->size_name_ar : $detail->dishSize->size_name_en }} @else {{ __('order.nosize') }} @endif @if ($addons->isNotEmpty()) {{ $addons->map(fn($addon) => app()->getLocale() === 'ar' ? $addon->Addon->addons->name_ar : $addon->Addon->addons->name_en)->implode(', ') }} @else {{ __('order.noaddons') }} @endif {{ $detail->quantity }} @if ($order->tax_application == 0) {{ $detail->price_befor_tax + $addons->sum('price_before_tax') }} @else {{ $detail->price_after_tax + $addons->sum('price_after_tax') }} @endif {{ $order->Branch->country->currency_symbol }}

{{ $detail->note ?? __('order.nonotes') }}
@lang('order.no_details')
@lang('order.order_status')
  • @lang('order.order_trackings')
    @lang('order.' . strtolower($tracking->order_status ?? 'unknown')) {{ $tracking->created_at->format('d-m-Y H:i') }}
  • @lang('order.payment_method')
    @lang('order.' . strtolower($transaction->payment_method ?? 'unknown'))
  • @lang('order.status_paid')
    @lang('order.' . strtolower($transaction->payment_status ?? 'unknown'))
  • @if ($cancellationReason)
  • @lang('order.comments')
    {{ $cancellationReason->reason }}
  • @endif @if ($cancellationReason)
  • @lang('order.reasons')
    @foreach ($order->cancellationReasons as $cancellationReason) {{ app()->isLocale('ar') ? $cancellationReason->reasonModel->reason_ar : $cancellationReason->reasonModel->reason_en }} @endforeach
  • @endif
@lang('order.client_details')
@if ($order->client)
  • @lang('order.name'): {{ $order->responsible_person ?? __('order.unknown') }}
  • @lang('order.email'): {{ $order->responsible_person_email ?? __('order.unknown') }}
  • @lang('order.phone'): {{ $order->responsible_person_phone ?? __('order.unknown') }}
  • @lang('order.flag'): {{ $order->responsible_person_flag ?? __('order.unknown') }}
@else @lang('order.client_deleted') @endif
@if ($order->address)
@lang('order.delivery_address')
  • @lang('order.address'): {{ $order->address->address ?? __('order.unknown') }}
  • @lang('order.city'): {{ $order->address->city ?? __('order.unknown') }}
  • @lang('order.state'): {{ $order->address->state ?? __('order.unknown') }}
  • @lang('order.zip'): {{ $order->address->postal_code ?? __('order.unknown') }}
@endif
@lang('order.payment_summary')
@lang('order.sub_total') @if ($order->tax_application == 0) {{ $order->total_price_befor_tax }} @else {{ $order->total_price_befor_tax + $order->tax_value }} @endif {{ $order->Branch->country->currency_symbol }}

@if ($order->coupon_id)
@lang('header.coupon') @if ($order->coupon->type === 'percentage') -{{ ($order->total_price_befor_tax * $order->coupon->value) / 100 }} {{ $order->Branch->country->currency_symbol }} @elseif ($order->coupon->type === 'fixed') -{{ $order->coupon->value }} {{ $order->Branch->country->currency_symbol }} @endif
@endif
@lang('header.feesdelivery') {{ $order->delivery_fees ?? 0 }} {{ $order->Branch->country->currency_symbol }}

@lang('header.serviceFees') {{ $order->service_fees ?? 0 }} {{ $order->Branch->country->currency_symbol }}

@lang('header.taxPercentage') {{ number_format(($order->tax_value / $order->total_price_befor_tax) * 100, 2) }}%

{{--
@if ($order->tax_value != 0.0 && $order->tax_value != null && $order->total_price_befor_tax == $order->total_price_after_tax) @lang('header.includefees') {{ $order->tax_value / $order->total_price_befor_tax) * 100, 2) . '%' }} @lang('header.anotherway') {{ $order->tax_value }} {{ $order->Branch->country->currency_symbol }}

@endif
--}}
@lang('order.total') {{ number_format($order->total_price_after_tax, 2) }} {{ $order->Branch->country->currency_symbol }}

@lang('order.ordernotes')
{{ $order->note ?? __('order.nonotes') }}