@extends('layouts.admin') @section('title', 'Customer Details - ' . $customer->name) @section('page-title', 'Customer Details') @section('breadcrumbs') Customers chevron_right {{ $customer->name }} @endsection @section('header-actions')
edit Edit arrow_back Back
@endsection @section('content')
@if($customer->image && file_exists(storage_path('app/public/' . $customer->image)))
@else
{{ strtoupper(substr($customer->name, 0, 1)) }}
@endif

{{ $customer->name }}

@if($customer->company)

{{ $customer->company }}

@endif
@if($customer->email) @endif @if($customer->phone) @endif @if($customer->website) @endif
{{ $customer->is_active ? 'Active' : 'Inactive' }}
Total Invoices description

{{ $customer->invoices ? $customer->invoices->count() : 0 }}

Outstanding Balance account_balance_wallet
@php $balance = $customer->invoices ? $customer->invoices->sum('balance') : 0; @endphp

${{ number_format($balance, 2) }}

Total Paid payments
@php $paid = $customer->invoices ? $customer->invoices->sum('paid_amount') : 0; @endphp

${{ number_format($paid, 2) }}

Total Revenue trending_up
@php $total = $customer->invoices ? $customer->invoices->sum('total') : 0; @endphp

${{ number_format($total, 2) }}

Contact Information

{{ $customer->email ?? 'N/A' }}

{{ $customer->phone ?? 'N/A' }}

@if($customer->company)

{{ $customer->company }}

@endif @if($customer->website)

{{ $customer->website }}

@endif

Address

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

@if($customer->address){{ $customer->address }}
@endif @if($customer->city || $customer->state || $customer->zip) {{ $customer->city }}{{ $customer->city && $customer->state ? ', ' : '' }}{{ $customer->state }} {{ $customer->zip }} @endif @if($customer->country)
{{ $customer->country }} @endif

@else

No address information available

@endif
@if($customer->notes)

Notes

{{ $customer->notes }}

@endif

Recent Invoices

View All
@if($customer->invoices && $customer->invoices->count() > 0)
@foreach($customer->invoices->take(5) as $invoice) @endforeach
Invoice # Date Due Date Amount Balance Status
{{ $invoice->invoice_number }} {{ $invoice->issue_date->format('M d, Y') }} {{ $invoice->due_date->format('M d, Y') }} ${{ number_format($invoice->total, 2) }} ${{ number_format($invoice->balance, 2) }} {{ ucfirst($invoice->status) }}
@else

No invoices found for this customer

@endif
@endsection