@extends('layouts.app') @section('title', $customer->customer_id . ' - ' . $customer->customer_name) @section('content')
Back to Customers
{{ strtoupper(substr($customer->customer_name, 0, 2)) }}

{{ $customer->customer_id }} - {{ $customer->customer_name }}

{{ $customer->customer_id }}

Edit @if($customer->status) Active @else Inactive @endif

Basic Info

Customer ID
{{ $customer->customer_id }}
Type
{{ $customer->customer_type === 'dealer' ? 'Distributor' : ($customer->customer_type === 'shop' ? 'Shop' : ($customer->customer_type === 'ecom' ? 'Ecom' : ($customer->customer_type === 'customer' ? 'Customer' : ucfirst($customer->customer_type)))) }}
Currency
{{ $customer->currency }}
Created
{{ $customer->created_at->format('d M, Y h:i A') }}
@if($customer->creator)
Created By
{{ $customer->creator->name }}
@endif @if($customer->updater && $customer->updater->id !== $customer->creator?->id)
Last Updated By
{{ $customer->updater->name }}
@endif

Tax Info

Trade Name
{{ $customer->trade_name ?? '—' }}
GST Number
{{ $customer->gst_number ?? '—' }}
PAN Number
{{ $customer->pan_number ?? '—' }}
Tax %
{{ $customer->tax_percentage }}%

Contact

Email
{{ $customer->email ?? '—' }}
WhatsApp Number
{{ $customer->whatsapp_number ?? '—' }}
Alternate Number
{{ $customer->alternate_number ?? '—' }}

Billing Address

@if($customer->billing_address || $customer->billing_district || $customer->billing_state || $customer->billing_pincode)

{{ $customer->billing_address }}

{{ $customer->billing_district }}{{ $customer->billing_district && $customer->billing_state ? ', ' : '' }}{{ $customer->billing_state }}

{{ $customer->billing_pincode }}{{ $customer->billing_pincode && $customer->billing_country ? ', ' : '' }}{{ $customer->billing_country }}

@else

@endif

Shipping Address

@if($customer->shipping_same_as_billing)

Same as Billing Address

@elseif($customer->shipping_address || $customer->shipping_district || $customer->shipping_state || $customer->shipping_pincode)

{{ $customer->shipping_address }}

{{ $customer->shipping_district }}{{ $customer->shipping_district && $customer->shipping_state ? ', ' : '' }}{{ $customer->shipping_state }}

{{ $customer->shipping_pincode }}{{ $customer->shipping_pincode && $customer->shipping_country ? ', ' : '' }}{{ $customer->shipping_country }}

@else

@endif
@if($invoices->isNotEmpty())

Invoice History

@foreach($invoices as $invoice) @endforeach
Invoice # Date Amount Status Action
{{ $invoice->invoice_number }} {{ $invoice->invoice_date->format('d M Y') }} ₹{{ number_format($invoice->grand_total, 2) }} @php $statusClasses = [ 'paid' => 'badge-success', 'pending' => 'badge-warning', 'overdue' => 'badge-danger', 'cancelled' => 'badge-gray', 'draft' => 'badge-info', ]; $class = $statusClasses[$invoice->status] ?? 'badge-gray'; @endphp {{ $invoice->status }} View
@else

No invoices yet

This customer has no invoice history.

@endif
@endsection