Manager | Bill Client | Bill Amount | Received Client | Received Amount | Advanced Adjustment | Collection(%) | Dues Clients | Dues Amount |
---|---|---|---|---|---|---|---|---|
{{ $item->name }} | {{-- billed clients --}}@php $sum = 0; $sum2 = 0; foreach ($item->pops as $pop) { foreach ($pop->clients as $client) { $sum += $client->generatedBillNow->count(); foreach ($client->generatedBillNow as $billgenerate) { $sum2 += $billgenerate->bill_amount; } } } @endphp {{ $sum }} | {{-- bill amount --}}{{ $sum2 }} | {{-- received id --}}{{ $temp[$item->id]['tcount'] }} | {{-- received amount --}}@if ($temp[$item->id]['total'] != null) {{ $temp[$item->id]['total'] }} @else 0 @endif | @php $adjust = 0; foreach ($item->pops as $pop) { foreach ($pop->clients as $client) { foreach ($client->generatedBillNow as $billgenerate) { if ($billgenerate->due_amount <= 0) { $adjust += $billgenerate->bill_amount; } } } } @endphp {{ $adjust }} | {{-- col % --}}@if ($sum2 != 0) {{ number_format((($temp[$item->id]['total'] + $adjust) * 100) / $sum2, 2) }} % @else 0 % @endif | {{ $sum - $temp[$item->id]['tcount'] }} | {{ $sum2 - $temp[$item->id]['total'] }} | @php $due = $sum - $temp[$item->id]['tcount']; $dueClients += $due; $amounts = $sum2 - $temp[$item->id]['total']; $dueAmounts += $amounts; $clientscount += $sum; $totalAmounts += $sum2; $totalAdjustment += $adjust; @endphp
Total | {{ $clientscount }} | {{ $totalAmounts }} | {{ $tcountSum }} | {{ $totalSum }} | {{ $totalAdjustment }} | @if ($totalAmounts != 0) {{ number_format((($totalSum + $totalAdjustment) * 100) / $totalAmounts, 2) }} % @else 0% @endif | {{ $dueClients }} | {{ $dueAmounts - $totalAdjustment }} |
Manager | Bill Amount | Received Amount | Advanced Adjustment | Collection(%) | Dues Amount |
---|---|---|---|---|---|
{{ $item->name }} | {{-- billed clients --}}@php $sum = 0; foreach ($item->pops as $pop) { foreach ($pop->clients as $client) { foreach ($client->generatedBillOther as $billgenerate) { $sum += $billgenerate->bill_amount; } } } @endphp {{ $sum }} | {{-- bill amount --}}@if ($array[$item->id]['total'] != null) {{ $array[$item->id]['total'] }} @else 0 @endif | @php $adjust = 0; foreach ($item->pops as $pop) { foreach ($pop->clients as $client) { foreach ($client->generatedBillOther as $billgenerate) { if ($billgenerate->due_amount <= 0) { $adjust += $billgenerate->bill_amount; } } } } @endphp {{ $adjust }} | {{-- collection --}}@if ($sum != 0) {{ number_format((($array[$item->id]['total'] + $adjust) * 100) / $sum, 2) }} % @else 0 % @endif | {{-- due amount --}}{{ $sum - $array[$item->id]['total'] - $adjust }} | @php $amounts = $sum - $array[$item->id]['total']; $otherDueAmounts += $amounts; $otherTotalAmounts += $sum; $totalAdjustment += $adjust; @endphp
Total | {{ $otherTotalAmounts }} | {{ $otherTotalSum }} | {{ $totalAdjustment }} | @if ($otherTotalAmounts != 0) {{ number_format((($otherTotalSum + $totalAdjustment) * 100) / $otherTotalAmounts, 2) }} % @else 0% @endif | {{ $otherDueAmounts - $totalAdjustment }} |