@extends('template.layouts.template-base')
@section('title', 'Client Details - Client Master')
@section('content')
Customer ID: {{ $client->client_no }}
Location:{{ $client->billingAddress->city ?? '-' }},{{ $client->billingAddress->state ?? '-' }}
Status
Total Quotes
Total Sales
Conversion Rate
Last Engagement
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 }}
{{ $totalquotes }}
{{-- ↓ 2% from last year --}}
{{ $totalsales }}
{{-- ₹ 58.2L value --}}
{{ $conversionRate }}%
{{ $daysAgo ?? 0 }}
days ago
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->pincode ?? '-' }}
{{ $client->registered_address ?? '-' }}
{{ $client->city ?? '-' }}
{{ $client->state ?? '-' }}
{{ $client->country ?? '-' }}
Billing & Shipping
{{ $billing->unit_name ?? '-' }}
{{ $billing->address_line_1 ?? '-' }}
@if ($billing->address_line_2)
{{ $billing->address_line_2 }}
@endif
{{ $shipping->unit_name ?? '-' }}
{{ $shipping->address_line_1 ?? '-' }}
@if ($shipping->address_line_2)
{{ $shipping->address_line_2 }}
@endif
@forelse($quotations as $quotation)
Quotation ID
Subject
Amount
Date
Valid Till
Sales Person
Version
Status
@empty
{{ $quotation->quotation_no }}
{{ $quotation->subject ?? '-' }}
₹{{ number_format($quotation->total_amount, 2) }}
{{ \Carbon\Carbon::parse($quotation->quote_date)->format('d M, Y') }}
{{ \Carbon\Carbon::parse($quotation->quote_date)->addDays($quotation->validity)->format('d M, Y') }}
{{ $quotation->user->name ?? '-' }}
V1
@if ($quotation->is_rejected == 1)
Rejected
@elseif($quotation->status == 1)
In-Progress
@elseif($quotation->status == 2)
Follow Up
@elseif($quotation->status == 3)
Expired
@elseif($quotation->status == 4)
Draft
@elseif($quotation->status == 8)
Converted
@endif
@endforelse
No quotations found
@forelse($salesOrders as $order)
Sales Order ID
Quotation ID
Subject
Client Name
Amount
Convert Date
Sales Person
Action
@empty
{{ $order->sales_order_no }}
{{ $order->quotation_no }}
{{ $order->subject ?? '-' }}
{{ $order->client->name ?? '-' }}
₹{{ number_format($order->total_amount, 2) }}
{{ \Carbon\Carbon::parse($order->created_at)->format('d M, Y') }}
{{ $order->user->name ?? '-' }}
@endforelse
No Sales Orders Found
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
Attachment has been deleted successfully!