@extends('garage.layouts.app') @section('title', 'Customers') @section('content')
@if($search || ($status ?? 'all') !== 'all') @endif
@include('garage.partials.trash-link', ['trashType' => 'customers'])
@forelse($customers as $customer) @empty @endforelse
Code Name Contact Email Credit Limit Balance Status Actions
{{ $customer->code }} {{ $customer->name }}@if(!empty($customer->last_name)) {{ $customer->last_name }}@endif @if($customer->contact_person) {{ $customer->contact_person }} @endif @if($customer->phone)
{{ $customer->phone }}
@endif @if($customer->address) {{ \Illuminate\Support\Str::limit($customer->address, 30) }} @endif
@if($customer->email) {{ $customer->email }} @else - @endif @if($customer->credit_limit) PKR {{ number_format($customer->credit_limit, 2) }} @else - @endif @php $balance = $customer->opening_balance; $balanceType = $customer->opening_balance_type; $displayBalance = $balanceType === 'credit' ? -$balance : $balance; @endphp PKR {{ number_format(abs($displayBalance), 2) }} @if($customer->is_active) Active @else Inactive @endif

No customers found

@if($customers->hasPages())
{{ $customers->links() }}
@endif
@push('styles') @include('shared.customer-modal-styles') @endpush @push('scripts') @endpush @endsection