diff --git a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php index 9df7e7ce..743bb5c4 100644 --- a/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php +++ b/ci4/app/Entities/Produccion/OrdenTrabajoEntity.php @@ -74,7 +74,7 @@ class OrdenTrabajoEntity extends Entity $m = model(OrdenTrabajoTarea::class); return $m->where("orden_trabajo_id", $this->attributes["id"])->findAll(); } - public function tareas_impresion() : array + public function tareas_impresion(): array { $m = model(OrdenTrabajoTarea::class); return $m->where("orden_trabajo_id", $this->attributes["id"])->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll() ?? []; @@ -144,11 +144,13 @@ class OrdenTrabajoEntity extends Entity helper('filesystem'); $path = WRITEPATH . 'uploads/' . $this->attributes["portada_path"]; $portada_path = null; - if ($path) { - if (file_exists($path)) { - $portada_path = $path; - } else { - $portada_path = null; + if ($this->attributes["portada_path"]) { + if ($path) { + if (file_exists($path)) { + $portada_path = $path; + } else { + $portada_path = null; + } } } return $portada_path; diff --git a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php index 088d9bb9..a7b92795 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php +++ b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php @@ -44,7 +44,13 @@ $settings = $session->get('settings');
- full_path)) : '/assets/img/portada_not_found.png' ?>" /> + full_path): ?> + full_path)) : '/assets/img/portada_not_found.png' ?>" /> + + + + +
;color:;">
@@ -58,7 +64,7 @@ $settings = $session->get('settings');
;color:;"> - ROTATIVA + POD presupuestoLineaImpresion()->isRotativa()): ?> ROTATIVA @@ -241,8 +247,8 @@ $settings = $session->get('settings'); Tiempo - paginas ?> - tirada ?> + paginas * $presupuesto->tirada ?> + tirada ?> ?? formas)->formas ?> maquina()->nombre ?> @@ -252,7 +258,11 @@ $settings = $session->get('settings'); papel_impresion ?> papel_impresion()->gramaje . " " . "gr" ?> - rotativa_metros_total, 2, ',', '.') ?> metros + + isRotativa()): ?> + rotativa_metros_total, 2, ',', '.') ?> metros + + diff --git a/httpdocs/assets/js/safekat/pages/pdf/otDownload.js b/httpdocs/assets/js/safekat/pages/pdf/otDownload.js index 11006c26..093f26cb 100644 --- a/httpdocs/assets/js/safekat/pages/pdf/otDownload.js +++ b/httpdocs/assets/js/safekat/pages/pdf/otDownload.js @@ -1,11 +1,11 @@ $(() => { - var opt = { - margin: 2, - filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf", - image: { type: 'jpeg', quality: 1 }, - html2canvas: { scale: 4 }, - jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } - }; - let elementToPdf = $('body')[0] - html2pdf().set(opt).from(elementToPdf).save() + // var opt = { + // margin: 2, + // filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf", + // image: { type: 'jpeg', quality: 1 }, + // html2canvas: { scale: 4 }, + // jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } + // }; + // let elementToPdf = $('body')[0] + // html2pdf().set(opt).from(elementToPdf).save() }) \ No newline at end of file