@if(!isOrderPrefixEnabled()) @lang('modules.order.orderNumber') #{{ $orderNumber }} @else {{ $formattedOrderNumber }} @endif
@if ($orderType == 'dine_in')
@if (!is_null($tableNo)) {{ $tableNo }} @if (user_can('Update Order')) @endif @elseif(user_can('Update Order')) @lang('modules.order.setTable') @endif
@endif
@if ($orderType == 'dine_in')
@lang('modules.order.noOfPax')
@if (auth()->user()->roles->pluck('display_name')->contains('Waiter') || $this->isWaiterLocked)
@lang('modules.order.waiter'): {{ $this->waiterName }}
@elseif(user_can('Update Order'))
@foreach ($users as $item) @endforeach
@elseif($this->currentWaiter)
@lang('modules.order.waiter'): {{ $this->waiterName }}
@endif @endif @if ($orderType == 'delivery' && user_can('Update Order'))
@foreach ($deliveryExecutives as $item) @endforeach
@endif @if ($orderType == 'pickup')
@endif
@if ($orderStatus->value === 'cancelled') @lang('modules.order.info_cancelled') @else
@php $statuses = match ($orderType) { 'delivery' => ['placed', 'confirmed', 'preparing', 'food_ready','picked_up', 'out_for_delivery', 'reached_destination', 'delivered'], 'pickup' => ['placed', 'confirmed', 'preparing', 'ready_for_pickup', 'delivered'], default => ['placed', 'confirmed', 'preparing', 'food_ready', 'served'], }; $currentIndex = array_search($orderStatus->value, $statuses); $currentIndex = $currentIndex !== false ? $currentIndex : 0; $nextIndex = min($currentIndex + 1, count($statuses) - 1); @endphp

{{ __('modules.order.orderStatus') }}

