@php
$balances = collect($partnerBalances);
$totalPartners = $balances->count();
$totalAllocated = $balances->sum('total_allocated');
$totalWithdrawn = $balances->sum('total_withdrawn');
$totalOutstanding = $balances->sum('closing_balance');
$creditors = $balances->filter(function($balance) {
return $balance->closing_balance > 0;
})->count();
$debtors = $balances->filter(function($balance) {
return $balance->closing_balance < 0;
})->count();
$zeroBalance = $balances->filter(function($balance) {
return $balance->closing_balance == 0;
})->count();
$totalPayable = $balances->where('closing_balance', '>', 0)->sum('closing_balance');
$totalReceivable = $balances->where('closing_balance', '<', 0)->sum('closing_balance');
@endphp
| # | Partner Name | Total Withdrawn | Action | ||
|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $balance->partner->full_name }}
@if($balance->partner->partner_code)
({{ $balance->partner->partner_code }})
@endif
@if($percentageUsed > 0)
|
KWD {{ number_format($balance->total_withdrawn, 2) }} @if($balance->total_withdrawn > 0) @endif | View | ||
No Partner Data FoundThere are no partner balances to display at the moment. |
|||||
| Grand Totals: | KWD {{ number_format($totalWithdrawn, 2) }} | ||||