@extends('website.layouts.master')
@section('content')
@lang('header.address') :
{{ $order->address->address }}
@lang('header.state') :
{{ $order->address->state }}
@lang('header.extranote') :
@if ($order->address->building || $order->address->floor_number || $order->address->apartment_number)
@lang('header.note') :
{{ $order->address->notes ?? __('header.nonote') }}
@lang('header.phone') :
{{ $order->address->address_phone ?? __('header.nophone') }}
@lang('header.noaddress') @lang('header.name') : {{ $order->client?->name }}
@lang('header.paymentmethod')
@switch($transaction->payment_method)
@case('cash')
@lang('header.cash')
@break
@case('credit_card')
@lang('header.credit_card')
@break
@case('online')
@lang('header.online')
@break
@default
@lang('header.cash')
@endswitch
@lang('header.nopaymentmethod')
@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 }}
@lang('header.totalorder')
@php
$subTotalPrice = $order->total_price_befor_tax;
if ($order->tax_application == 1) {
$subTotalPrice += $order->tax_value;
}
@endphp
{{ $subTotalPrice }}
{{ $order->Branch->country->currency_symbol }}
@lang('header.coupon')
-{{ $order->coupon_value }}
{{ $order->Branch->country->currency_symbol }}
@lang('header.feesdelivery') {{ $order->delivery_fees ?? 0 }}
{{ $order->Branch->country->currency_symbol }} @lang('header.includefees')
{{ number_format(($order->tax_value / $order->total_price_befor_tax) * 100, 2) . '%' }}
@lang('header.anotherway')
{{ $order->tax_value }}
{{ $order->Branch->country->currency_symbol }}
@lang('header.notincludefees')
{{ app()->getLocale() === 'ar' ? $order->branch->address_ar : $order->branch->address_en }}
{{ app()->getLocale() === 'ar' ? $order->branch->name_ar : $order->branch->name_en }}
@lang('header.paymentmethod')
@switch($transaction->payment_method)
@case('cash')
@lang('header.cash')
@break
@case('credit_card')
@lang('header.credit_card')
@break
@case('online')
@lang('header.online')
@break
@default
@lang('header.cash')
@endswitch
@lang('header.nopaymentmethod')
@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 }}
@lang('header.totalorder')
@php
$basePrice = $order->total_price_befor_tax;
$couponDiscount = 0;
if ($order->coupon_id) {
if ($order->coupon->type === 'percentage') {
$couponDiscount =
($basePrice * $order->coupon->value) / 100;
} elseif ($order->coupon->type === 'fixed') {
$couponDiscount = $order->coupon->value;
}
}
$subTotalPrice = $basePrice + $couponDiscount;
if ($order->tax_application == 1) {
$subTotalPrice += $order->tax_value;
}
@endphp
{{ $subTotalPrice }}
{{ $order->Branch->country->currency_symbol }}
@lang('header.coupon')
-{{ ($order->total_price_befor_tax * $order->coupon->value) / 100 }}
{{ $order->Branch->country->currency_symbol }}
-{{ $order->coupon->value }}
{{ $order->Branch->country->currency_symbol }}
@lang('header.includefees')
{{ number_format(($order->tax_value / $order->total_price_befor_tax) * 100, 2) . '%' }}
@lang('header.anotherway')
{{ $order->tax_value }}
{{ $order->Branch->country->currency_symbol }}
@lang('header.notincludefees')
@lang('order.withoutDeposit') @lang('order.withDeposit')
({{ $reservation->transaction->paid }}
{{ $reservation->branch->country->currency_symbol }})
@lang('order.paidOnline')
@lang('order.paidCash')
@lang('order.paidCredit')
@lang('order.withoutDeposit') @lang('order.withDeposit')
({{ $reservation->order->transaction->paid }}
{{ $reservation->branch->country->currency_symbol }})
@lang('order.paidOnline')
@lang('order.paidCash')
@lang('order.paidCredit')
@lang('order.wholeDeposit')
({{ $reservation->order->transaction->paid }}
{{ $reservation->branch->country->currency_symbol }})
@lang('order.paidOnline')
@lang('order.paidCash')
@lang('order.paidCredit')
@if ($reservation->order->tax_application == 0)
{{ $detail->price_befor_tax + $addons->sum(fn($addon) => $addon->price_before_tax) }}
@else
{{ $detail->price_after_tax + $addons->sum(fn($addon) => $addon->price_after_tax) }}
@endif
{{ $reservation->order->Branch->country->currency_symbol }}
@lang('header.totalorder')
@php
$basePrice = $reservation->order->total_price_befor_tax;
$couponDiscount = 0;
if ($reservation->order->coupon_id) {
if (
$reservation->order->coupon->type ===
'percentage'
) {
$couponDiscount =
($basePrice *
$reservation->order->coupon->value) /
100;
} elseif (
$reservation->order->coupon->type === 'fixed'
) {
$couponDiscount =
$reservation->order->coupon->value;
}
}
$subTotalPrice = $basePrice + $couponDiscount;
if ($reservation->order->tax_application == 1) {
$subTotalPrice += $reservation->order->tax_value;
}
@endphp
{{ $subTotalPrice }}
{{ $reservation->order->Branch->country->currency_symbol }}
@lang('header.coupon')
-{{ ($reservation->order->total_price_befor_tax * $order->coupon->value) / 100 }}
{{ $reservation->order->Branch->country->currency_symbol }}
-{{ $reservation->order->coupon->value }}
{{ $reservation->order->Branch->country->currency_symbol }}
@lang('header.serviceFees') {{ $reservation->order->service_fees ?? 0 }}
{{ $reservation->order->Branch->country->currency_symbol }}
@lang('header.includefees')
{{ number_format(($order->tax_value / $order->total_price_befor_tax) * 100, 2) . '%' }}
@lang('header.anotherway')
{{ $reservation->order->tax_value }}
{{ $reservation->order->Branch->country->currency_symbol }}
@lang('header.notincludefees')
@lang('header.orderstatus')
@php
$lastTrackingStatus = $order->tracking->last()?->order_status;
@endphp
@if ($order->status === 'pending')
@endif
@lang('header.deliverytimeexpect')
@if ($fromTime && $toTime)
{{ $fromTime ? $fromTime->format('h:i') : 'N/A' }}
@lang($fromTime && $fromTime->format('A') === 'AM' ? 'header.am' : 'header.pm') -
{{ $toTime ? $toTime->format('h:i') : 'N/A' }}
@lang($toTime && $toTime->format('A') === 'AM' ? 'header.am' : 'header.pm')
@endif
@lang('header.ordernum') {{ $order->order_number }}
@lang('header.orderSummary')
@lang('header.deliveryinfo')
@if ($order->address)
@endif
@if ($order->address->floor_number)
{{ __('header.floor') }}:
{{ $order->address->floor_number }}
@endif
@if ($order->address->apartment_number)
{{ __('header.apartment') }}:
{{ $order->address->apartment_number }}
@endif
@lang('header.paymentinfo')
@if ($order->orderTransactions->isNotEmpty())
@foreach ($order->orderTransactions as $transaction)
@lang('header.orderdetails')
@foreach ($order->orderDetails as $detail)
@php
$addons = $order->orderAddons->filter(
fn($addon) => $addon->order_details_id == $detail->id &&
$addon->Addon?->addons?->name_ar,
);
@endphp
@lang('header.reset')
@lang('header.total')
{{ $order->total_price_after_tax }}
{{ $order->Branch->country->currency_symbol }}
@lang('order.contactRestaurant')
@lang('order.contactDriver')
{{ $order->delivery?->first_name . ' ' . $order->delivery?->last_name }}
@lang('auth.noorders')
@lang('header.orderstatus')
@php
$lastTrackingStatus = $order->tracking->last()?->order_status;
@endphp
@if ($order->status === 'pending')
@endif
@lang('header.orderSummary')
@lang('header.pickupFrom')
@lang('header.paymentinfo')
@if ($order->orderTransactions->isNotEmpty())
@foreach ($order->orderTransactions as $transaction)
@lang('header.orderdetails')
@foreach ($order->orderDetails as $detail)
@php
$addons = $order->orderAddons->filter(
fn($addon) => $addon->order_details_id == $detail->id &&
$addon->Addon?->addons?->name_ar,
);
@endphp
@lang('header.reset')
@lang('header.total')
{{ $order->total_price_after_tax }}
{{ $order->Branch->country->currency_symbol }}
@lang('auth.noorders')
@lang('header.orderstatus')
@lang('order.arrivingTime')
{{ $reservation->time_from ? $reservation->time_from->format('h:i') : 'N/A' }}
@lang($reservation->time_from->format('A') === 'AM' ? 'header.am' : 'header.pm')
{{ $reservation->reservation_number }}
@lang('order.reservationConfirmed')
@lang('header.orderSummary')
@lang('header.paymentinfo')
@if ($reservation->reservation_type == 'without')
@if ($reservation->transaction->payment_status == 'unpaid')
@lang('header.orderdetails')
@lang('order.table')
({{ $reservation->tables->table_number }})
@lang('order.arrival'):
{{ $reservation->time_from ? $reservation->time_from->format('h:i') : 'N/A' }}
@lang($reservation->time_from->format('A') === 'AM' ? 'header.am' : 'header.pm')
{{ $reservation->date->translatedFormat('j F , Y') }}
{{ $reservation->adult + $reservation->men + $reservation->women }}@lang('order.person')
@if ($reservation->kids != 0)
,{{ $reservation->kids }}@lang('order.kid')
@endif
@if ($reservation->tables->type == 1)
@lang('order.inside')
@else
@lang('order.outside')
@endif
@lang('order.leaving'):
{{ $reservation->time_to ? $reservation->time_to->format('h:i') : '' }}
@lang($reservation->time_to ? ($reservation->time_to->format('A') === 'AM' ? 'header.am' : 'header.pm') : 'order.noTime')
@lang('header.reset')
@lang('header.total')
{{ $reservation->order->total_price_after_tax }}
{{ $reservation->order->Branch->country->currency_symbol }}
@lang('order.contactRestaurant')
@lang('auth.noorders')