New sale

@csrf
{{-- LEFT: sale form --}}
@if ($errors->any())
{{ $errors->first() }}
@endif
@csrf
@foreach ($pumps as $index => $pump) @endforeach
Press 1–{{ count($pumps) }} or use ← → to pick a pump
Select a pump to see the price per liter
{{-- RIGHT: invoice --}}
@if ($lastSale)
{{ $station['name'] }} @if ($station['address'])
{{ $station['address'] }}@endif @if ($station['phone'])
Tel: {{ $station['phone'] }}@endif
Invoice{{ $lastSale->invoice_number }}
Date{{ $lastSale->created_at->format('d/m/Y H:i') }}
Cashier{{ $lastSale->cashier->name }}
Pump{{ $lastSale->pump->name }}
Fuel{{ $lastSale->pump->fuelType->name }}
Liters{{ number_format($lastSale->liters, 2) }}
Price/L (KHR){{ number_format($lastSale->unit_price_riel, 0) }}
Price/L (USD)${{ number_format($lastSale->unit_price, 2) }}
TOTAL (KHR){{ number_format($lastSale->total_riel, 0) }}
TOTAL (USD)${{ number_format($lastSale->total, 2) }}
Thank you
@else
The invoice will appear here after you complete a sale.
@endif