diff --git a/ci4/app/Services/ProductionService.php b/ci4/app/Services/ProductionService.php index 2c10a9d2..89babdd5 100755 --- a/ci4/app/Services/ProductionService.php +++ b/ci4/app/Services/ProductionService.php @@ -1353,9 +1353,13 @@ class ProductionService extends BaseService } public function getTiempoProcesamientoHHMM(): ?string { - $time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas()); - $seconds = array_sum($time_tareas_seconds); - return float_seconds_to_hhmm_string($seconds); + try { + $time_tareas_seconds = array_map(fn($q) => $q->tiempo_estimado ?? 0, $this->ot->tareas()); + $seconds = array_sum($time_tareas_seconds); + return float_seconds_to_hhmm_string($seconds); + } catch (\Throwable $th) { + return '00:00'; + } } public function getTiempoTareasImpresionHHMM(): string {