@can('dashboard-billing-info')

Report of Monthly Generated Bill Collection {{ date('M') }} {{ date('Y') }}

@php $dueClients = 0; $dueAmounts = 0; $clientscount = 0; $totalAmounts = 0; $totalAdjustment = 0; @endphp @foreach ($monthlyCount as $item) {{-- billed clients --}} {{-- bill amount --}} {{-- received id --}} {{-- received amount --}} {{-- col % --}} @php $due = $sum - $temp[$item->id]['tcount']; $dueClients += $due; $amounts = $sum2 - $temp[$item->id]['total']; $dueAmounts += $amounts; $clientscount += $sum; $totalAmounts += $sum2; $totalAdjustment += $adjust; @endphp @endforeach @php $tcountSum = 0; $totalSum = 0; foreach ($temp as $key => $value) { $tcountSum += $value['tcount']; $totalSum += $value['total']; } @endphp
Manager Bill Client Bill Amount Received Client Received Amount Advanced Adjustment Collection(%) Dues Clients Dues Amount
{{ $item->name }} @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 }} {{ $sum2 }} {{ $temp[$item->id]['tcount'] }} @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 }} @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'] }}
Total {{ $clientscount }} {{ $totalAmounts }} {{ $tcountSum }} {{ $totalSum }} {{ $totalAdjustment }} @if ($totalAmounts != 0) {{ number_format((($totalSum + $totalAdjustment) * 100) / $totalAmounts, 2) }} % @else 0% @endif {{ $dueClients }} {{ $dueAmounts - $totalAdjustment }}
@if (checkSettings('new_customer_billing_report') == 'enable')

Report of New Customer, Package & Billing Cycle Change Bill Collection {{ date('M') }} {{ date('Y') }}

@php $otherDueAmounts = 0; $clientscount = 0; $otherTotalAmounts = 0; $totalAdjustment = 0; @endphp @foreach ($monthlyOthersCollection as $item) {{-- billed clients --}} {{-- bill amount --}} {{-- collection --}} {{-- due amount --}} @php $amounts = $sum - $array[$item->id]['total']; $otherDueAmounts += $amounts; $otherTotalAmounts += $sum; $totalAdjustment += $adjust; @endphp @endforeach @php $otherTotalSum = 0; foreach ($array as $key => $value) { $otherTotalSum += $value['total']; } @endphp
Manager Bill Amount Received Amount Advanced Adjustment Collection(%) Dues Amount
{{ $item->name }} @php $sum = 0; foreach ($item->pops as $pop) { foreach ($pop->clients as $client) { foreach ($client->generatedBillOther as $billgenerate) { $sum += $billgenerate->bill_amount; } } } @endphp {{ $sum }} @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 }} @if ($sum != 0) {{ number_format((($array[$item->id]['total'] + $adjust) * 100) / $sum, 2) }} % @else 0 % @endif {{ $sum - $array[$item->id]['total'] - $adjust }}
Total {{ $otherTotalAmounts }} {{ $otherTotalSum }} {{ $totalAdjustment }} @if ($otherTotalAmounts != 0) {{ number_format((($otherTotalSum + $totalAdjustment) * 100) / $otherTotalAmounts, 2) }} % @else 0% @endif {{ $otherDueAmounts - $totalAdjustment }}
@endif @endcan