@php use App\Models\{Account,Service}; $acts = $o->accounts_all->pluck('id'); @endphp @if($user->isReseller() && ($o->accounts->count() <= 2) && ($x=$o->accounts->pluck('providers')->flatten())->count())
Accounting @foreach($x as $po) {{ ucfirst($po->name) }} @endforeach
@endif @if ($o->accounts_all->count() > 1)
Linked Accounts {{ number_format($o->accounts_all->count()) }}
@endif
Active Services {{ Service::active()->whereIn('account_id',$acts)->count() }} /{{ Service::whereIn('account_id',$acts)->count() }}
Account Balance $ {{ number_format(($x=Account::InvoicesDue()->filter(fn($item)=>$acts->contains($item->account_id)))->sum('_balance'),2) }}
Invoices Due {{ $x->count() }}