@extends('layouts.admin') @section('title', 'Clients / Customers') @section('page-title', 'Clients / Customers') @section('content')
@if(!$panelOpen) {{-- Full table listing --}}
New Export
Clear
@if($customers->isNotEmpty())
@php $thSort = fn ($col) => route('admin.customers.index', array_merge(request()->query(), [ 'sort' => $col, 'dir' => ($sortBy === $col && $sortDir === 'asc') ? 'desc' : 'asc', ])); @endphp @foreach($customers as $customer) @endforeach
Company name Contact name Balance Billing address City Email Phone Notes
{{ $customer->name }} {{ $customer->contact_person ?? '—' }} ₹{{ number_format($customer->currentBalance(), 2) }} {{ $customer->billingAddressShort() }} {{ $customer->city ?? '—' }} {{ $customer->email ?? '—' }} {{ $customer->phone ?? '—' }} {{ Str::limit($customer->notes, 40) ?: '—' }}
@else
@include('admin.customers.partials.empty')
@endif
@else {{-- Master-detail panel --}}
@include('admin.customers.partials.sidebar-toolbar')
@if($selected)
Edit @if($view === 'statement') @else Statement @endif
@if($view === 'statement' && $statement) @include('admin.customers.partials.statement') @else @include('admin.customers.partials.detail') @endif
@endif
@endif
@endsection @push('scripts') @endpush