{{-- Include MultiPOS registration and status handling --}}
@if(module_enabled('MultiPOS') && in_array('MultiPOS', restaurant_modules()))
@include('multipos::partials.pos-registration', [
'hasPosMachine' => $hasPosMachine,
'machineStatus' => $machineStatus,
'posMachine' => $posMachine,
'limitReached' => $limitReached,
'limitMessage' => $limitMessage,
'shouldBlockPos' => $shouldBlockPos
])
@endif
{{-- Only render POS content if not blocked by registration/pending/declined --}}
@if(!$shouldBlockPos)
{{-- Restaurant availability banner (outside operating hours) --}}
@if(!empty($showRestaurantClosedBanner) && !empty($restaurantClosedMessage))
{{ $restaurantClosedMessage }}
@endif
{{-- Order Type Selection Modal - Using Livewire Component --}}
@if(!$orderTypeId)
@livewire('forms.order-type-selection')
@endif
@include('pos.menu')
@php
$showOrderDetail = request()->boolean('show-order-detail');
@endphp
@if (!$orderDetail || ($orderDetail && $orderDetail->status == 'draft'))
@include('pos.kot_items')
@elseif($orderDetail && $orderDetail->status == 'kot')
@php
// Get current KOT ID for print functionality
$currentKot = $orderDetail->kot()->orderBy('created_at', 'desc')->first();
$currentKotId = $currentKot ? $currentKot->id : null;
@endphp
@if($currentKotId)
@endif
@if($showOrderDetail)
@include('pos.order_items')
@else
@include('pos.kot_items')
@endif
@elseif($orderDetail && in_array($orderDetail->status, ['billed', 'paid', 'payment_due']))
@include('pos.order_detail')
@endif
{{-- Variation Modal --}}
@lang('modules.menu.itemVariations')
@if(module_enabled('Hotel') && in_array('Hotel', restaurant_modules()))
@include('hotel::pos.show-stay')
@endif
{{-- KOT Note Modal --}}
@lang('modules.order.addNote')
@lang('modules.order.orderNote')
@lang('app.cancel')
@lang('app.save')
{{-- Item Note Modal --}}
@lang('modules.order.addNote')
@lang('modules.order.orderNote')
@lang('app.cancel')
@lang('app.save')
{{-- Table Modal --}}
@lang('modules.table.availableTables')
{{-- Discount Modal --}}
@lang('modules.order.addDiscount')
@lang('modules.order.fixed')
@lang('modules.order.percent')
@lang('app.cancel')
@lang('app.save')
{{-- Loyalty Redemption (AJAX POS) - $posLoyaltyEnabled passed from PosController (tt parity) --}}
@if($posLoyaltyEnabled ?? false)
@lang('loyalty::app.redeemLoyaltyPoints')
{{-- Always render this block so JS can populate when customer added in-session --}}
{{ optional($customer)->name ?? '' }} {{ __('loyalty::app.hasAvailablePoints') }}:
{{ number_format($loyaltyPointsAvailable ?? 0) }}
@lang('loyalty::app.points')
@lang('loyalty::app.noPointsAvailable')
{{ __('loyalty::app.pointsValue') }}:
0
{{ __('loyalty::app.maxDiscountToday') }}:
{{ $loyaltyDiscountAmount ?? 0 }}
@lang('loyalty::app.pointsToRedeem')
{{ __('Minimum') }}:
0 @lang('loyalty::app.points')
| {{ __('Maximum') }}:
0 @lang('loyalty::app.points')
@lang('loyalty::app.loyaltyDiscount')
{{ $loyaltyDiscountAmount ?? 0 }}
@lang('app.skip')
@lang('loyalty::app.useMax') (0 )
@lang('loyalty::app.applyDiscount')
@endif
{{-- Print Options Modal (AJAX/JS-based) --}}
@lang('modules.order.printOptions')
@lang('modules.order.selectPrintOption')
{{-- Print All Option --}}
@lang('modules.order.printAll')
@if(isset($orderDetail) && $orderDetail && $orderDetail->relationLoaded('splitOrders'))
@lang('modules.order.printAllDesc', ['count' => $orderDetail->splitOrders->where('status', 'paid')->count() + 1])
@endif
{{-- Summary Only Option --}}
@lang('modules.order.summaryOnly')
@lang('modules.order.summaryOnlyDesc')
{{-- Individual Only Option (mapped to split receipts) --}}
@lang('modules.order.individualOnly')
@if(isset($orderDetail) && $orderDetail && $orderDetail->relationLoaded('splitOrders'))
@lang('modules.order.individualOnlyDesc', ['count' => $orderDetail->splitOrders->where('status', 'paid')->count()])
@endif
{{-- Single Guest Option (mapped to main order print) --}}
@lang('modules.order.singleGuest')
@lang('modules.order.singleGuestDesc')
{{ __('app.close') }}
{{-- Error Modal --}}
{{-- Modifiers Modal --}}
@lang('modules.modifier.itemModifiers')
{{-- Table Change Modal --}}
@lang('modules.order.changeTable')
@livewire('pos.set-table')
@lang('app.close')
@endif
@push('scripts')
@endpush