@extends('admin.layouts.app') @section('page-title', 'Stock Corrections') @section('body-class', 'inventory-preview') @push('styles')@endpush @section('content')

Stock Corrections

Product List
@if(session('status'))

{{ session('status') }}

@endif @if($errors->any())@endif
Reset
@forelse($variants as $variant)@empty@endforelse
ProductVariant / SKUCurrent stockAction
{{ $variant->product->name }}{{ $variant->colour !== '' ? $variant->colour : 'Default' }} / {{ $variant->size !== '' ? $variant->size : 'Default' }}{{ $variant->sku }}{{ $variant->retired_at ? ' · Retired' : '' }}{{ $variant->stock }}Correct stock
No matching variants.
{{ $variants->total() }} variants
@if($variants->previousPageUrl())Previous variants@endif @if($variants->nextPageUrl())Next variants@endif
@if($selected)

Correct {{ $selected->sku }} · Current: {{ $selected->stock }}

@csrf

Positive quantity adds stock; negative quantity removes stock. Resulting stock cannot be negative. The correction is kept permanently with before/after balances. Use Add Stock for new deliveries.

@endif

Correction history{{ $selected ? ' · '.$selected->sku : '' }}

@forelse($corrections as $record)@empty@endforelse
Record / DateProduct / SKUChangeBefore / AfterReason
SC{{ str_pad((string) $record->id, 6, '0', STR_PAD_LEFT) }}{{ $record->created_at->timezone('Asia/Dhaka')->format('d M Y, h:i A') }}{{ $record->product_name }}{{ $record->colour }} / {{ $record->size }} · {{ $record->sku }}{{ $record->quantity_change > 0 ? '+' : '' }}{{ $record->quantity_change }}{{ $record->stock_before }} / {{ $record->stock_after }}{{ $record->reason }}
No stock corrections recorded.
{{ $corrections->total() }} records
@if($corrections->previousPageUrl())Previous records@endif @if($corrections->nextPageUrl())Next records@endif
@endsection