@extends('layouts.app') @section('title', 'Edit Product - ' . setting('system_name')) @section('content')

Edit Product: {{ $product->name }}

Modify product details and inventory settings

@if ($errors->any())
Please fix the following errors:
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @method('PUT')
General Information
+
+
Pricing & Margins
MWK
MWK
Estimated Profit Margin
MWK 0.00
0%
Product Description
Inventory Status
Current Stock
{{ number_format($product->current_stock) }}
{{ $product->expiry_date ? \Carbon\Carbon::parse($product->expiry_date)->format('d M Y') : 'Not set' }}
Each batch has its own expiry date, see Batches below
Supplier
Product Image

JPEG, PNG up to 5MB

Batches
Sales use up the batch that expires first. Add new batches with Adjust Stock.
Receive New Batch
@php $statusBadges = ['expired' => ['danger', 'Expired'], 'expiring' => ['warning', 'Expiring Soon'], 'valid' => ['success', 'Valid'], 'none' => ['secondary', 'No Expiry']]; @endphp @forelse($batches as $batch) @php [$badgeClass, $badgeText] = (float) $batch->quantity_remaining > 0 ? $statusBadges[$batch->expiryStatus()] : ['secondary', 'Used Up']; @endphp @empty @endforelse
Batch No Expiry Date Received Received Qty In Stock Status
{{ ($batch->received_at ?? $batch->created_at)->format('d M Y') }} {{ (float) $batch->quantity_received }} {{ (float) $batch->quantity_remaining }} {{ $badgeText }} @if((float) $batch->quantity_remaining > 0) Adjust @endif
No batches yet. Stock received is added as a batch.
@foreach($batches as $batch)
@csrf @method('PUT')
@endforeach
@section('scripts') @endsection @endsection