@extends('layouts.app') @section('title', 'Product Details') @section('content') @can('view_products')

{{ $product->name }}

← Back to Products
@can('edit_products') Edit @endcan

Product Information

Generic Name

{{ $product->generic_name ?? '-' }}

Category

{{ $product->category->name }}

Supplier

{{ $product->supplier?->name ?? '-' }}

Batch No

{{ $product->batch_no ?? '-' }}

Barcode

{{ $product->barcode ?? '-' }}

Unit

{{ $product->unit }}

Manufacturer

{{ $product->manufacturer ?? '-' }}

Expiry Date

{{ displayDate($product->expiry_date) }}

Description

{{ $product->description ?? '-' }}

@if($recentSales->count() > 0)

Recent Sales

@foreach($recentSales as $item) @endforeach
Invoice Qty Price Date
{{ $item->sale->invoice_no }} {{ $item->quantity }} ${{ number_format($item->price, 2) }} {{ displayDate($item->sale->created_at) }}
@endif
@if($product->image)
@endif

Pricing & Stock

Cost Price${{ number_format($product->cost_price, 2) }}
Selling Price${{ number_format($product->selling_price, 2) }}
@if($product->isOnPromo())
Promo Price${{ number_format($product->promo_price, 2) }}
Promo Period{{ $product->promo_start ? displayDate($product->promo_start) : 'Any' }} - {{ $product->promo_end ? displayDate($product->promo_end) : 'Any' }}
@endif
Profit/Unit${{ number_format($product->selling_price - $product->cost_price, 2) }}
Current Stock{{ $product->quantity }}
Reorder Level{{ $product->reorder_level }}

Status

@if($product->is_active) Active @else Inactive @endif @if($product->isExpired()) Expired @endif @if($product->isLowStock()) Low Stock @endif
@if($product->branches->count() > 0)

Branch Stock

@foreach($product->branches as $branch)
{{ $branch->name }} {{ $branch->pivot->quantity }}
@endforeach
@endif
@endcan @endsection