{{-- ===== Right: Product Search & Grid ===== --}}
{{-- Top Bar --}}
شيبيرو POS
{{ auth()->user()->name }} {{ auth()->user()->branch->name ?? '' }}
@csrf
{{-- Search Bar --}}
{{-- Category Bar --}}
@foreach ($categories as $cat) @endforeach
{{-- Product Grid --}}
@forelse($products as $product) @php $totalQty = (float) ($product->batches_sum_remaining_quantity ?? 0); $hasStock = $totalQty > 0; @endphp @if ($product->variants->isNotEmpty()) @foreach ($product->variants as $variant)
{{ $product->name }}
{{ $variant->name }}
{{ $hasStock ? number_format($totalQty) : 'نفد' }}
@endforeach @else
{{ $product->name }}
{{ $product->sku }}
{{ $hasStock ? number_format($totalQty) : 'نفد' }}
@endif @empty
لا توجد منتجات
@endforelse
{{-- ===== Left: Cart Panel ===== --}}
{{-- Customer Selection --}}
@if ($customerId)
{{ \App\Models\Customer::find($customerId)?->name }}
@else
@if ($customers->isNotEmpty())
@foreach ($customers as $c)
{{ $c->name }} {{ $c->phone }}
@endforeach
@endif @endif @if ($showNewCustomer)
@endif
{{-- Cart Table --}}
@if (empty($cart))
السلة فارغة
@else @foreach ($cart as $item) @endforeach
المنتج الكمية السعر المجموع
{{ $item['name'] }} {{ number_format($item['subtotal'], 2) }}
@endif
{{-- Cart Footer: Totals & Actions --}}
{{-- ===== Payment Modal ===== --}} @if ($showPaymentModal) @endif