From 45e41c77e4be8f02f96d16c564bd3e1de70bd602 Mon Sep 17 00:00:00 2001 From: amazuecos Date: Sun, 27 Apr 2025 08:20:35 +0200 Subject: [PATCH 1/2] tablas encuadernacion ot pdf --- ci4/app/Config/OrdenTrabajo.php | 2 +- .../Presupuestos/PresupuestoLineaEntity.php | 76 +++-- .../themes/vuexy/main/menus/catalogo_menu.php | 2 +- .../themes/vuexy/pdfs/encuadernados/CC2.php | 30 ++ .../themes/vuexy/pdfs/encuadernados/CC2S.php | 30 ++ .../themes/vuexy/pdfs/encuadernados/ESP.php | 28 ++ .../themes/vuexy/pdfs/encuadernados/RCHV.php | 30 ++ .../themes/vuexy/pdfs/encuadernados/RCHVS.php | 30 ++ .../themes/vuexy/pdfs/encuadernados/RF.php | 30 ++ .../themes/vuexy/pdfs/encuadernados/RFS.php | 30 ++ .../themes/vuexy/pdfs/encuadernados/TDC.php | 36 +++ .../themes/vuexy/pdfs/encuadernados/TDF.php | 30 ++ .../themes/vuexy/pdfs/encuadernados/WIO.php | 29 ++ .../Views/themes/vuexy/pdfs/orden_trabajo.php | 75 ++--- httpdocs/themes/vuexy/css/pdf.ot.css | 288 +++++++++--------- 15 files changed, 548 insertions(+), 198 deletions(-) create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2S.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/ESP.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHV.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHVS.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/RF.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/RFS.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDC.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDF.php create mode 100644 ci4/app/Views/themes/vuexy/pdfs/encuadernados/WIO.php diff --git a/ci4/app/Config/OrdenTrabajo.php b/ci4/app/Config/OrdenTrabajo.php index 72233900..8b029b02 100755 --- a/ci4/app/Config/OrdenTrabajo.php +++ b/ci4/app/Config/OrdenTrabajo.php @@ -65,7 +65,7 @@ class OrdenTrabajo extends BaseConfig ["bg" => "yellow", "color" => "black"], ["bg" => "purple", "color" => "white"], ["bg" => "orange", "color" => "white"], - ["bg" => "blue", "color" => "black"], + ["bg" => "blue", "color" => "white"], ["bg" => "pink", "color" => "black"], ["bg" => "#FFFFFF", "color" => "black"], ]; diff --git a/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php index 3fa722b7..83ad9323 100755 --- a/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoLineaEntity.php @@ -194,39 +194,75 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity return $m->find($this->attributes['tarifa_impresion_id']); } - public function get_impresion_logo(){ + public function get_impresion_logo() + { $logo = config(LogoImpresion::class); return $logo->get_logo_path($this->attributes["tipo"]); } - public function get_nombre_tarea() : ?string + public function get_nombre_tarea(): ?string { $nombre = null; - $impresion_bn = ["lp_bn","lp_bnhq","lp_rot_bn"]; - $impresion_color = ["lp_color","lp_colorhq","lp_rot_color"]; + $impresion_bn = ["lp_bn", "lp_bnhq", "lp_rot_bn"]; + $impresion_color = ["lp_color", "lp_colorhq", "lp_rot_color"]; $impresion_cubierta = ["lp_cubierta"]; $impresion_guardas = ["lp_guardas"]; $impresion_sobrecubierta = ["lp_sobrecubierta"]; - $is_bn = in_array($this->attributes["tipo"],$impresion_bn); - $is_color = in_array($this->attributes["tipo"],$impresion_color); - $is_impresion_cubierta = in_array($this->attributes["tipo"],$impresion_cubierta); - $is_impresion_guarda = in_array($this->attributes["tipo"],$impresion_guardas); - $is_impresion_sobrecubierta = in_array($this->attributes["tipo"],$impresion_sobrecubierta); + $is_bn = in_array($this->attributes["tipo"], $impresion_bn); + $is_color = in_array($this->attributes["tipo"], $impresion_color); + $is_impresion_cubierta = in_array($this->attributes["tipo"], $impresion_cubierta); + $is_impresion_guarda = in_array($this->attributes["tipo"], $impresion_guardas); + $is_impresion_sobrecubierta = in_array($this->attributes["tipo"], $impresion_sobrecubierta); - if($is_bn) $nombre ="Impresión B/N"; - if($is_color) $nombre ="Impresión color"; - if($is_impresion_cubierta) $nombre ="Impresión cubierta"; - if($is_impresion_guarda) $nombre ="Impresión guarda"; - if($is_impresion_sobrecubierta) $nombre ="Impresión sobrecubierta"; + if ($is_bn) $nombre = "Impresión B/N"; + if ($is_color) $nombre = "Impresión color"; + if ($is_impresion_cubierta) $nombre = "Impresión cubierta"; + if ($is_impresion_guarda) $nombre = "Impresión guarda"; + if ($is_impresion_sobrecubierta) $nombre = "Impresión sobrecubierta"; return $nombre; } - public function isRotativa() : bool - { - return in_array($this->attributes['tipo'],['lp_rot_color','lp_rot_bn']); + public function isGuarda(): bool + { + return in_array($this->attributes["tipo"], ["lp_guardas"]); } - public function isColor():bool { - return in_array($this->attributes['tipo'],['lp_color','lp_colorhq','lp_rot_color']); - + public function isCubierta(): bool + { + return in_array($this->attributes["tipo"], ["lp_cubierta"]); + } + public function isSobreCubierta(): bool + { + return in_array($this->attributes["tipo"], ["lp_sobrecubierta"]); + } + public function isRotativa(): bool + { + return in_array($this->attributes['tipo'], ['lp_rot_color', 'lp_rot_bn']); + } + public function isColor(): bool + { + return in_array($this->attributes['tipo'], ['lp_color', 'lp_colorhq', 'lp_rot_color']); + } + public function isBN(): bool + { + return in_array($this->attributes['tipo'], ["lp_bn", "lp_bnhq", "lp_rot_bn"]); + } + + public function tinta(): string + { + $tinta = ""; + if ($this->isCubierta()) { + $paginas = $this->attributes['paginas']; + if ($paginas / 2 == 1) { + $tinta = '4/0'; + } + if ($paginas / 2 == 2) { + $tinta = '4/4'; + } + } elseif ($this->isColor()) { + $tinta = '4/4'; + } elseif ($this->isBN()) { + $tinta = '4/0'; + } + return $tinta; } } diff --git a/ci4/app/Views/themes/vuexy/main/menus/catalogo_menu.php b/ci4/app/Views/themes/vuexy/main/menus/catalogo_menu.php index ed1f16f8..1f00317d 100755 --- a/ci4/app/Views/themes/vuexy/main/menus/catalogo_menu.php +++ b/ci4/app/Views/themes/vuexy/main/menus/catalogo_menu.php @@ -8,7 +8,7 @@ if (auth()->user()->can('catalogo.menu')) {