@php($totalDebit=0) @php($totalCredit=0) @foreach($clients as $client) @php($clientBalance = clientBalance($client->id)) @if($clientBalance['title']=='Debit') @php($totalDebit += $clientBalance['balance']) @else @php($totalCredit += $clientBalance['balance']) @endif @php($sl = $loop->iteration) @endforeach
Sl Name Mobile Address Payable Receivable Status Option
{{ $sl }} {{ $client->name }} {{ $client->mobile }} {{ $client->address }} {{ $clientBalance['title']=='Debit'? numberFormat($clientBalance['balance'],2) :'' }} {{ $clientBalance['title']=='Credit'? numberFormat($clientBalance['balance'],2) :'' }} {{ $client->status==1?'Active':'Close' }} @if(role()->code=='developer') @endif
Total {{ numberFormat($totalDebit,2) }} {{ numberFormat($totalCredit,2) }}