@extends('layouts.dashboard.superadminapp') @section('title', 'Customer/Vendor Report') @section('styles') @endsection @section('content')

UEPL | Customer/Vendor Report

day, 00 month 0000
@if(session('success')) @endif @if(session('error')) @endif
Filter Options
@csrf
Reset
@php $totalRecords = $customers->count(); $totalCustomers = $customers->where('company_role', 'customer')->count(); $totalVendors = $customers->where('company_role', 'vendor')->count(); $activeCount = $customers->filter(fn($c) => $c->status == 1 || strtolower($c->status) == 'active')->count(); $inactiveCount = $totalRecords - $activeCount; @endphp
{{ $totalRecords }}
Total Records
{{ $totalCustomers }}
Customers
{{ $totalVendors }}
Vendors
{{ $activeCount }}
Active
{{ $inactiveCount }}
Inactive
Customer/Vendor Directory
@forelse($customers as $index => $customer) @empty @endforelse
# Role Company Name Email Mobile GST No Company Type Billing Address Contact Persons Status
{{ $index + 1 }} @if(strtolower($customer->company_role) == 'customer') Customer @else Vendor @endif {{ $customer->company }} @if($customer->company_nickname)
({{ $customer->company_nickname }}) @endif
@if($customer->email) {{ $customer->email }} @else - @endif @if($customer->mobile) {{ $customer->mobile }} @else - @endif {{ $customer->gstno ?? '-' }} {{ $customer->company_type ?? '-' }} {{ Str::limit($customer->billing_address, 50) ?? '-' }} @if($customer->contactPersons->count() > 0) {{ $customer->contactPersons->count() }} person(s) @else - @endif @if($customer->status == 1 || strtolower($customer->status) == 'active') Active @else Inactive @endif
No customer/vendor records found. Please adjust filters and try again.
Top Customers
@php $topCustomers = $customers->where('company_role', 'customer')->take(5); @endphp @forelse($topCustomers as $customer) @empty @endforelse
Company Contact Mobile
{{ Str::limit($customer->company, 25) }} {{ $customer->contactPersons->first()->name ?? '-' }} {{ $customer->mobile ?? '-' }}
No customers found
Top Vendors
@php $topVendors = $customers->where('company_role', 'vendor')->take(5); @endphp @forelse($topVendors as $vendor) @empty @endforelse
Company Contact Mobile
{{ Str::limit($vendor->company, 25) }} {{ $vendor->contactPersons->first()->name ?? '-' }} {{ $vendor->mobile ?? '-' }}
No vendors found
@endsection @section('scripts') @endsection