@php $canEditProduct = \App\Support\AdminAccess::canAction('products', 'edit'); $canDeleteProduct = \App\Support\AdminAccess::canAction('products', 'delete'); $canCreateProduct = \App\Support\AdminAccess::canAction('products', 'create'); @endphp

{{ __('Mandi Products List') }}

{{ __('Manage your stock and market rates') }}
@if($canCreateProduct) @endif
@if (session()->has('message'))
{{ session('message') }}
@endif
{{ __('Import / Export Products') }}
@if($canCreateProduct) @endif
{{--

{{ __('Export includes all products in the current branch. Import creates new products in this branch only; existing barcodes, shortcodes and variant barcodes are rejected. Missing categories, units, brands and variation groups are created automatically.') }}

--}} @if($canCreateProduct) {{--

{{ __('Fill every Required column (red headings in Excel). Stock starts from Opening Stock; Current Stock is for reference only. For variants, Opening Stock must equal the sum of variant opening stocks. Images, purchase/sale history, batches/expiry details and unit conversions are not transferred.') }}

--}} {{--

{{ __('Use UTF-8 CSV or the HTML .xls template from this page (10 MB / 2,000 products maximum). Excel may show a format warning for HTML .xls. Save native XLS/XLSX workbooks as CSV before importing. Keep barcodes as text to preserve leading zeros.') }}

--}}
@error('productImport')
{{ $message }}
@enderror
{{ __('Uploading file...') }}
@if($importErrors) @endif @endif
@forelse($all_products as $item) @php $currentStock = (float) ($item->quantity ?? 0); $alertQuantity = (float) ($item->alert_quantity ?? 0); $isLowStock = $alertQuantity > 0 && $currentStock > 0 && $currentStock <= $alertQuantity; @endphp @empty @endforelse
{{ __('Category') }} {{ __('Product') }} {{ __('Barcode') }} {{ __('Shortcode') }} {{ __('Sale Rate') }} {{ __('Purchase Rate') }} {{ __('Opening Stock') }} {{ __('Alert Qty') }} {{ __('Unit') }} {{ __('Actions') }}
{{ $item->category?->display_name ?? '-' }}
{{ $item->display_name }}
{{ $item->barcode_number ?? '-' }} @if($item->shortcode) {{ $item->shortcode }} @else - @endif Rs. {{ number_format($item->sale_rate) }} Rs. {{ number_format($item->purchase_rate) }} {{ number_format((float) $item->opening_stock, 2) }} @if($item->alert_quantity !== null && $item->alert_quantity !== '') {{ number_format((float) $item->alert_quantity, 2) }} @else - @endif {{ $item->unit?->display_name ?? '-' }} @if($canEditProduct) @endif @if($canDeleteProduct) @endif
No products found.
@if($showCategoryCreateModal)
{{ __('Add New Category') }}
@error('newCategoryName') {{ $message }} @enderror
@error('newCategoryNameUrdu') {{ $message }} @enderror
@endif @if($showUnitCreateModal)
{{ __('Add Unit') }}
@error('newUnitCode') {{ $message }} @enderror
@error('newUnitName') {{ $message }} @enderror
@error('newUnitBaseId') {{ $message }} @enderror
@if($newUnitBaseId)
@error('newUnitOperator') {{ $message }} @enderror
@error('newUnitOperationValue') {{ $message }} @enderror
@endif
{{ __('Example conversions:') }}
1 Dozen = 1 * 12 Piece
1 Gram = 1 / 1000 KG
@endif @if($showBrandCreateModal)
{{ __('Add Brand') }}
@error('newBrandName') {{ $message }} @enderror
@error('newBrandImage') {{ $message }} @enderror
@if($newBrandImage) New brand preview @elseif($currentBrandImage) Current brand preview @else {{ __('No image selected') }} @endif
@endif @if($showVariationCreateModal)
{{ __('Add Variation') }}
@error('newVariationName') {{ $message }} @enderror
@foreach($newVariationTypes as $index => $type)
@if($index === 0) @else @endif
@error('newVariationTypes.' . $index) {{ $message }} @enderror @endforeach @error('newVariationTypes') {{ $message }} @enderror
@endif