@extends('layouts.app') @section('title', 'Supplier Details') @section('content')

{{ $supplier->name }}

Supplier Details

Edit Supplier Back to Suppliers
Supplier Information
Supplier Name
{{ $supplier->name }}
Supplier ID
{{ $supplier->id }}
Contact Person
{{ $supplier->contact_person ?? 'N/A' }}
Phone
{{ $supplier->phone ?? 'N/A' }}
Email
@if($supplier->email) {{ $supplier->email }} @else N/A @endif
Address
{{ $supplier->address ?? 'N/A' }}
Created
{{ $supplier->created_at->format('M d, Y') }}
Last Updated
{{ $supplier->updated_at->format('M d, Y') }}
Products {{ $supplier->products->count() }}
@if($supplier->products->count() > 0)
@foreach($supplier->products as $product) @endforeach
Product Name Category Purchase Price Sale Price Stock Actions
{{ $product->name }} @if($product->category) {{ $product->category->name }} @else N/A @endif BDT {{ number_format($product->purchase_price ?? 0, 2) }} BDT {{ number_format($product->sale_price ?? 0, 2) }} {{ $product->quantity }}
@else

No products found for this supplier

@endif
Stock Entries {{ $supplier->stockEntries->count() }}
@if($supplier->stockEntries->count() > 0)
@foreach($supplier->stockEntries as $entry) @endforeach
Date Product Quantity Purchase Price
{{ $entry->date ? \Carbon\Carbon::parse($entry->date)->format('M d, Y') : 'N/A' }} @if($entry->product) {{ $entry->product->name }} @else N/A @endif {{ $entry->quantity }} BDT {{ number_format($entry->purchase_price ?? 0, 2) }}
@else

No stock entries found

@endif
Quick Stats
Total Products
{{ $supplier->products->count() }}
Total Stock Entries
{{ $supplier->stockEntries->count() }}
Total Stock Quantity
{{ $supplier->stockEntries->sum('quantity') }}
@endsection