@if($order)

{{ __('modules.order.payment') }}

{{ __('modules.order.orderHash') }}{{ $order->order_number }} {{ currency_format($order->total) }}
@endif
@if($order)
$canAddTip, 'grid-cols-4' => !$canAddTip])> @if($canAddTip) @endif
@if ($order)
@if($order->tip_amount > 0)
{{ __('modules.order.total') }} {{ currency_format($order->total - $order->tip_amount) }}
{{ __('modules.order.tipAmount') }} + {{ currency_format($order->tip_amount) }}
@endif
{{ __('modules.order.totalBill') }} {{ currency_format($order->total) }}
{{ __('modules.order.amountPaid') }} {{ currency_format($paidAmount) }}
@if($paymentMethod === 'cash') @if($returnAmount > 0)
{{ __('modules.order.returnAmount') }} {{ currency_format($returnAmount) }}
@else
{{ __('modules.order.dueAmount') }} {{ currency_format($balanceAmount) }}
@endif @else
{{ __('modules.order.dueAmount') }} {{ currency_format($balanceAmount) }}
@endif
@endif
@foreach([50, 100, 500, 1000] as $amount) @endforeach
@foreach(range(1, 9) as $number) @endforeach

{{ __('modules.order.splitBill') }}

@for($i = 1; $i <= $numberOfSplits; $i++)
Split {{ $i }}
@if($numberOfSplits > 2) @endif
@endfor
@for($i = 1; $i <= $numberOfSplits; $i++)
Split {{ $i }}
@endfor
@foreach($customSplits as $splitNumber)
Split {{ $splitNumber }}
@if(count($customSplits) > 2) @endif
@endforeach
@foreach($customSplits as $splitNumber)
Split {{ $splitNumber }}
@endforeach
@foreach($splits as $splitId => $split)
@if(count($splits) > 1 && $splitId !== 1) @endif
@endforeach

{{ __('modules.order.availableItems') }}

{{ __('modules.order.clickToAdd') }}
@foreach($availableItems as $index => $item) @if($item['remaining'] > 0)
{{ $item['name'] }}
{{ currency_format($item['price']) }}
{{ __('modules.order.base') }}: {{ currency_format($item['base_price']) }} @if($item['tax_amount'] > 0) + {{ __('modules.order.tax') }}: {{ currency_format($item['tax_amount']) }} @endif @if($item['extra_charges'] > 0) + {{ __('modules.order.extraCharges') }}: {{ currency_format($item['extra_charges']) }} @endif
@endif @endforeach

{{ __('modules.order.itemsInSplit', ['split' => $activeSplitId]) }}

{{ __('modules.order.total') }}: {{ currency_format(($splits[$activeSplitId]['total'] ?? 0)) }}
@if(empty($splits[$activeSplitId]['items']))
{{ __('modules.order.noItemsInSplit') }}
@else @foreach($splits[$activeSplitId]['items'] as $index => $item)
{{ $item['name'] }}
{{ currency_format($item['price'] * $item['quantity']) }}
{{ __('modules.order.base') }}: {{ currency_format($item['base_price'] * $item['quantity']) }} @if($item['tax_amount'] > 0) + {{ __('modules.order.tax') }}: {{ currency_format($item['tax_amount'] * $item['quantity']) }} @endif @if($item['extra_charges'] > 0) + {{ __('modules.order.extraCharges') }}: {{ currency_format($item['extra_charges'] * $item['quantity']) }} @endif
@endforeach @endif
@if ($order)
{{ __('modules.order.totalBill') }} {{ currency_format($order->total) }}
{{ __('modules.order.splitAmount') }} {{ currency_format(collect($splits)->sum('total')) }}
@endif
@endif
@if($order)
{{ __('app.cancel') }} {{ __('modules.order.completePayment') }}
@endif
@lang('modules.order.addTip')
@if ($order)
@foreach([5, 10, 15, 20] as $value) @endforeach
{{ currency() }}
@lang('modules.order.currentTotal') {{ currency_format($order->total - $order->tip_amount) }}
@lang('modules.order.tipAmount') + {{ currency_format($tipAmount ?? 0) }}
@lang('modules.order.newTotal') {{ currency_format(($order->total - $order->tip_amount + ($tipAmount ?: 0))) }}
@endif
@lang('app.cancel') @lang('app.save')