@extends('layouts.app')
@section('title', 'Clients')
@section('content')
@php
$pills = filter_pills([
'status' => ['Status', ['active' => 'Active', 'inactive' => 'Inactive']],
'city' => ['City'],
'country' => ['Country', fn ($c) => \App\Support\Countries::name($c)],
'balance' => ['Balance', ['owing' => 'Owes money']],
]);
$chips = [[null, 'All', $counts['all']], ['active', 'Active', $counts['active']], ['inactive', 'Inactive', $counts['inactive']]];
$filtered = count($pills) > 0 || request()->filled('q');
@endphp
| Contact | Actions | |||||
|---|---|---|---|---|---|---|
|
|
{{ $c->contact_person ?: '—' }}{{ $c->phone }} | {{ $c->city ?: ($c->countryName() ?: '—') }}@if ($c->city && $c->countryName()){{ $c->countryName() }}@endif | {{ money($c->billed()) }} | {{ money($c->received()) }} | {{ money($c->balance()) }} @if ($c->credit_limit > 0 && $c->balance() > $c->credit_limit)over credit limit@endif |
|
|
| ||||||