@extends('layouts.app') @section('title', 'Customer List') @section('content')

Customer List & Accounts

View customer details, outstanding balances and statements. Use Clear debt to record a repayment.

@include('components.data-transfer', ['type'=>'customers','label'=>'Customers','exportPermission'=>'customers.view','managePermission'=>'customers.manage']) @can('customers.manage') @endcan

Customers on this page

{{ $customers->count() }}

Outstanding on this page

KSh {{ number_format($customers->sum('balance'), 2) }}

Total customer records

{{ $customers->total() }}

@if(request('search'))Clear@endif
@forelse ($customers as $customer) @empty @endforelse
NamePhoneKRA PINCredit limitBalance owedStatus
{{ $customer->name }} {{ $customer->phone ?? '—' }} {{ $customer->kra_pin ?? '—' }} {{ number_format($customer->credit_limit, 2) }} {{ number_format($customer->balance, 2) }} {{ $customer->is_active ? 'Active' : 'Inactive' }}
Statement @if($customer->balance > 0.009) Clear debt @endif @if(auth()->user()->hasRole('administrator', 'manager')) Edit
@csrf @method('DELETE')
@endif
No customer accounts yet.
{{ $customers->links() }}
@csrf
@endsection