@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') }}
{{ __('Open the modal to search a product and adjust stock.') }}
@if($canCreateAdjustment) @endif
@if(! $canCreateAdjustment)
{{ __('You do not have permission to create stock adjustments.') }}
@endif
{{ __('Filters') }}
{{ __('Filter entries by date range.') }}
{{--
{{ __('Select dates and click Filter to update the table.') }}
--}}
{{ __('Recent Adjustments') }}
{{ __('Latest stock changes for this admin.') }}
@forelse($recentAdjustments as $item) @empty @endforelse
{{ __('Date') }} {{ __('Product') }} {{ __('Type') }} {{ __('Qty') }} {{ __('Before') }} {{ __('After') }} {{ __('User') }} {{ __('Reason') }}
{{ optional($item->created_at)->format('d M Y, h:i A') }}
{{ $item->product_name }}
{{ $item->product_barcode ?: '-' }}
{{ $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->staff?->display_name ?: $item->actor_name }}
{{ ucfirst((string) $item->actor_role) }}
{{ $item->note ?: '-' }}
{{ __('No stock adjustments found yet.') }}
@if($showAdjustmentModal)
@if($selectedProductId) @endif
@if($showDropdown && $products->count())
@foreach($products as $item) @endforeach
@elseif($showDropdown && $productSearch !== '')
{{ __('No product found.') }}
@endif
{{ $selectedProductLabel ?: __('Select a product from search') }}
@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
@endif