@extends('layout.base') @section('layout.base.header')

{{ __( 'Table Bill - :table', [ 'table' => $table->area ? $table->area->name . ' - ' . $table->name : $table->name ] ) }}

@if( $secure_access ?? false ) {{ __( 'Secure table access' ) }} @else {{ __( 'Public table access' ) }} @endif

@endsection @section('layout.base.body')
\n
\n
\n
\n
\n \n \n \n
\n
\n

\n {{ $table->name }}\n

\n @if( $table->area )\n
\n \n \n \n \n {{ $table->area->name }}\n
\n @endif\n
\n
\n
\n
\n \n \n \n {{ __( 'Last updated' ) }}\n
\n

{{ now()->format('M d, Y H:i') }}

\n
\n
\n
@if( isset($bills) && count($bills) > 0 )
@foreach( $bills as $index => $bill )\n
\n \n
\n
\n
\n
\n \n \n \n
\n
\n

\n {{ __( 'Bill #:code', [ 'code' => $bill['code'] ] ) }}\n

@if( isset($bill['customer']) && $bill['customer'] )

{{ __( 'Customer: :name', [ 'name' => $bill['customer']['name'] ] ) }}

@endif
@if( $bill['payment_status'] === 'paid' ) {{ __( 'Paid' ) }} @elseif( $bill['payment_status'] === 'partially_paid' ) {{ __( 'Partially Paid' ) }} @else {{ __( 'Unpaid' ) }} @endif

{{ ns()->currency->define( $bill['totals']['total'] ) }}

@if( isset($bill['remaining_amount']) && $bill['remaining_amount'] > 0 )

{{ __( 'Remaining: :amount', [ 'amount' => ns()->currency->define( $bill['remaining_amount'] ) ] ) }}

@endif
@if( isset($bill['products']) && count($bill['products']) > 0 )

{{ __( 'Items' ) }}

@foreach( $bill['products'] as $product ) @endforeach
{{ __( 'Item' ) }} {{ __( 'Qty' ) }} {{ __( 'Unit Price' ) }} {{ __( 'Total' ) }}
{{ $product['name'] }} {{ $product['quantity'] }} {{ ns()->currency->define( $product['unit_price'] ) }} {{ ns()->currency->define( $product['total_price'] ) }}
@endif @if( isset($bill['totals']) )
{{ __( 'Subtotal' ) }}: {{ ns()->currency->define( $bill['totals']['subtotal'] ) }}
@if( $bill['totals']['tax_value'] > 0 )
{{ __( 'Tax' ) }}: {{ ns()->currency->define( $bill['totals']['tax_value'] ) }}
@endif @if( $bill['totals']['discount'] > 0 )
{{ __( 'Discount' ) }}: -{{ ns()->currency->define( $bill['totals']['discount'] ) }}
@endif @if( isset($bill['totals']['shipping']) && $bill['totals']['shipping'] > 0 )
{{ __( 'Shipping' ) }}: {{ ns()->currency->define( $bill['totals']['shipping'] ) }}
@endif
{{ __( 'Total' ) }}: {{ ns()->currency->define( $bill['totals']['total'] ) }}
@if( isset($bill['totals']['tendered']) && $bill['totals']['tendered'] > 0 )
{{ __( 'Paid' ) }}: {{ ns()->currency->define( $bill['totals']['tendered'] ) }}
@endif @if( isset($bill['remaining_amount']) && $bill['remaining_amount'] > 0 )
{{ __( 'Remaining' ) }}: {{ ns()->currency->define( $bill['remaining_amount'] ) }}
@endif
@endif @if( isset($bill['can_pay']) && $bill['can_pay'] && isset($bill['remaining_amount']) && $bill['remaining_amount'] > 0 )

{{ __( 'Choose Payment Method' ) }}

{{ ns()->currency->define( $bill['remaining_amount'] ) }}
\n \n \n \n
{{ __( 'Amount to pay: :amount', [ 'amount' => ns()->currency->define( $bill['remaining_amount'] ) ] ) }}
@if( isset($bill['supports_split']) && $bill['supports_split'] )
@endif
@endif
@endforeach
@else

{{ __( 'No bills found' ) }}

@if( isset($message) ) {{ $message }} @else {{ __( 'There are no active bills for this table.' ) }} @endif

@endif \n
\n \n
\n
\n\n\n\n\n\n @endsection