@lang('modules.settings.orderDetails')

@if ($order->order_status->value === 'cancelled')

@lang('modules.order.info_cancelled')

@lang('modules.order.orderCancelledMessage')

@else @php $steps = match($order->order_type) { 'delivery' => ['placed', 'confirmed', 'preparing', 'out_for_delivery', 'delivered'], 'pickup' => ['placed', 'confirmed', 'preparing', 'ready_for_pickup', 'delivered'], default => ['placed', 'confirmed', 'preparing', 'served'] }; $currentStepIndex = array_search($order->order_status->value, $steps); @endphp
@foreach($steps as $index => $status)
$loop->first, 'items-end text-end' => $loop->last, 'items-center text-center' => !$loop->first && !$loop->last, ])>
@if(!$loop->first)
$index <= $currentStepIndex, 'bg-gray-200 dark:bg-gray-700' => $index > $currentStepIndex, ])>
@endif $index <= $currentStepIndex, 'bg-gray-100 dark:bg-gray-700' => $index > $currentStepIndex, ])> @if($index <= $currentStepIndex) @else @php $svgBase = 'class="w-4 h-4" fill="none" viewBox="0 0 24 24"'; $pathBase = 'stroke="currentColor" stroke-linecap="round" stroke-width="2"'; @endphp @switch($status) @case('placed') @break @case('confirmed') @break @case('preparing') @break @case('out_for_delivery') @break @case('ready_for_pickup') @break @case('delivered') @break @case('served') @break @default @endswitch @endif @if(!$loop->last)
$index <= $currentStepIndex, 'bg-gray-200 dark:bg-gray-700' => $index > $currentStepIndex, ])>
@endif

$index <= $currentStepIndex, 'text-gray-500 dark:text-gray-400' => $index > $currentStepIndex, ])> {{ __('modules.order.' . App\Enums\OrderStatus::from($status)->label()) }}

@endforeach
@endif

@lang('modules.order.orderNumber'): #{{ $order->order_number }}

@php $svgPath = match($order->order_type) { 'delivery' => 'M9 17a2 2 0 11-4 0 2 2 0 014 0zM19 17a2 2 0 11-4 0 2 2 0 014 0z M13 16V6a1 1 0 00-1-1H4a1 1 0 00-1 1v10a1 1 0 001 1h1m8-1a1 1 0 01-1 1H9m4-1V8a1 1 0 011-1h2.586a1 1 0 01.707.293l3.414 3.414a1 1 0 01.293.707V16a1 1 0 01-1 1h-1m-6-1a1 1 0 001 1h1M5 17a2 2 0 104 0m7-5l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2', 'pickup' => 'M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z', default => 'M15 11v.01M16 20h-8c-2.76 0-5-2.24-5-5s2.24-5 5-5h8c2.76 0 5 2.24 5 5s-2.24 5-5 5zM3 11h18M12 4v3M8.5 7h7' }; @endphp {{ __('modules.order.' . $order->order_type) }}
{{ $order->date_time->timezone(timezone())->translatedFormat('M d, Y h:i A') }}
{{ $order->items->count() }} @lang('modules.menu.item')
@if($order->table_id)
@lang('modules.settings.tableNumber') {{ $order->table->table_code ?? '--' }}
@endif
{{ currency_format($order->total, $restaurant->currency_id) }}
@lang('modules.order.includeTax')
@php $maxPreparationTime = $order->items->max(function($item) { return $item->menuItem->preparation_time; }); @endphp @if ($maxPreparationTime)
@lang('modules.menu.preparationTime'): {{ $maxPreparationTime }} @lang('modules.menu.minutes') (@lang('app.approx'))
@endif
@foreach ($order->items as $item)
{{ $item->menuItem->item_name }}
{{ $item->menuItem->item_name }}
@if(isset($item->menuItemVariation)) {{ $item->menuItemVariation->variation }} @endif
{{ currency_format($item->price + $item->modifierOptions->sum('price'), $restaurant->currency_id) }} × {{ $item->quantity }}
{{ currency_format(($item->price + $item->modifierOptions->sum('price')) * $item->quantity, $restaurant->currency_id) }}
@if($item->modifierOptions->isNotEmpty())
@foreach ($item->modifierOptions as $modifier) {{ $modifier->name }} ({{ currency_format($modifier->price, $restaurant->currency_id) }}) @endforeach
@endif
@endforeach
@lang('modules.order.subTotal') {{ currency_format($order->sub_total, $restaurant->currency_id) }}
@if (!is_null($order->discount_amount))
@lang('modules.order.discount') @if ($order->discount_type == 'percent') ({{ rtrim(rtrim(number_format($order->discount_value, 2), '0'), '.') }}%) @endif
-{{ currency_format($order->discount_amount, $restaurant->currency_id) }}
@endif @foreach ($order->charges as $item)
{{ $item->charge->charge_name }} @if ($item->charge->charge_type == 'percent') ({{ $item->charge->charge_value }}%) @endif
{{ currency_format(($item->charge->getAmount($order->sub_total - ($order->discount_amount ?? 0))) , $restaurant->currency_id) }}
@endforeach @foreach ($order->taxes as $item)
{{ $item->tax->tax_name }} ({{ $item->tax->tax_percent }}%) {{ currency_format(($item->tax->tax_percent / 100) * ($order->sub_total - ($order->discount_amount ?? 0)), $restaurant->currency_id) }}
@endforeach @if ($canAddTip || $order->tip_amount > 0)
@lang('modules.order.tip') @if($order->tip_amount > 0 && $order->tip_note)

