Changed logic in laser idle hour report #1176
@@ -92,18 +92,20 @@ class SendLaserIdleHourReport extends Command
|
|||||||
->filter(function ($record) {
|
->filter(function ($record) {
|
||||||
return (float) ($record->motor_marked_physical_count ?? 0) > 0;
|
return (float) ($record->motor_marked_physical_count ?? 0) > 0;
|
||||||
})
|
})
|
||||||
->sum(function ($record) {
|
->count();
|
||||||
return (float) ($record->motor_marked_physical_count ?? 0);
|
// ->sum(function ($record) {
|
||||||
});
|
// return (float) ($record->motor_marked_physical_count ?? 0);
|
||||||
|
// });
|
||||||
|
|
||||||
$pumpCount = $machineRecords
|
$pumpCount = $machineRecords
|
||||||
->where('pump_machine_name', $machineName)
|
->where('pump_machine_name', $machineName)
|
||||||
->filter(function ($record) {
|
->filter(function ($record) {
|
||||||
return (float) ($record->pump_marked_physical_count ?? 0) > 0;
|
return (float) ($record->pump_marked_physical_count ?? 0) > 0;
|
||||||
})
|
})
|
||||||
->sum(function ($record) {
|
->count();
|
||||||
return (float) ($record->pump_marked_physical_count ?? 0);
|
// ->sum(function ($record) {
|
||||||
});
|
// return (float) ($record->pump_marked_physical_count ?? 0);
|
||||||
|
// });
|
||||||
|
|
||||||
$namePlateCount = $machineRecords
|
$namePlateCount = $machineRecords
|
||||||
->where('name_plate_machine_name', $machineName)
|
->where('name_plate_machine_name', $machineName)
|
||||||
|
|||||||
Reference in New Issue
Block a user