@extends('customers.layout') @section('breadcrumb')

Supplier Profile

@endsection @section('content')
{{-- ── Supplier Header Card ── --}}
{{ strtoupper(substr($supplier->name ?? 'S', 0, 2)) }}

{{ $supplier->name }}

@if($supplier->contact) {{ $supplier->contact }} @endif @if($supplier->alt_contact) {{ $supplier->alt_contact }} @endif
Current Balance

UGX {{ number_format(abs($supplier->balance ?? 0)) }}

{{-- ── Action Buttons ── --}}
@can('edit suppliers') Edit Supplier @endcan @can('delete suppliers') @endcan
{{-- ── Tabs Card ── --}}
{{-- Details Tab --}}
Contact Information
Name: {{ $supplier->name ?: '—' }}
Contact: {{ $supplier->contact ?: '—' }}
Alt. Contact: {{ $supplier->alt_contact ?: '—' }}
Financial Information
Balance: UGX {{ number_format($supplier->balance ?? 0) }}
Created: {{ Carbon\Carbon::parse($supplier->created_at)->format('d M Y, H:i') }}
Updated: {{ Carbon\Carbon::parse($supplier->updated_at)->format('d M Y, H:i') }}
{{-- Intakes Tab --}}
@forelse($supplier->intakes as $intake) @empty @endforelse
Date Branch Inventory Item Rate Quantity Amount Actions
{{ date('d M, Y', strtotime($intake->date)) }} {{ $intake?->summary?->branch?->name ?? '—' }} {{ $intake->inventory?->name ?? '—' }} {{ $intake->rate ? number_format($intake->supplier_rate) : 0 }} {{ $intake->quantity ? number_format($intake->quantity) : 0 }} UGX {{ $intake->amount ? number_format($intake->supplier_rate * $intake->quantity) : 0 }} @if($intake->summary?->status == "Open") @endif
No intake records found
{{-- Payments Tab --}}
@forelse($supplier->payments as $payment) @empty @endforelse
Date Amount Balance After Actions
{{ date('d M, Y', strtotime($payment->date)) }} UGX {{ $payment->amount ? number_format($payment->amount) : '0' }} UGX {{ $payment->amount ? number_format($payment->balance) : '0' }} @can('edit payments') @endcan
No payment records found
{{-- /.tab-content --}}
{{-- /.card-body --}}
{{-- /.card --}}
@endsection