mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix show form cosido in ot task
This commit is contained in:
@ -873,7 +873,7 @@ class ProductionService extends BaseService
|
||||
"tareas_encuadernacion" => $this->tareas_encuadernacion(),
|
||||
"tareas_preimpresion" => $this->tareas_preimpresion(),
|
||||
"tareas_impresion" => $this->tareas_impresion(),
|
||||
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMM(),
|
||||
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMMSS(),
|
||||
"tiempo_total" => $this->getTiempoTotalTareas(),
|
||||
"statusColor" => $this->getOtColorStatus(),
|
||||
"tareaCosido" => $this->getTareaCosido(),
|
||||
@ -902,8 +902,8 @@ class ProductionService extends BaseService
|
||||
"peso_unidad" => $logistica_data["peso_unidad"],
|
||||
"peso_pedido" => $logistica_data["peso_pedido"],
|
||||
"imposicion" => $this->getImposicionTareaImpresion(),
|
||||
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMM(),
|
||||
"tiempo_impresion" => $this->getTiempoTareasImpresionHHMM(),
|
||||
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMMSS(),
|
||||
"tiempo_impresion" => $this->getTiempoTareasImpresionHHMMSS(),
|
||||
"colors" => $this->getPdfColors(),
|
||||
"isPOD" => $this->isPOD,
|
||||
"uvi" => $this->getUVI(),
|
||||
@ -1435,17 +1435,17 @@ class ProductionService extends BaseService
|
||||
}
|
||||
return $pedidoUserDates;
|
||||
}
|
||||
public function getTiempoProcesamientoHHMM(): ?string
|
||||
public function getTiempoProcesamientoHHMMSS(): ?string
|
||||
{
|
||||
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);
|
||||
return float_seconds_to_hhmmss_string($seconds);
|
||||
} catch (\Throwable $th) {
|
||||
return '00:00';
|
||||
return '00:00:00';
|
||||
}
|
||||
}
|
||||
public function getTiempoTareasImpresionHHMM(): string
|
||||
public function getTiempoTareasImpresionHHMMSS(): string
|
||||
{
|
||||
try {
|
||||
$tareas_impresion = $this->ot->tareas_impresion();
|
||||
@ -1455,7 +1455,7 @@ class ProductionService extends BaseService
|
||||
$tiempo_seconds += $tarea->tiempo_estimado;
|
||||
}
|
||||
}
|
||||
return float_seconds_to_hhmm_string($tiempo_seconds);
|
||||
return float_seconds_to_hhmmss_string($tiempo_seconds);
|
||||
} catch (\Throwable $th) {
|
||||
return '00:00';
|
||||
}
|
||||
@ -1845,10 +1845,10 @@ class ProductionService extends BaseService
|
||||
public function cosido(): bool
|
||||
{
|
||||
$flag = false;
|
||||
$manipulados = $this->presupuesto->manipulados();
|
||||
foreach ($manipulados as $key => $manipulado) {
|
||||
$tarifa_manipulado = $manipulado->tarifa();
|
||||
if ($tarifa_manipulado->isCosido()) {
|
||||
$encuadernaciones = $this->presupuesto->encuadernaciones();
|
||||
foreach ($encuadernaciones as $key => $encuadernacion) {
|
||||
$tarifaEncuadernacionEntity = $encuadernacion->tarifa();
|
||||
if ($tarifaEncuadernacionEntity->isCosido()) {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user