@extends('layout.app') @section('content')
@php $totalActive = 0; $totalExpire = 0; $totalDisable = 0; $totalDeactive = 0; $totalWithoutClose = 0; $totalClose = 0; $total = 0; @endphp @foreach ($pops as $pop) @foreach ($resellers as $reseller) @if ($reseller->id == $pop->reseller_id) @php $totalActive += $clientCount->where('clients_status', 'active')->where('pop_id', $pop->id)->first()->total ?? 0; $totalExpire += $clientCount->where('clients_status', 'expired')->where('pop_id', $pop->id)->first()->total ?? 0; $totalDisable += $clientCount->where('clients_status', 'disable')->where('pop_id', $pop->id)->first()->total ?? 0; $totalDeactive += $clientCount->where('clients_status', 'deactive')->where('pop_id', $pop->id)->first()->total ?? 0; $totalWithoutClose += ($clientCount->where('clients_status', 'active')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'expired')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'disable')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'deactive')->where('pop_id', $pop->id)->first()->total ?? 0); $totalClose += $closeClientCount->where('pop_id', $pop->id)->first()->total ?? 0; $total += ($clientCount->where('clients_status', 'active')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'expired')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'disable')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'deactive')->where('pop_id', $pop->id)->first()->total ?? 0) + ($closeClientCount->where('pop_id', $pop->id)->first()->total ?? 0); @endphp {{-- --}} @endif @endforeach @endforeach
Manager Name POP Name Active User Expire User Disable User Deactive User Total Without Close Close User Total
{{ $pop->reseller->name }}{{ $pop->popname }}{{ ($pop->subreseller == "yes") ? '(Sub POP)' : '' }}{{ $clientCount->where('clients_status', 'active')->where('pop_id', '$pop->id')->first()->total }} {{ $clientCount->where('clients_status', 'active')->where('pop_id', $pop->id)->first()->total ?? 0 }} {{ $clientCount->where('clients_status', 'expired')->where('pop_id', $pop->id)->first()->total ?? 0 }} {{ $clientCount->where('clients_status', 'disable')->where('pop_id', $pop->id)->first()->total ?? 0 }} {{ $clientCount->where('clients_status', 'deactive')->where('pop_id', $pop->id)->first()->total ?? 0 }} @php $total = ($clientCount->where('clients_status', 'active')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'expired')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'disable')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'deactive')->where('pop_id', $pop->id)->first()->total ?? 0); @endphp {{ $total ?? 0 }} {{ $closeClientCount->where('pop_id', $pop->id)->first()->total ?? 0 }} @php $total = ($clientCount->where('clients_status', 'active')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'expired')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'disable')->where('pop_id', $pop->id)->first()->total ?? 0) + ($clientCount->where('clients_status', 'deactive')->where('pop_id', $pop->id)->first()->total ?? 0) + ($closeClientCount->where('pop_id', $pop->id)->first()->total ?? 0); @endphp {{ $total ?? 0 }}
Total {{ $totalActive }} {{ $totalExpire }} {{ $totalDisable }} {{ $totalDeactive }} {{ $totalWithoutClose }} {{ $totalClose }} {{ $total }}
@endsection