@extends('layouts.app') @section('style') @endsection @section('content')

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

@if($errors->any()) @endif @if(session('success')) @endif @if(session('error')) @endif
@csrf @method('PUT')
Basic Information
@error('name')
{{ $message }}
@enderror
@error('sku')
{{ $message }}
@enderror
Stock Keeping Unit - must be unique
@error('barcode')
{{ $message }}
@enderror
@error('ref_number')
{{ $message }}
@enderror
@error('category_id')
{{ $message }}
@enderror
@error('brand_id')
{{ $message }}
@enderror
@error('supplier_id')
{{ $message }}
@enderror
@error('unit_id')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
@error('short_description')
{{ $message }}
@enderror
Pricing
KES
@error('cost_price')
{{ $message }}
@enderror
KES
@error('sale_price')
{{ $message }}
@enderror
KES
@error('wholesale_price')
{{ $message }}
@enderror
KES
@error('discount_price')
{{ $message }}
@enderror
%
@error('discount_percent')
{{ $message }}
@enderror
Enter either discount price or percentage (not both)
@php // Determine tax status based on product data $taxStatus = 'vat'; $taxId = old('tax_id', $product->tax_id); $hasVat = old('has_vat', $product->has_vat); if ($taxId && $hasVat) { $taxRate = $taxes->where('id', $taxId)->first()->rate ?? 0; $taxStatus = $taxRate == 0 ? 'zero' : 'vat'; } elseif (!$hasVat) { $taxStatus = 'exempt'; } $zeroRatedTax = $taxes->where('rate', 0)->first(); @endphp
Tax Configuration
@error('tax_id')
{{ $message }}
@enderror
Select applicable VAT rate (16%, 8%, etc.)
Selected: (%)
Understanding Tax Options:
  • VAT Taxable: Product is subject to VAT (select a rate above)
  • Zero-Rated VAT: VAT applies at 0% rate (for exports/essentials)
  • VAT Exempt: No VAT applies at all (exempt by law)
Tax & Price Preview
Sale Price
KES 0.00
Tax Rate
0%
Tax Amount
KES 0.00
Total Price
KES 0.00
Current Status: @if($taxStatus == 'vat') VAT Taxable @if($taxId) ({{ $taxes->where('id', $taxId)->first()->rate ?? '0' }}%) @endif @elseif($taxStatus == 'zero') Zero-Rated VAT (0%) @else VAT Exempt (No VAT) @endif
Inventory Management
@error('stock')
{{ $message }}
@enderror
@error('reorder_point')
{{ $message }}
@enderror
Alert when stock reaches this level
@error('minimum_stock')
{{ $message }}
@enderror
@error('maximum_stock')
{{ $message }}
@enderror
Maximum stock capacity (optional)
Stock Status: {{ ucfirst($product->stock_status) }}
Expiry & Batch Tracking
has_expiry) ? 'checked' : '' }}>
track_batches) ? 'checked' : '' }}>
@error('expiry_warning_days')
{{ $message }}
@enderror
Alert before expiry
Expiry Tracking: For products with expiry dates (food, medicine, etc.)
Batch Tracking: Track stock by batches/lots. Required for expiry tracking.
Product Image
@if($product->image) {{ $product->name }}
@else

No image uploaded

@endif

Click to upload or drag and drop

PNG, JPG, GIF up to 2MB

Status & Options
@error('status')
{{ $message }}
@enderror
is_featured) ? 'checked' : '' }}>
is_new) ? 'checked' : '' }}>
is_bestseller) ? 'checked' : '' }}>
track_inventory ?? true) ? 'checked' : '' }}>
@endsection @section('script') @endsection