@extends('layouts.admin') @section('title', 'Customer ' . $customer->name) @section('page-title', 'Customer Details') @section('breadcrumbs') Customers chevron_right {{ $customer->name }} @endsection @section('header-actions')
edit Edit
@endsection @section('content')

{{ $customer->name }}

@if($customer->company)

{{ $customer->company }}

@endif
{{ $customer->is_active ? 'Active' : 'Inactive' }}

Contact Information

@if($customer->email)

Email: {{ $customer->email }}

@endif @if($customer->phone)

Phone: {{ $customer->phone }}

@endif @if($customer->address)

Address: {{ $customer->address }}

@endif @if($customer->city || $customer->state || $customer->zip)

Location: {{ implode(', ', array_filter([$customer->city, $customer->state, $customer->zip])) }} @if($customer->country) , {{ $customer->country }} @endif

@endif @if($customer->tax_id)

Tax ID: {{ $customer->tax_id }}

@endif

Statistics

Total Invoices: {{ $customer->invoices->count() }}
Total Estimates: {{ $customer->estimates->count() }}
Total Payments: {{ $customer->payments->count() }}
@if($customer->notes)

Notes

{{ $customer->notes }}

@endif
@if($customer->invoices->count() > 0)

Recent Invoices

@foreach($customer->invoices->take(10) as $invoice) @endforeach
Invoice # Date Due Date Amount Status Actions
{{ $invoice->invoice_number }} {{ $invoice->issue_date->format('M d, Y') }} {{ $invoice->due_date->format('M d, Y') }} {{ $invoice->currency }} {{ number_format($invoice->total, 2) }} @php $statusColors = [ 'draft' => 'bg-gray-100 text-gray-700', 'sent' => 'bg-blue-100 text-blue-700', 'viewed' => 'bg-purple-100 text-purple-700', 'partial' => 'bg-yellow-100 text-yellow-700', 'paid' => 'bg-green-100 text-green-700', 'overdue' => 'bg-red-100 text-red-700', ]; $status = $invoice->isOverdue() ? 'overdue' : $invoice->status; @endphp {{ ucfirst($status) }} View
@endif
@endsection