1
0
forked from poc/pds

Changed logic for laser idle report

This commit is contained in:
dhanabalan
2026-10-06 09:26:47 +05:30
parent d1187a2ac0
commit 2c8dede918

View File

@@ -89,12 +89,18 @@ class SendLaserIdleHourReport extends Command
$motorCount = $machineRecords
->where('motor_machine_name', $machineName)
->filter(function ($record) {
return (float) ($record->motor_marked_physical_count ?? 0) > 0;
})
->sum(function ($record) {
return (float) ($record->motor_marked_physical_count ?? 0);
});
$pumpCount = $machineRecords
->where('pump_machine_name', $machineName)
->filter(function ($record) {
return (float) ($record->pump_marked_physical_count ?? 0) > 0;
})
->sum(function ($record) {
return (float) ($record->pump_marked_physical_count ?? 0);
});