@php $isEditable = $tab->status === 'open'; @endphp
@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'))
@endif
@if ($tab->splits->isNotEmpty() && $tab->splits->first()->mode === 'by_item' && $item->status !== 'void' && $isEditable)
@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 ($tab->grand_total > 0 && $tab->splits->isEmpty() && auth()->user()->can('sales.split_bill'))
Split bill — {{ $tab->splits->count() }} ways
@if ($isEditable)
@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' }}
@endforeach
@if ($tab->splits->first()->mode === 'by_item')
Assign each item to a split using the dropdown next to it.
@endif