diff --git a/ci4/app/Controllers/Produccion/Ordentrabajo.php b/ci4/app/Controllers/Produccion/Ordentrabajo.php index 45aa3a7d..bc1286cf 100755 --- a/ci4/app/Controllers/Produccion/Ordentrabajo.php +++ b/ci4/app/Controllers/Produccion/Ordentrabajo.php @@ -242,7 +242,7 @@ class Ordentrabajo extends BaseController { $logo = config(LogoImpresion::class); - $q = $this->otModel->getDatatableQuery()->where("ferro_ok_at", null); + $q = $this->otModel->getDatatableQuery()->where('presupuestos.ferro',1)->where("ferro_ok_at", null); // return $this->response->setJSON($q->get()->getResultArray()); return DataTable::of($q) ->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name, "color" => $this->produccionService->init($q->id)->getOtColorStatus()]) @@ -257,7 +257,7 @@ class Ordentrabajo extends BaseController { $logo = config(LogoImpresion::class); - $q = $this->otModel->getDatatableQuery()->where("ferro_ok_at is NOT NULL", NULL, FALSE); + $q = $this->otModel->getDatatableQuery()->where('presupuestos.ferro',1)->where("ferro_ok_at is NOT NULL", NULL, FALSE); // return $this->response->setJSON($q->get()->getResultArray()); return DataTable::of($q) ->add("logo", fn($q) => ["logo" => site_url($logo->get_logo_path($q->presupuesto_linea_tipo)), "imposicion" => $q->imposicion_name, "color" => $this->produccionService->init($q->id)->getOtColorStatus()]) 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 { diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php new file mode 100644 index 00000000..de0a6374 --- /dev/null +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php @@ -0,0 +1,30 @@ +
| Encuadernacion | ++ | + | + | Sobrecubierta | +Guardas | +Retractilado | +Marcapáginas | +
|---|---|---|---|---|---|---|---|
| = $value->tarifa()->nombre ?> | ++ | + | + | = $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?> | += $presupuesto->guardas ? "SI" : "NO" ?> | += $presupuesto->retractilado ? "SI" : "NO" ?> | += $presupuesto->marcapaginas ? "SI" : "NO" ?> | +
| Sin encuadernación | +|||||||