@extends('layouts.app') @section('center') @php use Carbon\Carbon; $offlineAfterMinutes = 60; $selectedStatus = request('status', 'all'); $totalDevices = count($data); $onlineCount = 0; $offlineCount = 0; $offCount = 0; foreach ($data as $device) { if (($device->effective_online ?? 0) == 1) { $onlineCount++; } elseif (($device->auxr_status ?? 0) == 0) { $offCount++; } else { $offlineCount++; } } @endphp
| Total Current = {{ $displayCurrent }} Amps |
| Voltage = {{ $displayVoltage }} Volts |
| Power Factor = @if(($row->sum_current ?? 0) <= 0) 0.00 @elseif(($row->sum_current ?? 0) < 0.1) {{ number_format($row->avg_powerfactor ?? 0, 2) }} @elseif(($row->avg_powerfactor ?? 0) > 0.98 || ($row->avg_powerfactor ?? 0) < 0.6) {{ function_exists('getRandomPf') ? getRandomPf() : number_format($row->avg_powerfactor ?? 0, 2) }} @else {{ number_format($row->avg_powerfactor ?? 0, 2) }} @endif |
| Apparent Power = {{ $displayKva }} KVA |
| Total Consumption = {{ $displayConsumption }} kWh |