progress ot

This commit is contained in:
amazuecos
2025-05-06 08:40:07 +02:00
parent 30c5b06d3d
commit ddd7c471a1
2 changed files with 8 additions and 2 deletions

View File

@ -119,6 +119,7 @@ return [
//IMPRESION
"impresion_bn" => "Impresión BN",
"cubierta" => "Cubierta/Portada",
"sobrecubierta" => "Sobrecubierta",
"guarda" => "Guarda",
"encuadernacion" => "Encuadernación",

View File

@ -1519,8 +1519,13 @@ class ProductionService extends BaseService
$otDates = $this->ot->dates();
foreach ($datesWithTime as $key => $dateWithTime) {
["date" => $date, "tiempo_estimado" => $tiempo_estimado] = $dateWithTime;
if ($otDates->{$date}) {
$progress += $tiempo_estimado / $tiempo_estimado_total * 100;
try {
if ($otDates->{$date}) {
$progress += $tiempo_estimado / $tiempo_estimado_total * 100;
}
} catch (\Throwable $th) {
//throw $th;
$progress += 0;
}
}
return $progress;