@php $receiptLanguages = array_values($receiptLanguages ?? ['en']); $appLocale = $receiptLanguages[0] ?? app()->getLocale(); app()->setLocale($appLocale); @endphp {{ $restaurant->name ?? 'Demo Restaurant' }} - @lang('modules.order.kotTicket')
@if($kot->status === 'cancelled')
{{ flipText(__('modules.order.cancelled'), $appLocale, $rtlPrintingChoice) }}
@endif
@if(isset($kotPlace) && $kotPlace)
{{ $kotPlace->translated_name }}
@endif
{{ flipText(__('modules.order.kot'), $appLocale, $rtlPrintingChoice) }} #{{ $kot->kot_number }} @if($kot->token_number)
{{ flipText(__('modules.order.tokenNumber'), $appLocale, $rtlPrintingChoice) }}: {{ $kot->token_number }}
@endif
{{ $kot->order->show_formatted_order_number }} @if ($kot->order->isDineInOrder() && $kot->order->table) {{ flipText(__('modules.table.table'), $appLocale, $rtlPrintingChoice) }}: {{ $kot->order->table->table_code }} @endif
{{ flipText(__('app.date'), $appLocale, $rtlPrintingChoice) }}: {{ $kot->created_at->timezone($kot->branch->restaurant->timezone)->format(dateFormat()) }} {{ flipText(__('app.time'), $appLocale, $rtlPrintingChoice) }}: {{ $kot->created_at->timezone($kot->branch->restaurant->timezone)->format(timeFormat()) }}
@if($kot->order->waiter)
{{ flipText(__('modules.order.waiter'), $appLocale, $rtlPrintingChoice) }}: {{ $kot->order->waiter->name }}
@endif @if($kot->order->order_type)
@php $kotOrderType = (string) $kot->order->order_type; $kotOrderTypeKey = 'modules.order.' . $kotOrderType; $kotOrderTypeLabel = __($kotOrderTypeKey); if ($kotOrderTypeLabel === $kotOrderTypeKey) { $kotOrderTypeLabel = Str::title(str_replace('_', ' ', $kotOrderType)); } @endphp {{ flipText(__('modules.settings.orderType'), $appLocale, $rtlPrintingChoice) }}: {{ $kotOrderTypeLabel }} @if($kot->order->order_type === 'pickup' && $kot->order->pickup_date) {{ flipText(__('modules.order.pickupAt'), $appLocale, $rtlPrintingChoice) }}: {{ \Carbon\Carbon::parse($kot->order->pickup_date)->timezone($kot->branch->restaurant->timezone)->format(timeFormat()) }} @endif
@endif
@php $items = isset($kotPlaceId) ? $kot->items->filter(function($item) use($kotPlaceId) { return $item->menuItem && $item->menuItem->kot_place_id == $kotPlaceId; }) : $kot->items; @endphp @foreach($items as $item) @php $isItemCancelled = $item->status === 'cancelled'; @endphp @endforeach
{{ flipText(__('modules.menu.itemName'), $appLocale, $rtlPrintingChoice) }} {{ flipText(__('modules.order.qty'), $appLocale, $rtlPrintingChoice) }}
@php $primaryItemName = $item->menuItem->getTranslatedValue('item_name', $appLocale); $secondaryItemName = count($receiptLanguages) > 1 ? $item->menuItem->getTranslatedValue('item_name', $receiptLanguages[1]) : null; @endphp $isItemCancelled])>{{ flipText($primaryItemName, $appLocale, $rtlPrintingChoice) }} @if ($secondaryItemName && $secondaryItemName !== $primaryItemName)
$isItemCancelled])>{{ flipText($secondaryItemName, $receiptLanguages[1], $rtlPrintingChoice) }} @endif @if (isset($item->menuItemVariation))
({{ $item->menuItemVariation->variation }}) @endif @foreach ($item->modifierOptions as $modifier)
• {{ $modifier->name }}
@endforeach @if ($item->note)
{{ flipText(__('modules.order.note'), $appLocale, $rtlPrintingChoice) }}: {{ $item->note }}
@endif
{{ \App\Support\PosQuantity::formatDisplay($item->quantity, (bool) ($item->menuItem->sell_by_weight ?? false)) }}
@if ($kot->note) @endif