@extends('layouts.app') @section('content')
← Back to Stocks

Stock Details

Product Information

Product Name: {{ $stock->product->product_name }}
SKU: {{ $stock->product->sku }}
Category: {{ $stock->product->category->name ?? 'N/A' }}
Brand: {{ $stock->product->brand->name ?? 'N/A' }}
Description:

{{ $stock->product->description ?? 'N/A' }}

Batch Information

Batch Number: {{ $stock->batch->batch_number }}
Barcode:
GRN Number: {{ $stock->batch->goodReceiveNote->grn_number }}
Supplier: {{ $stock->batch->goodReceiveNote->supplier->company_name }}
Manufacture Date: {{ $stock->batch->manufacture_date?->format('Y-m-d') ?? 'N/A' }}
Expiry Date: @if ($stock->batch->expiry_date) {{ $stock->batch->expiry_date->format('Y-m-d') }} @if ($stock->batch->expiry_date < now()) (Expired) @elseif($stock->batch->expiry_date < now()->addDays(30)) (Expiring Soon) @endif @else N/A @endif
View Full Batch Details →

Pricing & Financial

Cost Price: ${{ number_format($stock->cost_price, 2) }}
Selling Price: ${{ number_format($stock->selling_price, 2) }}
Tax: {{ $stock->tax }}%
Profit Margin: ${{ number_format($profitMargin, 2) }} ({{ number_format($profitPercentage, 1) }}%)
Total Value: ${{ number_format($totalValue, 2) }}
Potential Revenue: ${{ number_format($potentialRevenue, 2) }}

Quantity & Status

Total Quantity: {{ number_format($stock->quantity, 0) }}
Available Quantity: {{ number_format($stock->available_quantity, 0) }}

{{ $stock->quantity > 0 ? number_format(($stock->available_quantity / $stock->quantity) * 100, 1) : 0 }}% remaining

Sold/Used: {{ number_format($stock->quantity - $stock->available_quantity, 0) }}
Status: @if ($stock->available_quantity == 0) Out of Stock @elseif($stock->available_quantity <= $stock->quantity / 2) Low Stock @else In Stock @endif
@endsection