@isset($pic) logo @endisset
Report Engine Summary Report
Company Name {{ $cmp_name }}
Generator Name {{ $gen_name }}
Date from {{ $datefrom }}
Date To {{ $dateto }}

@php $i = 1; $totalSeconds = 0; $totalRpm = 0; $totalRpmCount = 0; $totalPressure = 0; $totalPressureCount = 0; $totalTemperature = 0; $totalTemperatureCount = 0; $totalVoltage = 0; $totalVoltageCount = 0; @endphp @foreach ($data as $key => $value) @php $duration = explode(':', $value['duration']); $totalSeconds += $duration[0] * 3600 + $duration[1] * 60 + $duration[2]; $totalRpm += $value['rpm']; $totalRpmCount++; $totalPressure += $value['pressure']; $totalPressureCount++; $totalTemperature += $value['temperature']; $totalTemperatureCount++; $totalVoltage += $value['voltage']; $totalVoltageCount++; @endphp @php $i++; @endphp @endforeach @php $hours = floor($totalSeconds / 3600); $minutes = floor(($totalSeconds / 60) % 60); $seconds = $totalSeconds % 60; $totalDuration = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); @endphp
Start Time End Time Duration RPM Pressure Temperature Voltage
{{ $value['startTime'] }} {{ $value['endTime'] }} {{ $value['duration'] }} {{ round($value['rpm'], 2) }} {{ round($value['pressure'], 2) }} {{ round($value['temperature'], 2) }} {{ round($value['voltage'], 2) }}
Total: {{ $totalDuration }} {{ $totalRpmCount > 0 ? round($totalRpm / $totalRpmCount, 2) : 0 }} {{ $totalPressureCount > 0 ? round($totalPressure / $totalPressureCount, 2) : 0 }} {{ $totalTemperatureCount > 0 ? round($totalTemperature / $totalTemperatureCount, 2) : 0 }} {{ $totalVoltageCount > 0 ? round($totalVoltage / $totalVoltageCount, 2) : 0 }}