{{-- POS Billing Screen File : resources/views/livewire/pos/create.blade.php Component: app/Livewire/Pos/Create.php --}}
@once @endonce {{-- ══ TOP BAR ════════════════════════════════════════════ --}}
AgroShop POS
{{-- Invoice no + Customer lookup --}}
Invoice {{ $invoiceNo }}
{{-- Show error if tried to save without customer --}} @if($flashMsg && $flashType === 'error' && str_contains($flashMsg, 'Customer')) Required @endif {{-- Customer status --}} @if($customerFound)
{{ $customerName ?: $mobile }}
@elseif($newCustomer)
@endif
Sales
{{-- Flash --}} @if($flashMsg)
{{ $flashMsg }}
@endif {{-- ══ BODY ════════════════════════════════════════════════ --}}
{{-- ── LEFT: Products (col-8) ─────────────────────────── --}}
{{-- Search bar --}} {{-- Category chips --}}
@foreach($categories as $cat) @endforeach
{{-- Product grid --}}
{{-- Empty state --}}
@if($showHistoryModal)
Purchase History — {{ $customerName ?: $mobile }}
@forelse($customerHistory as $sale)
{{-- Sale header row — click to expand --}}
{{ $sale['invoice_no'] }} {{ $sale['date'] }} ₹{{ number_format($sale['net_amount'], 2) }} {{ count($sale['items']) }} items
{{-- Expandable items --}}
@foreach($sale['items'] as $item) @endforeach
Product Qty Price Total
{{ $item['name'] }} {{ $item['qty'] }} ₹{{ number_format($item['price'], 2) }} ₹{{ number_format($item['total'], 2) }}
@empty
No previous purchases found.
@endforelse
@endif
{{-- ── RIGHT: Bill (col-4) ─────────────────────────────── --}}
{{-- Bill header --}}
Current Bill {{ $invoiceNo }}
@if($customerFound || $newCustomer)
{{ $customerName ?: $mobile }} {{ $mobile }}
@endif
{{-- Empty state --}}
Bill is empty
Click any product to add
{{-- Bill items list --}}
{{-- Quick qty + loose qty buttons (shows when item active) --}}
Quick Add:
{{-- Bill footer --}}
{{-- Pass products to JS --}}
@push('scripts') @endpush