@foreach (['entitled','unassigned'] as $show)
|
@foreach ($cols as $col)
{{ $col->name }} |
@endforeach
TOTAL |
|
@foreach ($cols as $col)
# |
$ |
@endforeach
# |
$ |
@foreach (\App\Models\Prodsum::find($pdata->pluck('prodsum_id')->unique())->sortBy('name') as $o)
{{ $o->name }} |
@foreach ($cols as $col)
{{$pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id AND $item->iot_id == $col->id; })->pluck('account_id')->unique()->count() }} |
{{ number_format($pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id AND $item->iot_id == $col->id; })->sum($show),3) }} |
@endforeach
{{$pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id; })->pluck('account_id')->unique()->count()}} |
{{ number_format($pdata->filter(function($item,$key) use ($o,$col) { return isset($item->prodsum_id) AND $item->prodsum_id == $o->id; })->sum($show),3) }} |
@endforeach
@php
$rest = $pdata->reject(function($item,$key) { return isset($item->prodsum_id); });
//dd($rest);
@endphp
Other Items |
@foreach ($cols as $col)
{{ $rest->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->pluck('account_id')->unique()->count() }} |
{{ number_format($rest->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->sum($show),3) }} |
@endforeach
{{ $rest->pluck('account_id')->unique()->count() }} |
{{ number_format($rest->sum($show),3) }} |
TOTAL |
@foreach ($cols as $col)
{{ $pdata->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->pluck('account_id')->unique()->count() }} |
{{ number_format($pdata->filter(function($item,$key) use ($col) { return $item->iot_id == $col->id; })->sum($show),3) }} |
@endforeach
{{ $pdata->pluck('account_id')->unique()->count() }} |
{{ number_format($pdata->sum($show),3) }} |
@endforeach
Please Note: This view is a product centric view and does not reduce the "Unassigned" value when clients
deploy products that they do not have a recorded entitlement allocated to it. For a truer representation of Risk, please use the Geography/Market view