{{-- resources/views/admin/customers/show.blade.php --}} @extends('layouts.app') @section('title', $customer->display_name . ' - Customer Details') @push('styles') @endpush @section('content')
{{ $customer->avatar }}

{{ $customer->display_name }}

{{ $customer->customer_id }} {{ \App\Helpers\StaticData::CustomerStatus($customer->status) }} {{ \App\Helpers\StaticData::CustomerType($customer->type) }} {{ ucfirst($customer->source) }} @if($customer->isVerified()) Verified @endif

Created on {{ $customer->created_at->format('F d, Y') }} @if($customer->creator) by {{ $customer->creator->name }} @endif

{{-- @can('customers.edit') Edit @endcan --}} @can('tickets.create') New Ticket @endcan
Basic Information
Customer ID
{{ $customer->customer_id }}
Type
{{ \App\Helpers\StaticData::CustomerType($customer->type) }}
Status
{{ \App\Helpers\StaticData::CustomerStatus($customer->status) }}
Source
{{ ucfirst($customer->source) }}
@if($customer->company_name)
Company
{{ $customer->company_name }}
@endif @if($customer->website) @endif
System Information
Customer ID
{{ $customer->customer_id }}
Created By
@if($customer->creator) {{ $customer->creator->name }} @else System @endif
Created Date
{{ $customer->created_at->format('M d, Y') }}
Last Updated
{{ $customer->updated_at->format('M d, Y') }}
Source
{{ ucfirst($customer->source) }}
Type
{{ \App\Helpers\StaticData::CustomerType($customer->type) }}
Email Verification Status
@if($customer->isVerified()) Verified on {{ $customer->email_verified_at->format('M d, Y') }} @else Not Verified @endif
@if(!$customer->isVerified() && auth()->user()->can('customers.verify')) @endif
@if($customer->notes)
Notes
{{ $customer->notes }}
@endif
Contact Details
Email
@if($customer->email) {{ $customer->email }} @else Not provided @endif
Phone
@if($customer->phone) {{ $customer->phone }} @else Not provided @endif
Mobile
@if($customer->mobile) {{ $customer->mobile }} @else Not provided @endif
@if($customer->vat_number || $customer->gst_number)
@if($customer->vat_number)
VAT Number
{{ $customer->vat_number }}
@endif @if($customer->gst_number)
GST Number
{{ $customer->gst_number }}
@endif
@endif
Address
@if($customer->address || $customer->city || $customer->state)
@if($customer->address) {{ $customer->address }}
@endif @if($customer->city) {{ $customer->city }}, @endif @if($customer->state) {{ $customer->state }}
@endif @if($customer->country) {{ $customer->country }} @endif @if($customer->postal_code) - {{ $customer->postal_code }} @endif
@else
No address provided
@endif
Credit Information
Credit Limit
{{ number_format($customer->credit_limit, 2) }}
Current Balance
{{ number_format($customer->balance, 2) }}
Available Credit
{{ number_format($customer->credit_limit - $customer->balance, 2) }}
Credit Status
@php $usagePercentage = $customer->credit_limit > 0 ? min(100, ($customer->balance / $customer->credit_limit) * 100) : 0; $progressClass = 'bg-success'; if ($usagePercentage > 75) $progressClass = 'bg-danger'; elseif ($usagePercentage > 50) $progressClass = 'bg-warning'; @endphp
{{ round($usagePercentage) }}%
Credit Utilization
@if($customer->hasOutstandingBalance())
Customer has outstanding balance of {{ number_format($customer->balance, 2) }}
@endif
@can('customers.edit') @endcan
@if($customer->tickets->count() > 0)
@foreach($customer->tickets as $ticket) @endforeach
Ticket ID Subject Status Priority Created Actions
{{ $ticket->r_id }} {{ Str::limit($ticket->subject, 50) }} @if($ticket->status) {{ $ticket->status->name }} @endif @if($ticket->priority) {{ $ticket->priority->name }} @endif {{ $ticket->created_at->format('M d, Y') }}
@else
No Tickets Found

This customer hasn't created any tickets yet.

@can('tickets.create') Create First Ticket @endcan
@endif
@if($customer->parent || $customer->children->count() > 0) @if($customer->parent)
Parent Customer
{{ $customer->parent->avatar }}
{{ $customer->parent->display_name }}
{{ $customer->parent->customer_id }}
View Details
@endif @if($customer->children->count() > 0)
Child Customers ({{ $customer->children->count() }})
@foreach($customer->children as $child)
{{ $child->avatar }}
{{ $child->display_name }}
{{ $child->customer_id }}
@endforeach
@endif @if($customer->hierarchy_type)
Hierarchy Information
Hierarchy Type
{{ $customer->hierarchy_type }}
@endif @else
No Hierarchy Defined

This customer doesn't have any parent or child relationships.

@can('customers.edit') Edit Hierarchy @endcan
@endif
@endsection @push('scripts') @endpush