← Back to products
@php $mrp = (float) $product->mrp; // purchase_price is stored ex-GST, while MRP and every selling tier are quoted with // GST - shown with GST here so the cards (and the "% off MRP") compare like with like. $purchaseExGst = $product->purchase_price !== null ? (float) $product->purchase_price : null; $purchaseWithGst = $purchaseExGst !== null ? round($purchaseExGst * (1 + (float) $product->gst_rate / 100), 2) : null; $priceCards = [ 'Purchase Price (incl. GST)' => $purchaseWithGst, 'Distributor Price' => $product->distributor_price, 'Retailer Price' => $product->retailer_price, 'Selling Price' => $product->selling_price, ]; @endphp {{ $product->is_active ? 'Active' : 'Inactive' }} @foreach ($priceCards as $label => $price) @php $off = ($mrp > 0 && $price !== null && (float) $price > 0) ? rtrim(rtrim(number_format(($mrp - (float) $price) / $mrp * 100, 2), '0'), '.').'% off MRP' : null; $gstNote = ($purchaseWithGst !== null && $price === $purchaseWithGst && (float) $product->gst_rate > 0) ? number_format($purchaseExGst, 2).' + '.rtrim(rtrim(number_format((float) $product->gst_rate, 2), '0'), '.').'% GST' : null; @endphp @endforeach
Stock by Warehouse
@forelse ($stockByWarehouse as $balance)
{{ $balance->warehouse->name }}: {{ $balance->quantity }}
@empty No stock recorded yet. @endforelse
Suppliers
@forelse ($suppliers as $supplier) {{ $supplier->name }} @empty None yet. @endforelse
Customers
@forelse ($customers as $customer)
{{ $customer->name }} {{ $customer->quantity }} pcs · {{ $customer->bills }} {{ \Illuminate\Support\Str::plural('bill', $customer->bills) }}
@empty None yet. @endforelse
@if ($activity->isNotEmpty())

Price Changes & Activity

@foreach ($activity as $entry)
{{ $entry->description }} {{ $entry->created_at->format('d M Y, H:i') }}
@endforeach
@endif

Stock History

@can('inventory.view') Full movement log → @endcan
@if ($movements->isEmpty()) @else
@foreach ($movements as $movement) @php $ref = $this->movementRef($movement); @endphp @endforeach
Date Type Warehouse Document Quantity Balance After
{{ $movement->created_at->format('d M Y, H:i') }} $movement->quantity > 0, 'bg-red-50 text-red-700 dark:bg-red-500/10 dark:text-red-400' => $movement->quantity < 0, ])> {{ str($movement->type)->replace('_', ' ')->title() }} {{ $movement->warehouse->name }} @if ($ref) {{ $ref['label'] }} {{ $ref['kind'] }} @else — @endif $movement->quantity > 0, 'text-red-600 dark:text-red-400' => $movement->quantity < 0, ])> {{ $movement->quantity > 0 ? '+' : '' }}{{ $movement->quantity }} {{ $movement->balance_after }}
{{ $movements->links() }}
@endif