@extends('layouts.app') @section('title', 'Order ' . $order->order_number) @section('content')
{{-- Menu --}}

{{ $order->order_number }}

{{ $order->table->name ?? $order->sale_type->label() }} · Waiter: {{ $order->waiter->name ?? '—' }} · {{ $order->covers }} covers

{{ $order->status->label() }} @if ($order->isHeld()) On hold {{ $order->held_at->timezone(config('pos.company.timezone'))->format('H:i') }} @endif @if ($order->splits->isNotEmpty()) Split {{ $order->splits->count() }} ways @endif
@if ($order->status->value === 'merged')
This bill was merged into @if ($order->mergedInto){{ $order->mergedInto->order_number }}@endif — nothing was voided, the items moved across.
@endif @if ($happy['active'] || auth()->user()->can('sales.happy_hour'))
@if ($happy['active']) Happy hour — {{ $happy['label'] }} on everything you add now. @else Happy hour is off. @endif @can('sales.happy_hour')
@csrf
@endcan
@endif
@if ($menuSections->isNotEmpty())
POS section
@csrf
@endif
@foreach ($menu as $category => $products) @endforeach
@foreach ($menu as $category => $products)
@foreach ($products as $product)
@csrf
@endforeach
@endforeach
{{-- Split billing panel --}} @if ($order->splits->isNotEmpty())

Split bill — {{ $order->splits->count() }} ways

@csrf @method('DELETE')
@foreach ($order->splits as $split)
{{ $split->label }} {{ ucfirst($split->status) }}
@if ($split->mode === 'by_item')
@forelse ($split->items as $item)
{{ $item->quantity }}× {{ $item->product->name }}{{ number_format($item->line_total, 0) }}
@empty

No items assigned yet

@endforelse
@endif
Total{{ number_format($split->grand_total, 2) }}
Paid{{ number_format($split->amount_paid, 2) }}
@if ($split->status !== 'paid') @can('sales.cash_out') @else

Owing {{ number_format($split->balanceDue(), 2) }} — the cashier collects.

@endcan @endif {{ $split->status === 'paid' ? 'Print receipt' : 'Print bill' }}
@csrf
@endforeach
@if ($order->splits->first()->mode === 'by_item')

Assign each ticket item to a split using the dropdown next to it on the right.

@endif
@endif
{{-- Ticket --}}

Order ticket

@forelse ($order->items as $item) @php $u = auth()->user(); $locked = $item->isLocked(); $canCancel = $item->status !== 'void' && $order->isLive() && ($u->can('sales.void_item') || ($u->can('sales.remove_unsent') && ! $locked)); @endphp

{{ $item->quantity }}× {{ $item->product->name }}

@if ($item->special_instructions)

{{ $item->special_instructions }}

@endif
{{ ucfirst($item->status === 'new' ? 'not sent' : $item->status) }} @if ($item->destination === 'bar') Bar@endif @if ($item->destination === 'none')@endif @if ($item->discount_percent > 0)-{{ rtrim(rtrim(number_format($item->discount_percent, 2), '0'), '.') }}%@endif @if ($locked && $item->status !== 'void')@endif
@if ($order->splits->isNotEmpty() && $order->splits->first()->mode === 'by_item' && $item->status !== 'void')
@csrf
@endif
@if ($item->original_price)

{{ number_format($item->original_price * $item->quantity, 0) }}

@endif

{{ number_format($item->line_total, 0) }}

@if ($canCancel)
@csrf
@endif
@empty

No items yet — tap a menu item to add it.

@endforelse
Subtotal{{ number_format($order->subtotal, 2) }}
Discount-{{ number_format($order->discount_total, 2) }}
Service charge{{ number_format($order->service_charge_total, 2) }}
VAT{{ number_format($order->tax_total, 2) }}
Levy{{ number_format($order->levy_total, 2) }}
Total{{ config('pos.company.currency_symbol') }} {{ number_format($order->grand_total ?: $order->subtotal, 2) }}
@if ($order->status->value === 'billed' || $order->payments->isNotEmpty())
Paid{{ number_format($order->payments->sum('amount'), 2) }}
Balance due{{ number_format($order->balanceDue(), 2) }}
@endif
@if ($order->isLive()) {{-- Send: the waiter decides what goes where --}}
@csrf
@csrf
{{-- Print: tick what to print, one print dialog --}} @can('sales.reprint')

Print

Once printed or sent, items are locked — only a manager can void them.

@endcan
@if ($order->isHeld())
@csrf
@else
@csrf
@endif
@if ($canCancelOrder)
@csrf
@endif @if ($mergeCandidates->isNotEmpty()) @endif
@csrf
{{-- Money: only people allowed to cash out --}} @if ($order->status->value === 'billed' && $order->splits->isEmpty()) @can('sales.cash_out')
@can('sales.split_bill')@endcan
@if ($mpesaReady) @can('sales.mpesa') @endcan @endif @else

Payment is taken by the cashier. Press Hold / suspend and hand the money over — the cashier clears it against your name.

@can('sales.split_bill') @if ($order->splits->isEmpty())@endif @endcan @endcan @endif @endif @if ($order->payments->isNotEmpty() || $order->splits->isNotEmpty() || $order->status->value === 'billed') {{ $order->isFullyPaid() ? 'Print full receipt' : 'Print bill' }} @endif @if (in_array($order->status->value, ['billed', 'sent_to_kitchen']) && $order->balanceDue() > 0 && auth()->user()->can('sales.force_close'))
@csrf
@endif
@csrf
@can('sales.discount')
@endcan

VAT and levy are computed automatically from Settings → Taxes & Levies.

@csrf

Balance due: {{ config('pos.company.currency_symbol') }} {{ number_format($order->balanceDue(), 2) }}

@if ($order->payments->isNotEmpty())

Already received

@foreach ($order->payments as $payment)
{{ $payment->paymentMethod->name ?? $payment->method }}@if($payment->reference_number) · {{ $payment->reference_number }}@endif {{ number_format($payment->amount, 2) }}
@endforeach
@endif
@if ($errors->any() || session('credit_limit_blocked')) @endif

Split tender (part cash, part M-Pesa): record one method and amount, then open Collect payment again for the rest with a different method — the balance above updates automatically.

@if ($mergeCandidates->isNotEmpty())
@csrf

Tick the bills to add to this one. Their items move here and those orders are marked Merged — nothing is voided.

@foreach ($mergeCandidates as $candidate) @endforeach
@endif @if ($mpesaReady && $order->status->value === 'billed') @can('sales.mpesa') @endcan @endif
@csrf
@if (session('auto_print_url')) @push('scripts') @endpush @endif @endsection