@extends('layouts.app') @section('title', 'Bar POS') @section('content')

Bar POS

Select an open tab on the right, then tap items to add them.

@can('sales.complimentary') @endcan
@foreach (['active' => 'Open & billed', 'closed' => 'Closed (last 7 days)', 'void' => 'Voided'] as $key => $label) {{ $label }} @endforeach
@foreach ($menu as $category => $products) @endforeach
@foreach ($menu as $category => $products)
@foreach ($products as $product) @endforeach
@endforeach

{{ ['active' => 'Open tabs', 'closed' => 'Closed tabs', 'void' => 'Voided tabs'][$status] ?? 'Tabs' }}

@forelse ($tabs as $tab) @empty

{{ $status === 'active' ? 'No open tabs. Start one to begin selling.' : 'No tabs match this filter.' }}

@endforelse
@foreach ($tabs as $tab)
@php $isEditable = $tab->status === 'open'; @endphp

{{ $tab->tab_number }}

{{ ucfirst($tab->status) }}
@unless ($isEditable)
This tab is {{ $tab->status }} and can't be changed. You can still print a copy below.
@endunless
@forelse ($tab->items as $item)
{{ $item->quantity }}× {{ $item->product->name }}@if($item->is_complimentary) (comp)@endif
{{ number_format($item->line_total, 0) }} @if ($item->status !== 'void' && $isEditable && auth()->user()->can('sales.void_item'))
@csrf
@endif
@if ($tab->splits->isNotEmpty() && $tab->splits->first()->mode === 'by_item' && $item->status !== 'void' && $isEditable)
@csrf
@endif @empty

No items yet.

@endforelse
Subtotal{{ number_format($tab->subtotal, 2) }}
@if ($tab->grand_total > 0)
VAT{{ number_format($tab->tax_total, 2) }}
Levy{{ number_format($tab->levy_total, 2) }}
Total{{ number_format($tab->grand_total, 2) }}
Balance{{ number_format($tab->balanceDue(), 2) }}
@endif
@if ($isEditable)
@csrf
@if ($tab->grand_total > 0) @endif
@if ($tab->grand_total > 0 && $tab->splits->isEmpty() && auth()->user()->can('sales.split_bill')) @endif @endif {{ $tab->isFullyPaid() ? 'Print receipt' : 'Print bill' }} @if ($tab->splits->isNotEmpty())

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

@if ($isEditable)
@csrf @method('DELETE')
@endif
@foreach ($tab->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) }}
@if ($split->status !== 'paid' && $isEditable) @endif {{ $split->status === 'paid' ? 'Print receipt' : 'Print bill' }}
@csrf
@endforeach
@if ($tab->splits->first()->mode === 'by_item')

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

@endif
@endif
@csrf
@csrf

Balance due: {{ number_format($tab->balanceDue(), 2) }}

@if (session('credit_limit_blocked')) @endif
@endforeach
@csrf
@if (session('auto_print_url')) @push('scripts') @endpush @endif @endsection