2023-05-09 01:14:45 +00:00
|
|
|
@if(Auth::user()->isReseller() && $o->my_accounts->count() <= 2 && $o->my_accounts->pluck('providers')->flatten()->count())
|
2022-08-19 10:12:08 +00:00
|
|
|
<div class="col-12 col-sm-4 col-md-2">
|
|
|
|
<div class="info-box">
|
|
|
|
<span class="info-box-icon bg-dark elevation-1"><i class="fas fa-file-invoice"></i></span>
|
|
|
|
<div class="info-box-content">
|
|
|
|
<span class="info-box-text">Accounting</span>
|
|
|
|
@foreach ($o->my_accounts as $ao)
|
|
|
|
@foreach($ao->providers as $po)
|
|
|
|
<span class="info-box-number"><a href="{{ url(($po->api_class())::url().'/customerdetail?nameId='.$po->pivot->ref) }}" target="{{ $po->name }}">{{ ucfirst($po->name) }}</a></span>
|
|
|
|
@endforeach
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
2021-06-29 06:36:34 +00:00
|
|
|
@if ($o->accounts->count() > 1)
|
2022-08-19 10:12:08 +00:00
|
|
|
<div class="col-12 col-sm-4 col-md-2">
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box">
|
2021-06-29 06:36:34 +00:00
|
|
|
<span class="info-box-icon bg-primary elevation-1"><i class="fas fa-user"></i></span>
|
2019-06-02 05:35:48 +00:00
|
|
|
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box-content">
|
2019-06-02 05:35:48 +00:00
|
|
|
<span class="info-box-text">Linked Accounts</span>
|
2022-04-21 04:41:26 +00:00
|
|
|
<span class="info-box-number">{{ number_format($o->my_accounts->count()) }}</span>
|
2018-08-11 05:09:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2018-08-20 12:15:28 +00:00
|
|
|
|
2022-08-19 10:12:08 +00:00
|
|
|
<div class="col-12 col-sm-4 col-md-2">
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box">
|
2021-06-29 06:36:34 +00:00
|
|
|
<span class="info-box-icon bg-info"><i class="fas fa-clone"></i></span>
|
2019-06-02 05:35:48 +00:00
|
|
|
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box-content">
|
2019-06-02 05:35:48 +00:00
|
|
|
<span class="info-box-text">Active Services</span>
|
2021-07-02 05:10:22 +00:00
|
|
|
<!-- @todo This should count of inactive services too -->
|
2021-06-29 06:36:34 +00:00
|
|
|
<span class="info-box-number">{{ $o->services->count() }} <small>/{{ $o->services->count() }}</small></span>
|
2018-08-11 05:09:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-20 12:15:28 +00:00
|
|
|
|
2022-08-19 10:12:08 +00:00
|
|
|
<div class="col-12 col-sm-4 col-md-2">
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box">
|
2021-06-29 06:36:34 +00:00
|
|
|
<span class="info-box-icon bg-danger"><i class="fas fa-dollar-sign"></i></span>
|
2019-06-02 05:35:48 +00:00
|
|
|
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box-content">
|
2019-06-02 05:35:48 +00:00
|
|
|
<span class="info-box-text">Account Balance</span>
|
2024-07-05 06:38:31 +00:00
|
|
|
<span class="info-box-number"><small>$</small> {{ number_format(($x=$o->accounts->map(fn($item)=>$item->invoiceSummaryDue()->get()->pluck('_balance'))->flatten())->sum(),2) }}</span>
|
2018-08-11 05:09:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-20 12:15:28 +00:00
|
|
|
|
2022-08-19 10:12:08 +00:00
|
|
|
<div class="col-12 col-sm-4 col-md-2">
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box">
|
2021-06-29 06:36:34 +00:00
|
|
|
<span class="info-box-icon bg-dark"><i class="fas fa-hashtag"></i></span>
|
2019-06-02 05:35:48 +00:00
|
|
|
|
2018-08-11 05:09:41 +00:00
|
|
|
<div class="info-box-content">
|
|
|
|
<span class="info-box-text">Invoices Due</span>
|
2021-07-02 05:10:22 +00:00
|
|
|
<span class="info-box-number">{{ $x->count() }}</span>
|
2018-08-11 05:09:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-02 05:10:22 +00:00
|
|
|
</div>
|