@php($canCreateAdjustment = \App\Support\AdminAccess::canAction('stock_adjustments', 'create'))

{{ __('Stock Adjustments') }}

{{ __('Adjust product stock with plus or minus entries and keep a note for audit.') }}
{{ __('New Adjustment') }}
{{ __('Search a product and adjust stock instantly.') }}
@if($canCreateAdjustment)
@if($selectedProductId) @endif
@if($showDropdown && $products->count())
@foreach($products as $item)
@if(!empty($item->adjustment_variant_rows))
{{ __('Variants') }}
@foreach($item->adjustment_variant_rows as $variantRow) @endforeach
@endif
@endforeach
@elseif($showDropdown && $productSearch !== '')
{{ __('No product found.') }}
@endif
{{ $selectedProductLabel ?: __('Select a product from search') }}
@if($selectedVariantLabel) {{ __('Variant') }}: {{ $selectedVariantLabel }} @endif @if($selectedProductBarcode) {{ __('Barcode') }}: {{ $selectedProductBarcode }} @endif @error('selectedProductId') {{ $message }} @enderror
{{ number_format((float) $currentStock, 2) }}
@error('adjustmentQuantity') {{ $message }} @enderror
@error('adjustmentType') {{ $message }} @enderror
@error('note') {{ $message }} @enderror
@else
{{ __('You do not have permission to create stock adjustments.') }}
@endif
{{ __('Recent Adjustments') }}
{{ __('Latest stock changes for this admin.') }}
@forelse($recentAdjustments as $item) @empty @endforelse
{{ __('Date') }} {{ __('Product') }} {{ __('Variant') }} {{ __('Type') }} {{ __('Qty') }} {{ __('Before') }} {{ __('After') }} {{ __('By') }} {{ __('Note') }}
{{ optional($item->created_at)->format('d M Y, h:i A') }}
{{ $item->product_name }}
{{ $item->product_barcode ?: '-' }}
@if($item->variation_type) {{ $item->variation_type }} @else - @endif {{ $item->adjustment_type === 'add' ? __('Plus') : __('Minus') }} {{ number_format((float) $item->adjustment_quantity, 2) }} {{ number_format((float) $item->previous_stock, 2) }} {{ number_format((float) $item->new_stock, 2) }} {{ $item->actor_name }} {{ $item->note ?: '-' }}
{{ __('No stock adjustments found yet.') }}