@extends('layouts.tenant') @section('title', 'Client Details - ' . $client->name) @section('content')

{{ $client->name }}

Client since {{ $client->created_at->format('M d, Y') }} {{ ucfirst($client->status) }}

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Total Documents

{{ number_format($stats['total_documents']) }}

Total Revenue

${{ number_format($stats['total_revenue'], 2) }}

Total Invoices

{{ number_format($stats['total_invoices']) }}

Pending Amount

${{ number_format($stats['pending_amount'], 2) }}

Contact Information

{{ $client->name }}

@if($client->phone) @endif @if($client->company)

{{ $client->company }}

@endif @if($client->tax_id)

{{ $client->tax_id }}

@endif
@if($client->address || $client->city || $client->state || $client->zip_code || $client->country)

Address

@if($client->address)

{{ $client->address }}

@endif

@if($client->city){{ $client->city }}@endif @if($client->city && $client->state), @endif @if($client->state){{ $client->state }}@endif @if($client->zip_code) {{ $client->zip_code }}@endif

@if($client->country)

{{ $client->country }}

@endif
@endif @if($client->notes)

Notes

{{ $client->notes }}

@endif

Quick Actions

Create Invoice Upload Document Send Message @if($client->status === 'active')
@csrf @method('PATCH')
@elseif($client->status === 'archived')
@csrf @method('PATCH')
@endif

Paid

{{ $stats['paid_invoices'] }}

Pending

{{ $stats['pending_invoices'] }}

Overdue

{{ $stats['overdue_invoices'] }}

Messages

{{ $stats['total_messages'] }}

Recent Documents

View All
@if($recentDocuments->count() > 0)
@foreach($recentDocuments as $document) @endforeach
Name Type Size Status Uploaded Actions
{{ $document->name }} {{ strtoupper($document->type) }} {{ number_format($document->size / 1024, 2) }} KB {{ ucfirst($document->status) }} {{ $document->created_at->format('M d, Y') }}
@else

No documents uploaded yet.

Upload First Document
@endif

Recent Invoices

View All
@if($recentInvoices->count() > 0)
@foreach($recentInvoices as $invoice) @endforeach
Invoice # Amount Due Date Status Actions
{{ $invoice->invoice_number }} ${{ number_format($invoice->amount, 2) }} {{ $invoice->due_date->format('M d, Y') }} {{ ucfirst($invoice->status) }}
@else

No invoices created yet.

Create First Invoice
@endif

Recent Messages

View All
@if($recentMessages->count() > 0)
@foreach($recentMessages as $message)

{{ ucfirst($message->type) }} Message

{{ $message->created_at->diffForHumans() }}

{{ Str::limit($message->message, 100) }}

@if($message->status === 'unread') Unread @endif
@endforeach
@else

No messages yet.

Send First Message
@endif
@endsection