@extends('layouts.app')
@section('title',$stockAdjustment->adjustment_no)
@section('content')<div class="page-head"><div><h1>{{ $stockAdjustment->adjustment_no }}</h1><p>{{ ucfirst($stockAdjustment->adjustment_type) }} · {{ $stockAdjustment->reason }} · {{ $stockAdjustment->warehouse->name_en }}</p></div>@if($stockAdjustment->status==='draft')<form method="POST" action="{{ route('stock-adjustments.approve',$stockAdjustment) }}">@csrf<button class="btn btn-primary">Approve adjustment</button></form>@endif</div><div class="card-erp"><div class="table-responsive"><table class="table table-dense"><thead><tr><th>Product</th><th>Unit</th><th class="text-end">Current</th><th class="text-end">Adjustment</th><th class="text-end">New qty</th><th class="text-end">Cost</th></tr></thead><tbody>@foreach($stockAdjustment->items as $i)<tr><td>{{ $i->product?->name_en }}</td><td>{{ $i->unit?->code }}</td><td class="text-end">{{ number_format((float)$i->current_qty,4) }}</td><td class="text-end">{{ number_format((float)$i->adjustment_qty,4) }}</td><td class="text-end fw-bold">{{ number_format((float)$i->new_qty,4) }}</td><td class="text-end">{{ number_format((float)$i->total_cost,2) }}</td></tr>@endforeach</tbody></table></div></div>@endsection
