@extends('template.layouts.template-base') @section('title', 'Customer - Details') @section('styles') @endsection @section('content')
  • English
  • Tamil
Customer Details
@if($customer->user?->image) {{ $customer->name }} @endif
{{ $customer->user?->name }}
{{ $customer->user?->mobile }}
{{-- Contact Information --}}
Contact Information
@if($customer->user?->email)

{{ $customer->user->email}}

@endif {{-- Fix #1 — check defaultAddress before accessing alternate_mobile --}} @if($customer->defaultAddress?->alternate_mobile)

{{ $customer->defaultAddress->alternate_mobile }}

@endif
{{-- Delivery Address --}} @if($customer->defaultAddress)
Delivery Address

{{ $customer->defaultAddress->address_line_1 }} @if($customer->defaultAddress->address_line_2) , {{ $customer->defaultAddress->address_line_2 }} @endif
@if($customer->defaultAddress->panchayat) {{ $customer->defaultAddress->panchayat }}, @endif @if($customer->defaultAddress->taluk) {{ $customer->defaultAddress->taluk }}, @endif @if($customer->defaultAddress->district) {{ $customer->defaultAddress->district }} @endif @if($customer->defaultAddress->pincode) - {{ $customer->defaultAddress->pincode }}. @endif

Map @if($customer->defaultAddress->latitude && $customer->defaultAddress->longitude) View Map @else View Map @endif
@else
Delivery Address

No address added yet.

@endif {{-- Billing Address --}} @php $billingAddress = $customer->addresses->where('address_type', 'billing')->first(); @endphp
Billing Address
@if($billingAddress)

{{ $billingAddress->address_line_1 }} @if($billingAddress->address_line_2) , {{ $billingAddress->address_line_2 }} @endif
@if($billingAddress->panchayat) {{ $billingAddress->panchayat }}, @endif @if($billingAddress->taluk) {{ $billingAddress->taluk }}, @endif @if($billingAddress->district) {{ $billingAddress->district }} @endif @if($billingAddress->pincode) - {{ $billingAddress->pincode }}. @endif

@else

Same as delivery address.

@endif
Cattle Details
Customer Cow {{ $customer->cow_count ?? 0 }}
Customer Buffalo {{ $customer->buffalo_count ?? 0 }}
Customer Goat {{ $customer->goat_count ?? 0 }}
Total Sales

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

Total Orders

{{ $stats['total_orders'] }}

Delivered

{{ $stats['delivered'] }}

In Progress

{{ $stats['in_progress'] }}

{{-- Orders Tab --}}
Order ID Quantity Order Date Total Amount Status Action
{{-- Payments Tab --}}
Payment Details
Delivered
Order Details
Order ID
#2345678678
Quantity
3 Items
Total Kgs
100kg
Ordered Date
09 Jan 2026
Paid Date
09 Jan 2026
Payment Method
UPI
Payment Summary
Paid
Subtotal ₹0000
Discount (10%) ₹0000
Shipping Cost ₹0000
Tax (08%) ₹0000

Total ₹0000
@endsection @section('scripts') @endsection