1
0
forked from poc/pds

Merge pull request 'Changed logic for laser idle report' (#1175) from ranjith-dev into master

Reviewed-on: poc/pds#1175
This commit is contained in:
2026-10-06 03:57:01 +00:00

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);
});