@extends('layouts.app') @section('title', $client->company_name) @section('back', route('clients.index')) @section('content') @php $badgeClass = $displayStatus === 'Good Standing' ? 'g' : 'r'; @endphp
{{ $client->contact_person ?: 'Contact: Not provided' }}
{{ $client->phone ?: 'Not provided' }} · {{ $client->email ?: 'Not provided' }}
TIN: {{ $client->tin_number ?: 'Not provided' }}
Active Projects
{{ $activeProjectsCount }}
Outstanding Balance
{{ \App\Support\Format::mwk($outstanding) }}
Total Invoiced
{{ \App\Support\Format::mwk($totalInvoiced) }}
Paid Amount
{{ \App\Support\Format::mwk($paidAmount) }}
Projects
@forelse($client->projects as $p) @php $pb = match ($p->status) { 'On Track' => 'g', 'At Risk' => 'r', 'Completed' => 's', 'On Hold' => 'v', default => 'a', }; @endphp{{ $p->name }}
{{ $p->location ?: 'Location TBD' }} · Due {{ $p->due_date?->format('M Y') ?? 'TBD' }}
Progress {{ $p->progress_percentage }}%
{{ \App\Support\Format::mwk($p->profit, true) }}
{{ $p->status }}No projects linked to this client.
@endforelseInvoice History
@forelse($client->invoices as $i){{ $i->invoice_number }}
{{ $i->project?->name ?? 'No project' }}
{{ $i->description ?: '—' }}
Invoiced {{ $i->invoice_date?->format('M j, Y') ?? '—' }} · Due {{ $i->due_date?->format('M j, Y') ?? '—' }}
{{ \App\Support\Format::mwk($i->total_amount) }}
{{ $i->status }}No invoices issued to this client.
@endforelseEdit Client