@extends('template.layouts.template-base')
@section('title', 'Manage Clients Details')
@section('content')
Location:{{ $client->billingAddress->city ?? '-' }},{{ $client->billingAddress->state ?? '-' }}
Customer Name GST/VAT Number PAN/Tax Number Contact Person Primary WhatsApp Number Primary Contact Number Primary Email Address PIN Code Address City State Country Billing Addresses
{{ $billing->city ?? '-' }},
{{ $billing->state ?? '-' }},
{{ $billing->country ?? '-' }}
No billing address added Shipping Addresses
{{ $shipping->city ?? '-' }},
{{ $shipping->state ?? '-' }},
{{ $shipping->country ?? '-' }}
No shipping address added Contact Person Primary Contact Number Primary Email Address PIN Code Building number/Street number(name) City State Country Building number/Street number(name) PIN Code City State Country {{ $contact->contact_no }}
{{ $contact->email_address }}
Building number/Street number(name) PIN Code City State Country {{ $contact->contact_no }}
{{ $contact->email_address }}
@else
@endif
{{ $client->name }}
Customer Information
{{ $client->name }}
{{ $client->gst_no }}
{{ $client->pan_no }}
{{ $client->primary_contact_person }}
{{ $client->whatsapp_no }}
{{ $client->primary_contact_no }}
{{ $client->primary_email_address }}
{{ $client->billingAddress->pincode ?? '-' }}
{{ $client->billingAddress->address_line_1 ?? '-' }}
{{ $client->billingAddress->city ?? '-' }}
{{ $client->billingAddress->state ?? '-' }}
{{ $client->billingAddress->country ?? '-' }}
Billing & Shipping
{{ $billing->address_line_1 ?? '-' }}
@if ($billing->address_line_2)
{{ $billing->address_line_2 }}
@endif
{{ $shipping->address_line_1 ?? '-' }}
@if ($shipping->address_line_2)
{{ $shipping->address_line_2 }}
@endif
Registered Address
{{ $client->primary_contact_person }}
{{ $client->primary_contact_no }}
{{ $client->primary_email_address }}
{{ $client->pincode }}
{{ $client->registered_address }}
{{ $client->city }}
{{ $client->state }}
{{ $client->country }}
Billing/Unit Address
Add
billing/shipping address
{{ $billing->unit_name }}
{{ $billing->address_line_1 }}
{{ $billing->pincode }}
{{ $billing->city }}
{{ $billing->state }}
{{ $billing->country }}
@php
// Get contacts that have this unit in their unit_name array
$billingContacts = \App\Models\AddContact::whereJsonContains(
'unit_name',
$billing->unit_name,
)
->whereJsonContains('address_type', 'billing')
->with('designation')
->get();
@endphp
@forelse ($billingContacts as $contact)
Person Name
Designation
Contact Number
Email Address
Action
@empty
{{ $contact->contact_person_name }}
{{ $contact->designation->name ?? 'N/A' }}
@endforelse
No
contacts found
Shipping/Unit Address
{{ $shipping->unit_name }}
{{ $shipping->address_line_1 }}
{{ $shipping->pincode }}
{{ $shipping->city }}
{{ $shipping->state }}
{{ $shipping->country }}
@php
$shippingContacts = \App\Models\AddContact::whereJsonContains(
'unit_name',
$shipping->unit_name,
)
->whereJsonContains('address_type', 'shipping')
->with('designation')
->get();
@endphp
@forelse ($shippingContacts as $contact)
Person Name
Designation
Contact Number
Email Address
Action
@empty
{{ $contact->contact_person_name }}
{{ $contact->designation->name ?? 'N/A' }}
{{-- ✅ EDIT CONTACT --}}
{{-- ✅ DELETE CONTACT (NOT unit) --}}
@endforelse
No
contacts found