"{{ $order->tip_note }}"

@endif
@if($order->tip_amount > 0 && !$canAddTip) {{ currency_format($order->tip_amount, $restaurant->currency_id) }} @endif @if($canAddTip) @if($order->tip_amount > 0) {{ currency_format($order->tip_amount, $restaurant->currency_id) }} @else @lang('modules.order.addTip') @endif @endif
@endif
@lang('modules.order.total') {{ currency_format($order->total, $restaurant->currency_id) }}

@lang('modules.order.paymentInformation')

@php $isSubdomainEnabled = function_exists('module_enabled') && module_enabled('Subdomain'); if (in_array($order->status, ['paid', 'pending_verification', 'canceled', 'delivered'])) { $newOrderLink = $order->table_id ? route('table_order', [$order->table->hash]) : ($isSubdomainEnabled ? url('/') : route('shop_restaurant', ['hash' => $restaurant->hash])); } else { $newOrderLink = ($isSubdomainEnabled ? url('/') : route('shop_restaurant', ['hash' => $restaurant->hash])) . '?current_order=' . $order->id; } @endphp @if($order->payments->count())
@foreach($order->payments as $payment)
@switch($payment->payment_method) @case('stripe') @break @case('razorpay') @break @case('upi') @break @default @endswitch

@lang('modules.order.' . $payment->payment_method)

{{ $payment->created_at->timezone(timezone())->translatedFormat('M d, Y h:i A') }}

@if($payment->transaction_id)

@lang('modules.order.transactionId'): {{ $payment->transaction_id }}

@endif
{{ currency_format($payment->amount, $restaurant->currency_id) }} @if($payment->balance > 0)

@lang('modules.order.balanceReturn'): {{ currency_format($payment->balance, $restaurant->currency_id) }}

@endif
@endforeach
@endif @if($order->status == 'paid') @lang('modules.order.paid') @lang('modules.order.newOrder') @else @if ($order->status === 'pending_verification') @lang('modules.order.pendingPaymentVerification') @else @lang('modules.order.paymentPending') @endif
@if (is_null($customer) && ($restaurant->customer_login_required || $orderType == 'delivery')) @lang('app.next') @else
@if ($paymentGateway->is_qr_payment_enabled || $paymentGateway->stripe_status || $paymentGateway->razorpay_status || $paymentGateway->is_offline_payment_enabled) @if ($order && $order->order_status->value !== 'cancelled' && $order->status !== 'pending_verification') @lang('modules.order.payNow') @endif @endif @lang('modules.order.newOrder')
@endif
@endif
@lang('modules.order.chooseGateway')
@lang('modules.order.orderNumber') #{{ $paymentOrder->order_number }}
{{ currency_format($total, $restaurant->currency_id) }}
@if ($showQrCode || $showPaymentDetail) @lang('modules.billing.showOtherPaymentOption')
@if ($showQrCode) QR Code Preview @else @lang('modules.billing.accountDetails') {{ $paymentGateway->offline_payment_detail }} @endif
@else
@if ($paymentGateway->stripe_status) @endif @if ($paymentGateway->razorpay_status) @endif @if ($paymentGateway->is_qr_payment_enabled && $paymentGateway->qr_code_image_url) @lang('modules.billing.paybyQr') @endif @if ($paymentGateway->is_offline_payment_enabled && $paymentGateway->offline_payment_detail) @lang('modules.billing.bankTransfer') @endif @if($paymentGateway->is_cash_payment_enabled) @lang('modules.order.payViaCash') @endif
@endif
@if ($showQrCode || $showPaymentDetail) @lang('modules.billing.paymentDone') @endif
@lang('modules.order.addTip')
@lang('modules.order.currentTotal') {{ currency_format($order->total - $order->tip_amount, $restaurant->currency_id) }}
@lang('modules.order.tipAmount') + {{ currency_format($tipAmount ?? 0, $restaurant->currency_id) }}
@lang('modules.order.newTotal') {{ currency_format(($order->total - $order->tip_amount + ($tipAmount ?: 0)), $restaurant->currency_id) }}
@foreach ([5, 10, 15, 20] as $percentage) @php $calculatedTip = round($order->sub_total * $percentage / 100, 2); @endphp @endforeach
{{ $restaurant->currency->currency_symbol }}
@lang('app.cancel') @lang('app.save')
@script @endscript