@extends('layouts.app')
@section('title','New Stock Adjustment')
@section('content')<form method="POST" action="{{ route('stock-adjustments.store') }}" id="stockForm">@csrf<div class="page-head"><div><h1>New stock adjustment</h1><p>Use for physical differences, damage, expiry, loss, found stock, or correction.</p></div></div><div class="card-erp"><div class="card-erp-body"><div class="row g-2"><div class="col-md-3"><label class="form-label">Warehouse</label><select id="adjustWarehouse" name="warehouse_id" class="form-select">@foreach($warehouses as $w)<option value="{{ $w->id }}">{{ $w->code }} · {{ $w->name_en }}</option>@endforeach</select></div><div class="col-md-2"><label class="form-label">Date</label><input type="date" name="adjustment_date" class="form-control" value="{{ now()->toDateString() }}"></div><div class="col-md-2"><label class="form-label">Type</label><select name="adjustment_type" class="form-select"><option>increase</option><option>decrease</option></select></div><div class="col-md-2"><label class="form-label">Reason</label><select name="reason" class="form-select">@foreach(['Physical Difference','Damage','Expiry','Lost','Found','Correction','Other'] as $r)<option>{{ $r }}</option>@endforeach</select></div><div class="col-md-3"><label class="form-label">Notes</label><input name="notes" class="form-control"></div></div></div></div>@include('inventory.partials.product_entry',['mode'=>'adjustment'])<div class="sticky-actions d-flex justify-content-end gap-2"><a class="btn btn-light border" href="{{ route('stock-adjustments.index') }}">Cancel</a><button name="action" value="draft" class="btn btn-outline-secondary">Save draft</button><button name="action" value="approve" class="btn btn-primary">Approve & post</button></div></form>@endsection