$orderStatus->value === 'delivered' || $orderStatus->value === 'served', 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300' => $orderStatus->value === 'placed', 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300' => $orderStatus->value !== 'delivered' && $orderStatus->value !== 'served' && $orderStatus->value !== 'placed', ])> {{ App\Enums\OrderStatus::from($orderStatus->value)->translatedLabel() }}
@foreach ($statuses as $index => $status)
{!! App\Enums\OrderStatus::from($status)->icon() !!}
@endforeach
@if (user_can('Update Order'))
@if ($orderStatus->value === 'placed') {{ __('modules.order.cancelOrder') }} @endif @if ($currentIndex < count($statuses) - 1) {{ __('modules.order.moveTo') }} {{ App\Enums\OrderStatus::from($statuses[$nextIndex])->translatedLabel() }} @endif
@endif
@endif @foreach ($kotList as $kot) @php $hasItems = false; foreach ($orderItemList as $key => $item) { if (strpos($key, 'kot_' . $kot->id) !== false) { $hasItems = true; break; } } @endphp @if ($hasItems)
@lang('menu.kot') #{{ $kot->kot_number }}
{{ $kot->created_at->timezone(timezone())->translatedFormat('d F, h:i A') }}
@php // Count items that belong to this KOT $kotItemCount = 0; foreach ($orderItemList as $key => $item) { $kotPrefix = 'kot_' . $kot->id; if (strpos($key, $kotPrefix) !== false) { $kotItemCount++; } } @endphp @forelse ($orderItemList as $key => $item) @php // Check if this item belongs to the current KOT // Keys are formatted as: "kot_{kot_id}_{item_id}" (with quotes) $kotPrefix = 'kot_' . $kot->id; $belongsToKot = strpos($key, $kotPrefix) !== false; @endphp @continue(!$belongsToKot) @php $itemName = $item->item_name; $itemVariation = (isset($orderItemVariation[$key]) ? $orderItemVariation[$key]->variation : ''); $displayPrice = $this->getItemDisplayPrice($key); // Get amount and stamp info from kot_items table for KOT orders $totalAmount = $orderItemAmount[$key] ?? 0; // Default to component property (dynamic) $isFreeItem = false; $hasDiscount = false; $discountAmount = 0; $originalAmount = 0; $kotItem = null; $itemFoundInDatabase = false; // CRITICAL: Track if we found item in DB $hasStampRule = false; if (isset($orderID) && $orderID && isset($orderDetail) && $orderDetail && $orderDetail->status === 'kot') { // Extract kot_item_id from key (format: "kot_{kot_id}_{item_id}") $keyParts = explode('_', trim($key, '"')); if (count($keyParts) >= 3 && $keyParts[0] === 'kot') { $kotItemId = (int)($keyParts[2] ?? 0); if ($kotItemId > 0) { try { // Load kot items if not already loaded (ensure all fields are loaded) if (!$kot->relationLoaded('items')) { $kot->load('items'); } // Find the kot_item from the loaded relationship // Try both id and direct access $kotItem = $kot->items->firstWhere('id', $kotItemId); // If not found by id, try to find by matching menu_item_id and variation if (!$kotItem) { $menuItemId = $item->id ?? null; $variationId = isset($orderItemVariation[$key]) ? $orderItemVariation[$key]->id : null; $kotItem = $kot->items->first(function($ki) use ($menuItemId, $variationId) { return $ki->menu_item_id == $menuItemId && ($variationId ? $ki->menu_item_variation_id == $variationId : is_null($ki->menu_item_variation_id)); }); } if ($kotItem) { $itemFoundInDatabase = true; // Found in database // Prefer dynamic component amount when qty changes, but keep DB discount $dbAmount = (float)($kotItem->amount ?? 0); if (isset($orderItemAmount[$key]) && $orderItemAmount[$key] !== null && $orderItemAmount[$key] !== '') { $liveAmount = (float)$orderItemAmount[$key]; // If live amount equals expected full price and DB has a lower discounted amount, keep DB $basePrice = (float)($kotItem->getAttribute('price') ?? $kotItem->price ?? ($item->price ?? 0)); $modifierPrice = 0; if ($kotItem->relationLoaded('modifierOptions')) { $modifierPrice = (float)$kotItem->modifierOptions->sum('price'); } $qty = isset($orderItemQty[$key]) ? (int)$orderItemQty[$key] : (int)($kotItem->quantity ?? 1); $expectedFull = ($basePrice + $modifierPrice) * $qty; if ($dbAmount > 0 && $dbAmount < $expectedFull - 0.01 && abs($liveAmount - $expectedFull) < 0.01) { $totalAmount = $dbAmount; } else { $totalAmount = $liveAmount; } } else { $totalAmount = $dbAmount; } // STRICT CHECK: Only true if database value is exactly 1, true, or '1' // Explicitly check for 0, false, null, '0', '' and set to false $dbFreeValue = $kotItem->getAttribute('is_free_item_from_stamp') ?? $kotItem->is_free_item_from_stamp ?? null; // Explicitly check: if value is 0, false, null, '0', or empty string, it's NOT free if ($dbFreeValue === 0 || $dbFreeValue === false || $dbFreeValue === null || $dbFreeValue === '0' || $dbFreeValue === '') { $isFreeItem = false; } else { // Only mark as free if value is exactly 1, true, or '1' $isFreeItem = ($dbFreeValue === 1 || $dbFreeValue === true || $dbFreeValue === '1'); } // Only show stamp discount if a stamp rule is present $hasStampRule = !empty($kotItem->stamp_rule_id); // Check for discount from stamp - use dynamic values for display if ($hasStampRule) { $discountAmount = (float)($kotItem->getAttribute('discount_amount') ?? $kotItem->discount_amount ?? 0); $isDiscounted = (bool)($kotItem->getAttribute('is_discounted') ?? $kotItem->is_discounted ?? false); $hasDiscount = $discountAmount > 0 || $isDiscounted; } // Calculate expected/original amount from DB price + modifiers $basePrice = (float)($kotItem->getAttribute('price') ?? $kotItem->price ?? ($item->price ?? 0)); $modifierPrice = 0; if ($kotItem->relationLoaded('modifierOptions')) { $modifierPrice = (float)$kotItem->modifierOptions->sum('price'); } $qty = isset($orderItemQty[$key]) ? (int)$orderItemQty[$key] : (int)($kotItem->quantity ?? 1); $expectedAmount = ($basePrice + $modifierPrice) * $qty; if ($hasStampRule && $expectedAmount > $totalAmount + 0.01) { $hasDiscount = true; $discountAmount = max(0, round($expectedAmount - $totalAmount, 2)); $originalAmount = $expectedAmount; } elseif ($isFreeItem) { // For free items, calculate original amount from price $originalAmount = $expectedAmount; } } } catch (\Exception $e) { // Fallback to component property if error } } } } // Compute dynamic discount display using current in-memory amounts if (!$isFreeItem && !$itemFoundInDatabase) { $basePrice = $orderItemVariation[$key]->price ?? $orderItemList[$key]->price ?? 0; $modifierPrice = isset($orderItemModifiersPrice[$key]) ? (float)$orderItemModifiersPrice[$key] : 0; $qty = isset($orderItemQty[$key]) ? (int)$orderItemQty[$key] : 1; $expectedAmount = ($basePrice + $modifierPrice) * $qty; $hasStampIndicator = (strpos($key, 'free_stamp_') === 0) || (isset($itemNotes[$key]) && stripos($itemNotes[$key] ?? '', 'stamp') !== false); if ($hasStampIndicator && $totalAmount < $expectedAmount) { $hasDiscount = true; $discountAmount = max(0, round($expectedAmount - $totalAmount, 2)); $originalAmount = $expectedAmount; } } // FALLBACK: Only use key pattern or notes if item was NOT found in database // This is ONLY for draft orders or items not yet saved to database // CRITICAL: Only check fallback if we didn't find the item in database // IMPORTANT: If item was found in database, NEVER use fallback - database value is final if (!$itemFoundInDatabase) { // Only check key pattern for draft orders (when orderID might not be set or order is draft) $isDraftOrder = !isset($orderID) || !$orderID || (isset($orderDetail) && $orderDetail && $orderDetail->status === 'draft'); if ($isDraftOrder) { // Only check key pattern if not already set from database // Reset to false first to ensure clean state $isFreeItem = false; $isFreeItem = strpos($key, 'free_stamp_') === 0 || (isset($itemNotes[$key]) && strpos($itemNotes[$key] ?? '', 'FREE') !== false); } else { // For non-draft orders, if item not found in DB, it's definitely NOT free $isFreeItem = false; } } // FINAL SAFEGUARD: If item was found in database, $isFreeItem is already set correctly above - do NOT override // If item was NOT found and it's not a draft order, ensure it's false if ($itemFoundInDatabase && !$isFreeItem) { // Explicitly ensure it stays false - database said it's not free $isFreeItem = false; } @endphp
{{ $itemName }} @if ($isFreeItem) @lang('app.freeItem') @elseif($hasDiscount && $discountAmount > 0) @lang('app.stampDiscount') (-{{ currency_format($discountAmount, restaurant()->currency_id) }}) @endif
@if (!empty($itemVariation)) • {{ $itemVariation }} @endif @if (!empty($itemModifiersSelected[$key]))
@foreach ($itemModifiersSelected[$key] as $modifierOptionId)
{{ $this->modifierOptions[$modifierOptionId]->name }} {{ currency_format($this->modifierOptions[$modifierOptionId]->price , restaurant()->currency_id) }}
@endforeach
@endif @if (!empty($itemNotes[$key])) @php $noteSegments = array_filter(array_map('trim', explode('|', $itemNotes[$key]))); $noteSegments = array_filter($noteSegments, function ($segment) { return stripos($segment, 'stamp discount') === false; }); $cleanNotes = trim(implode(' | ', $noteSegments)); @endphp @if($cleanNotes !== '')
{{ $cleanNotes }}
@endif @endif
@if ($isFreeItem)
{{ currency_format(0, restaurant()->currency_id) }}
@if($originalAmount > 0)
{{ currency_format($originalAmount, restaurant()->currency_id) }}
@endif
@elseif($hasDiscount && $discountAmount > 0)
{{ currency_format($totalAmount, restaurant()->currency_id) }}
@if($originalAmount > 0)
{{ currency_format($originalAmount, restaurant()->currency_id) }}
@endif
@else
{{ currency_format($displayPrice, restaurant()->currency_id) }}
{{ currency_format($totalAmount, restaurant()->currency_id) }}
@endif
@if (user_can('Delete Order')) @endif
@empty
@lang('messages.noItemAdded')
@endforelse
@endif @endforeach @if (count($orderItemList) === 0 && isset($orderDetail) && $orderDetail && $orderDetail->status === 'kot') @php $fallbackKotItems = collect(); if (!$orderDetail->relationLoaded('kot')) { $orderDetail->load('kot.items.menuItem', 'kot.items.menuItemVariation', 'kot.items.modifierOptions'); } foreach ($orderDetail->kot as $kot) { $fallbackKotItems = $fallbackKotItems->merge($kot->items->where('status', '!=', 'cancelled')); } @endphp @foreach ($fallbackKotItems as $kotItem)
{{ $kotItem->menuItem->item_name ?? __('app.item') }}
{{ __('modules.order.qty') }}: {{ $kotItem->quantity }}
{{ currency_format((float)($kotItem->amount ?? 0), restaurant()->currency_id) }}
@endforeach @endif
@if (count($orderItemList) > 0 && user_can('Update Order'))
@if (user_can('Add Discount on POS')) @lang('modules.order.addDiscount') @endif {{-- Loyalty redemption is disabled on KOT detail page --}}
@endif
@lang('modules.order.totalItem')
@php // Count only items that are actually displayed (belong to visible KOTs) $displayedItemCount = 0; if (isset($kotList) && is_array($kotList)) { foreach ($kotList as $kotKey => $kot) { $kotPrefix = 'kot_' . $kot->id; foreach ($orderItemList as $key => $item) { if (strpos($key, $kotPrefix) !== false) { $displayedItemCount++; } } } } else { // Fallback: count all items if kotList is not available $displayedItemCount = count($orderItemList); } @endphp {{ $displayedItemCount }}
@lang('modules.order.subTotal') @php $stampDiscountAmount = 0; $hasFreeStampItems = false; if (isset($orderID) && $orderID && isset($orderDetail) && $orderDetail) { $stampDiscountAmount = (float)($orderDetail->stamp_discount_amount ?? 0); $hasFreeStampItems = $orderDetail->items()->where('is_free_item_from_stamp', true)->exists(); } @endphp @if($stampDiscountAmount > 0 || $hasFreeStampItems) @lang('app.stampDiscount') @if($stampDiscountAmount > 0) (-{{ currency_format($stampDiscountAmount, restaurant()->currency_id) }}) @elseif($hasFreeStampItems) (@lang('app.freeItem')) @endif @endif
@php // For existing orders, always use database value to avoid mismatches // For new orders, use component variable $displaySubTotal = isset($orderID) && $orderID && isset($orderDetail) && $orderDetail ? ($orderDetail->sub_total ?? $subTotal) : $subTotal; @endphp {{ currency_format($displaySubTotal, restaurant()->currency_id) }}
@if ($orderDetail->loyalty_points_redeemed > 0 && $orderDetail->loyalty_discount_amount > 0)
@lang('app.loyaltyDiscount') ({{ number_format($orderDetail->loyalty_points_redeemed) }} @lang('app.points')) {{-- Edit loyalty redemption disabled on KOT detail page --}}
-{{ currency_format($orderDetail->loyalty_discount_amount, restaurant()->currency_id) }}
@endif @php $displayDiscountAmount = isset($orderDetail) && $orderDetail ? (float)($orderDetail->discount_amount ?? 0) : (float)($discountAmount ?? 0); $displayDiscountType = isset($orderDetail) && $orderDetail ? ($orderDetail->discount_type ?? $discountType) : $discountType; $displayDiscountValue = isset($orderDetail) && $orderDetail ? ($orderDetail->discount_value ?? $discountValue) : $discountValue; $useLiveTotals = false; @endphp @if ($displayDiscountAmount > 0 && ($orderDetail->loyalty_points_redeemed ?? 0) == 0)
@lang('modules.order.discount') @if ($displayDiscountType == 'percent') ({{ $displayDiscountValue }}%) @endif
-{{ currency_format($displayDiscountAmount, restaurant()->currency_id) }}
@endif @php $applicableExtraCharges = collect($extraCharges ?? [])->filter(function ($charge) use ($orderType) { $allowedTypes = $charge->order_types ?? []; return empty($allowedTypes) || in_array($orderType, $allowedTypes); }); @endphp @foreach ($applicableExtraCharges as $charge)
{{ $charge->charge_name }} @if ($charge->charge_type == 'percent') ({{ $charge->charge_value }}%) @endif @if (user_can('Update Order')) @endif
@php // Calculate discounted subtotal for charges (after regular + loyalty discounts) $hasOrderDetail = isset($orderID) && $orderID && isset($orderDetail) && $orderDetail; $baseSubTotal = $useLiveTotals ? $subTotal : ($hasOrderDetail ? ($orderDetail->sub_total ?? $subTotal) : $subTotal); $regularDiscount = $useLiveTotals ? (float)($discountAmount ?? 0) : ($hasOrderDetail ? (float)($orderDetail->discount_amount ?? 0) : (float)($discountAmount ?? 0)); $loyaltyDiscount = $useLiveTotals ? (float)($loyaltyDiscountAmount ?? 0) : ($hasOrderDetail ? (float)($orderDetail->loyalty_discount_amount ?? 0) : (float)($loyaltyDiscountAmount ?? 0)); $chargeBase = $baseSubTotal - $regularDiscount - $loyaltyDiscount; @endphp {{ currency_format($charge->getAmount($chargeBase), restaurant()->currency_id) }}
@endforeach @if ($tipAmount > 0)
@lang('modules.order.tip')
{{ currency_format($tipAmount, restaurant()->currency_id) }}
@endif @if ($orderType === 'delivery' && !is_null($deliveryFee))
@lang('modules.delivery.deliveryFee')
@if ($deliveryFee > 0) {{ currency_format($deliveryFee, restaurant()->currency_id) }} @else @lang('modules.delivery.freeDelivery') @endif
@endif @if ($taxMode == 'order') @php // For existing orders, use order's taxes; otherwise use all restaurant taxes // Prevent duplicate taxes by tracking tax IDs and tax names $taxesToDisplay = []; $seenTaxIds = []; $seenTaxNames = []; if (isset($orderID) && $orderID && isset($orderDetail) && $orderDetail && $orderDetail->taxes && $orderDetail->taxes->count() > 0) { // Use order's specific taxes (avoid duplicates by both ID and name) // Use unique() to remove duplicates at collection level first $uniqueOrderTaxes = $orderDetail->taxes->unique(function ($orderTax) { $tax = $orderTax->tax ?? null; return $tax ? ($tax->id ?? $tax->tax_name ?? '') : ''; }); foreach ($uniqueOrderTaxes as $orderTax) { $tax = $orderTax->tax ?? null; if ($tax) { $taxId = $tax->id ?? null; $taxName = strtolower(trim($tax->tax_name ?? '')); // Check both ID and name to prevent duplicates $isDuplicate = false; if ($taxId && in_array($taxId, $seenTaxIds)) { $isDuplicate = true; } elseif ($taxName && in_array($taxName, $seenTaxNames)) { $isDuplicate = true; } if (!$isDuplicate) { if ($taxId) $seenTaxIds[] = $taxId; if ($taxName) $seenTaxNames[] = $taxName; $taxesToDisplay[] = (object)[ 'tax_name' => $tax->tax_name ?? '', 'tax_percent' => $tax->tax_percent ?? 0 ]; } } } } else { // Use all restaurant taxes for new orders (avoid duplicates) foreach ($taxes ?? [] as $tax) { if ($tax) { $taxId = $tax->id ?? null; $taxName = strtolower(trim($tax->tax_name ?? '')); // Check both ID and name to prevent duplicates $isDuplicate = false; if ($taxId && in_array($taxId, $seenTaxIds)) { $isDuplicate = true; } elseif ($taxName && in_array($taxName, $seenTaxNames)) { $isDuplicate = true; } if (!$isDuplicate) { if ($taxId) $seenTaxIds[] = $taxId; if ($taxName) $seenTaxNames[] = $taxName; $taxesToDisplay[] = (object)[ 'tax_name' => $tax->tax_name ?? '', 'tax_percent' => $tax->tax_percent ?? 0 ]; } } } } // Step 1: Calculate discounted subtotal for tax calculation (after both regular and loyalty discounts) // Loyalty points are always removed from subtotal before calculating tax // Use database values for existing orders $hasOrderDetail = isset($orderID) && $orderID && isset($orderDetail) && $orderDetail; $baseSubTotal = $useLiveTotals ? $subTotal : ($hasOrderDetail ? ($orderDetail->sub_total ?? $subTotal) : $subTotal); $regularDiscount = $useLiveTotals ? (float)($discountAmount ?? 0) : ($hasOrderDetail ? (float)($orderDetail->discount_amount ?? 0) : (float)($discountAmount ?? 0)); $loyaltyDiscount = $useLiveTotals ? (float)($loyaltyDiscountAmount ?? 0) : ($hasOrderDetail ? (float)($orderDetail->loyalty_discount_amount ?? 0) : (float)($loyaltyDiscountAmount ?? 0)); $discountedSubtotal = $baseSubTotal - $regularDiscount - $loyaltyDiscount; // Step 2: Calculate service charges on discounted subtotal $serviceTotal = 0; // Ensure applicableExtraCharges is available (it's defined earlier in the template) if (!isset($applicableExtraCharges)) { $applicableExtraCharges = collect($extraCharges ?? [])->filter(function ($charge) use ($orderType) { $allowedTypes = $charge->order_types ?? []; return empty($allowedTypes) || in_array($orderType, $allowedTypes); }); } if ($applicableExtraCharges && $applicableExtraCharges->count() > 0) { foreach ($applicableExtraCharges as $charge) { if ($charge && method_exists($charge, 'getAmount')) { $chargeAmount = $charge->getAmount((float)$discountedSubtotal); $serviceTotal += (float)$chargeAmount; } } } // Step 3: Calculate tax_base based on Tax Calculation Base setting // Check if service charges should be included in tax base $restaurant = restaurant(); $includeChargesInTaxBase = false; if ($restaurant && isset($restaurant->include_charges_in_tax_base)) { $includeChargesInTaxBase = (bool)$restaurant->include_charges_in_tax_base; } // Tax base = (subtotal - discounts) + service charges (if enabled) $taxBase = $includeChargesInTaxBase ? ($discountedSubtotal + $serviceTotal) : $discountedSubtotal; $taxBase = max(0, (float)$taxBase); @endphp @php $orderLevelTotalTax = 0; @endphp @foreach ($taxesToDisplay as $item)
{{ $item->tax_name }} ({{ $item->tax_percent }}%)
@php // Step 4: Calculate tax on tax_base $taxAmount = ($item->tax_percent / 100) * $taxBase; $orderLevelTotalTax += $taxAmount; @endphp {{ currency_format($taxAmount, restaurant()->currency_id) }}
@endforeach {{-- @if(count($taxesToDisplay) > 0)
@lang('modules.order.totalTax')
@php // For existing orders, use database value (which is correct after loyalty discount) // For new orders, use calculated total from individual taxes $displayTaxAmount = isset($orderID) && $orderID && isset($orderDetail) && $orderDetail ? ($orderDetail->total_tax_amount ?? $orderLevelTotalTax) : $orderLevelTotalTax; @endphp {{ currency_format($displayTaxAmount, restaurant()->currency_id) }}
@endif --}} @else @php $taxTotals = []; foreach ($orderItemTaxDetails as $item) { $qty = $item['qty'] ?? 1; if (!empty($item['tax_breakup'])) { foreach ($item['tax_breakup'] as $taxName => $taxInfo) { if (!isset($taxTotals[$taxName])) { $taxTotals[$taxName] = [ 'percent' => $taxInfo['percent'], 'amount' => 0 ]; } $taxTotals[$taxName]['amount'] += $taxInfo['amount'] * $qty; } } } @endphp @foreach ($taxTotals as $taxName => $taxInfo)
{{ $taxName }} ({{ $taxInfo['percent'] }}%)
{{ currency_format($taxInfo['amount'], restaurant()->currency_id) }}
@endforeach
@lang('modules.order.totalTax')
@php // For existing orders, use database value (which is correct after loyalty discount) // For new orders, use component variable $displayTaxAmount = $useLiveTotals ? $totalTaxAmount : (isset($orderID) && $orderID && isset($orderDetail) && $orderDetail ? ($orderDetail->total_tax_amount ?? $totalTaxAmount) : $totalTaxAmount); @endphp {{ currency_format($displayTaxAmount, restaurant()->currency_id) }}
@endif
@lang('modules.order.total')
@php // For existing orders, use database value (which is correct after loyalty discount) // For new orders, use component variable $displayTotal = $useLiveTotals ? $total : (isset($orderID) && $orderID && isset($orderDetail) && $orderDetail ? ($orderDetail->total ?? $total) : $total); // dd($displayTotal, $total); @endphp {{ currency_format($displayTotal, restaurant()->currency_id) }}
@if ($orderDetail->status == 'kot' && user_can('Update Order'))
@lang('modules.order.newKot') @if (user()->hasRole('Admin_'. user()->restaurant_id)) @endif
@endif @if ($orderDetail->status == 'billed' && user_can('Update Order'))
@endif @if ($orderType == 'delivery' && $orderDetail->delivery_address)
@if ($orderDetail->customer)
{{ $orderDetail->customer->name }}
@endif
@lang('modules.customer.address')
@if ($orderDetail->customer_lat && $orderDetail->customer_lng && branch()->lat && branch()->lng) @lang('modules.order.viewOnMap') @endif
{!! nl2br(e($orderDetail->delivery_address)) !!}
@endif

@lang('modules.order.cancelOrder')

This action cannot be undone

@lang('modules.order.cancelOrderMessage')

Please select a reason for cancellation

@foreach ($cancelReasons as $reason) @endforeach
{{ __('app.cancel') }} @lang('modules.order.cancelOrder')
@lang('modules.order.deleteOrder')? @lang('modules.order.deleteOrderMessage') {{ __('app.cancel') }} @lang('modules.order.deleteOrder')
@lang('modules.order.changeTable')

@lang('modules.order.confirmTableChange')

@lang('modules.order.currentTable'): {{ $tableNo }}

@if($pendingTable)

@lang('modules.order.changeTo'): {{ $pendingTable->table_code }}

@endif

@lang('modules.order.tableChangeMessage')

@lang('modules.order.tableChangeWarning')

@lang('app.cancel') @lang('modules.order.changeTable')