@if($order)

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

{{ __('modules.order.orderHash') }}{{ $order->order_number }} {{ currency() }}{{ number_format($order->total, 2) }}
@endif
@if($order)
@if ($order)
{{ __('modules.order.totalBill') }} {{ currency() }}{{ number_format($order->total, 2) }}
{{ __('modules.order.amountPaid') }} {{ currency() }}{{ number_format($paidAmount, 2) }}
@if($paymentMethod === 'cash') @if($returnAmount > 0)
{{ __('modules.order.returnAmount') }} {{ currency() }}{{ number_format($returnAmount, 2) }}
@else
{{ __('modules.order.dueAmount') }} {{ currency() }}{{ number_format($balanceAmount, 2) }}
@endif @else
{{ __('modules.order.dueAmount') }} {{ currency() }}{{ number_format($balanceAmount, 2) }}
@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() }}{{ number_format($item['price'], 2) }}
{{ __('modules.order.base') }}: {{ currency() }}{{ number_format($item['base_price'], 2) }} @if($item['tax_amount'] > 0) + {{ __('modules.order.tax') }}: {{ currency() }}{{ number_format($item['tax_amount'], 2) }} @endif
@endif @endforeach

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

{{ __('modules.order.total') }}: {{ currency() }}{{ number_format($splits[$activeSplitId]['total'] ?? 0, 2) }}
@if(empty($splits[$activeSplitId]['items']))
{{ __('modules.order.noItemsInSplit') }}
@else @foreach($splits[$activeSplitId]['items'] as $index => $item)
{{ $item['name'] }}
{{ currency() }}{{ number_format($item['price'] * $item['quantity'], 2) }}
{{ __('modules.order.base') }}: {{ currency() }}{{ number_format($item['base_price'] * $item['quantity'], 2) }} @if($item['tax_amount'] > 0) + {{ __('modules.order.tax') }}: {{ currency() }}{{ number_format($item['tax_amount'] * $item['quantity'], 2) }} @endif
@endforeach @endif
@if ($order)
{{ __('modules.order.totalBill') }} {{ currency() }}{{ number_format($order->total, 2) }}
{{ __('modules.order.splitAmount') }} {{ currency() }}{{ number_format(collect($splits)->sum('total'), 2) }}
@endif
@endif
@if($order)
{{ __('app.cancel') }} {{ __('modules.order.completePayment') }}
@endif