diff --git a/ci4/app/Config/OrdenTrabajo.php b/ci4/app/Config/OrdenTrabajo.php index 8b029b02..3e9a9b84 100755 --- a/ci4/app/Config/OrdenTrabajo.php +++ b/ci4/app/Config/OrdenTrabajo.php @@ -100,9 +100,9 @@ class OrdenTrabajo extends BaseConfig ]; public array $OT_PLASTIFICADO_COLOR = [ - "BRIL" => ["bg" => "#00B0F0", "color" => "white"], + "BRILLO" => ["bg" => "#00B0F0", "color" => "white"], "MATE" => ["bg" => "#FF0000", "color" => "white"], - "SOFT_TOUCH" => ["bg" => "#00B050", "color" => "white"], + "SOFT" => ["bg" => "#00B050", "color" => "white"], "SANDY" => ["bg" => "#782170", "color" => "white"], "ANTIRAYADO" => ["bg" => "#E97132", "color" => "white"], "GOFRADO" => ["bg" => "#FFFF00", "color" => "black"], diff --git a/ci4/app/Database/Migrations/2025-04-29_232200_AlterTarifasAcabadoAddBoleanColumns.php b/ci4/app/Database/Migrations/2025-04-29_232200_AlterTarifasAcabadoAddBoleanColumns.php new file mode 100755 index 00000000..fd9d45ea --- /dev/null +++ b/ci4/app/Database/Migrations/2025-04-29_232200_AlterTarifasAcabadoAddBoleanColumns.php @@ -0,0 +1,68 @@ + [ + 'type' => 'BOOLEAN', + 'default' => false, + ], + 'plakene' => [ + 'type' => 'BOOLEAN', + 'default' => false, + ], + 'rectractilado' => [ + 'type' => 'BOOLEAN', + 'default' => false, + ], + 'estampado' => [ + 'type' => 'BOOLEAN', + 'default' => false, + ], + 'uvi' => [ + 'type' => 'BOOLEAN', + 'default' => false, + ], + 'plastificado_tipo' => [ + 'type' => 'ENUM', + 'constraint' => ['BRILLO','MATE','SANDY','GOFRADO','SOFT','ANTIRAYADO'], + 'null' => true, + ], + 'plakene_tipo' => [ + 'type' => 'ENUM', + 'constraint' => ['TRASLUCIDO','MATE','NEGRO'], + 'null' => true, + ], + 'rectractilado_tipo' => [ + 'type' => 'ENUM', + 'constraint' => ['1','3','5'], + 'null' => true, + ], + 'estampado_tipo' => [ + 'type' => 'ENUM', + 'constraint' => ['ORO','PLATA','COBRE','BRONCE'], + 'null' => true, + ], + 'uvi_tipo' => [ + 'type' => 'ENUM', + 'constraint' => ['2D','3D','BRAILLE'], + 'null' => true, + ] + ]; + public function up() + { + + $this->forge->addColumn('lg_tarifa_acabado',$this->COLUMNS); + + } + + public function down() + { + $this->forge->dropColumn('lg_tarifa_acabado',array_keys($this->COLUMNS)); + + } +} diff --git a/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php index c0ab643e..c836a170 100755 --- a/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoAcabadosEntity.php @@ -1,7 +1,9 @@ find($this->attributes["tarifa_acabado_id"]); } - + public function proveedor(): ?ProveedorEntity + { + $proveedor = null; + $m = model(ProveedorModel::class); + if ($this->attributes["proveedor_id"]) { + $proveedor = $m->find($this->attributes["proveedor_id"]); + } + return $proveedor; + } } diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEncuadernacionesEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEncuadernacionesEntity.php index a586f2c1..7f067936 100755 --- a/ci4/app/Entities/Presupuestos/PresupuestoEncuadernacionesEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoEncuadernacionesEntity.php @@ -1,7 +1,10 @@ "float", "margen" => "float", ]; - public function maquinas() : array + public function maquinas(): array { $m = model(TarifaEncuadernacionMaquinaModel::class); - $tarifa_maquinas = $m->where("tarifa_encuadernacion_id",$this->attributes["tarifa_encuadernado_id"])->findAll(); + $tarifa_maquinas = $m->where("tarifa_encuadernacion_id", $this->attributes["tarifa_encuadernado_id"])->findAll(); $maquinaModel = model(MaquinaModel::class); $maquinas = []; foreach ($tarifa_maquinas as $key => $tarifa_maquina) { @@ -43,9 +46,18 @@ class PresupuestoEncuadernacionesEntity extends \CodeIgniter\Entity\Entity } return $maquinas; } - public function tarifa() : TarifaEncuadernacionEntity + public function tarifa(): TarifaEncuadernacionEntity { $m = model(TarifaEncuadernacionModel::class); return $m->find($this->attributes["tarifa_encuadernado_id"]); } + public function proveedor(): ?ProveedorEntity + { + $proveedor = null; + $m = model(ProveedorModel::class); + if ($this->attributes["proveedor_id"]) { + $proveedor = $m->find($this->attributes["proveedor_id"]); + } + return $proveedor; + } } diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php index a013aab2..c7d0edc3 100755 --- a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php @@ -210,7 +210,7 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity $q = $model->where('presupuesto_id', $this->attributes["id"])->findAll(); - return $q; + return $q ?? []; } /** * Obtiene las lineas de presupuesto del actual presupuesto @@ -251,6 +251,14 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity return $q; } + public function presupuestoLineaGuarda(): ?PresupuestoLineaEntity + { + $model = model(PresupuestoLineaModel::class); + + $q = $model->where('presupuesto_id', $this->attributes["id"])->whereIn("tipo", ["lp_guardas"])->first(); + + return $q; + } public function hasSobrecubierta(): bool { $hasSobrecubierta = false; diff --git a/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php b/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php index cb96db44..30d846b5 100755 --- a/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php +++ b/ci4/app/Entities/Tarifas/Acabados/TarifaAcabadoEntity.php @@ -24,6 +24,16 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity "deleted_at" => null, "created_at" => null, "updated_at" => null, + 'plastificado' => false, + 'plakene' => false, + 'rectractilado' => false, + 'estampado' => false, + 'uvi' => false, + 'plastificado_tipo' => null, + 'plakene_tipo' => null, + 'rectractilado_tipo' => null, + 'estampado_tipo' => null, + 'uvi_tipo' => null, ]; protected $casts = [ "precio_min" => "float", @@ -33,6 +43,16 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity "user_created_id" => "int", "user_updated_id" => "int", "is_deleted" => "int", + 'plastificado' => 'boolean', + 'plakene' => 'boolean', + 'rectractilado' => 'boolean', + 'estampado' => 'boolean', + 'uvi' => 'boolean', + 'plastificado_tipo' => '?string', + 'plakene_tipo' => '?string', + 'rectractilado_tipo' => '?string', + 'estampado_tipo' => '?string', + 'uvi_tipo' => '?string', ]; /** * Devuelve las maquinas asociadas a esta tarifa de acabado @@ -48,6 +68,7 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity public function isUVI(): bool { - return in_array($this->attributes["code"],["R3D","R2D"]); + return $this->attributes['uvi']; } + } diff --git a/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoModel.php b/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoModel.php index e345a774..384b06d5 100755 --- a/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoModel.php +++ b/ci4/app/Models/Tarifas/Acabados/TarifaAcabadoModel.php @@ -1,4 +1,5 @@ groupStart() - ->like("t1.nombre", $search) - ->groupEnd(); + ->groupStart() + ->like("t1.nombre", $search) + ->groupEnd(); } public function getServiciosAcabadoSelector() diff --git a/ci4/app/Services/ProductionService.php b/ci4/app/Services/ProductionService.php index e4de8acd..006949c2 100755 --- a/ci4/app/Services/ProductionService.php +++ b/ci4/app/Services/ProductionService.php @@ -100,7 +100,24 @@ class ProductionService extends BaseService * @var boolean */ public bool $isGofrado = false; //* CHECK DONE - + /** + * Indica si la orden de trabajo contiene plastificado + * Se usa para mostrar la fecha correspondiente en la vista + * @var boolean + */ + public bool $isPlastificado = false; //* CHECK DONE + /** + * Indica si la orden de trabajo contiene gofrado + * Se usa para mostrar la fecha correspondiente en la vista + * @var boolean + */ + public bool $isPlakene = false; //* CHECK DONE + /** + * Indica si la orden de trabajo contiene gofrado + * Se usa para mostrar la fecha correspondiente en la vista + * @var boolean + */ + public bool $isEstampado = false; //* CHECK DONE /** * Indica si la orden de trabajo contiene cosido * Se usa para mostrar la fecha correspondiente en la vista y pliegos @@ -110,7 +127,7 @@ class ProductionService extends BaseService /** * Indica si la orden de trabajo contiene gofrado * Se usa para mostrar la fecha correspondiente en la vista - * TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar + * TODO Hay que implementar un boolean en `lg_tarifa_manipulado` para identificar * @var boolean */ public bool $isGrapado = true; //TODO @@ -128,14 +145,7 @@ class ProductionService extends BaseService * @var boolean */ public bool $isUVI = false; //* CHECK DONE - /** - * Indica si la orden de trabajo contiene plastificado - * Se usa para mostrar la fecha correspondiente en la vista - * TODO Hay que implementar un boolean en `lg_tarifa_acabado` para identificar - * DEFAULT true hasta implementacion - * @var boolean - */ - public bool $isPlastificado = true; //TODO + /** * Indica si la orden de trabajo contiene cubierta * Se usa para mostrar la fecha correspondiente en la vista @@ -365,7 +375,7 @@ class ProductionService extends BaseService $ot_tareas["maquina_id"] = $p_linea_maquina->id; $ot_tareas["imposicion_id"] = null; $ot_tareas["tiempo_estimado"] = $p_linea->horas_maquina * 3600; - $ot_tareas["tiempo_real"] = 0; + $ot_tareas["tiempo_real"] = 0; $insert_query_result = $this->otTarea->insert($ot_tareas); $ot_tareas = []; $this->storeTareaCorte($p_linea); @@ -837,6 +847,7 @@ class ProductionService extends BaseService "preimpresiones" => $this->presupuesto->preimpresiones(), "manipulados" => $this->presupuesto->manipulados(), "encuadernaciones" => $this->presupuesto->encuadernaciones(), + "encuadernacionCode" => $this->getEncuadernacionCode(), "linea_impresion" => $this->presupuesto->presupuestoLineaImpresion(), "linea_cubierta" => $this->presupuesto->presupuestoLineaCubierta(), "peso_unidad" => $logistica_data["peso_unidad"], @@ -847,7 +858,9 @@ class ProductionService extends BaseService "colors" => $this->getPdfColors(), "isPOD" => $this->isPOD, "uvi" => $this->getUVI(), + "flags" => $this->getFlags(), "tareaCosido" => $this->getTareaCosido(), + "plakene_tipo" => $this->plakene_tipo() ]; } public function getImposicionTareaImpresion(): ?Imposicion @@ -1374,7 +1387,7 @@ class ProductionService extends BaseService $uvi = null; $acabados = $this->presupuesto->acabados(); foreach ($acabados as $key => $acabado) { - if ($acabado->tarifa()->isUVI()) { + if ($acabado->tarifa()->uvi) { $uvi = $acabado->tarifa(); } } @@ -1490,8 +1503,11 @@ class ProductionService extends BaseService { $code = ""; $encuadernaciones = $this->presupuesto->encuadernaciones(); - if (isset($encuadernaciones[0])) { - $code = $encuadernaciones[0]->tarifa()->code; + foreach ($encuadernaciones as $key => $value) { + $code = $value->tarifa()->code; + if ($code) { + break; + } } return $code; } @@ -1596,21 +1612,10 @@ class ProductionService extends BaseService foreach ($acabados as $key => $acabado) { $tarifa_acabado = $acabado->tarifa(); if ($tarifa_acabado->code) { - $plastificado_code = $tarifa_acabado->code; - if ($plastificado_code == "BRIL") { - $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['BRIL']; - } - if ($plastificado_code == "MATE") { - $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['MATE']; - } - if ($plastificado_code == "ANTI") { - $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['ANTIRAYADO']; - } - if ($plastificado_code == "SAND") { - $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['SANDY']; - } - if ($plastificado_code == "GOF") { - $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR['GOFRADO']; + if ($tarifa_acabado->plastificado) { + if (isset($this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR[$tarifa_acabado->plastificado_tipo])) { + $color = $this->ordenTrabajoConfig->OT_PLASTIFICADO_COLOR[$tarifa_acabado->plastificado_tipo]; + } } } } @@ -1641,9 +1646,9 @@ class ProductionService extends BaseService $this->color(); return [ "isGofrado" => $this->gofrado(), - "isEspiral" => $this->isEspiral, + "isEspiral" => $this->isEspiral, //TODO "isUVI" => $this->uvi(), - "isPlastificado" => $this->isPlastificado, + "isPlastificado" => $this->plastificado(), "isCubierta" => $this->cubierta(), "isColor" => $this->isColor, "isBN" => $this->isBN, @@ -1669,6 +1674,61 @@ class ProductionService extends BaseService $this->isGofrado = $flag; return $this->isGofrado; } + public function plakene(): bool + { + $flag = false; + $acabados = $this->presupuesto->acabados(); + foreach ($acabados as $key => $acabado) { + $tarifa_acabado = $acabado->tarifa(); + if ($tarifa_acabado->plakene) { + $flag = true; + break; + } + } + $this->isPlakene = $flag; + return $this->isPlakene; + } + public function plakene_tipo(): ?string + { + $tipo = ""; + $acabados = $this->presupuesto->acabados(); + foreach ($acabados as $key => $acabado) { + $tarifa_acabado = $acabado->tarifa(); + if ($tarifa_acabado->plakene) { + $tipo = $tarifa_acabado->plakene_tipo; + break; + } + } + return $tipo; + } + public function plastificado(): bool + { + $flag = false; + $acabados = $this->presupuesto->acabados(); + foreach ($acabados as $key => $acabado) { + $tarifa_acabado = $acabado->tarifa(); + if ($tarifa_acabado->plastificado) { + $flag = true; + break; + } + } + $this->isPlastificado = $flag; + return $this->isPlastificado; + } + public function estampado(): bool + { + $flag = false; + $acabados = $this->presupuesto->acabados(); + foreach ($acabados as $key => $acabado) { + $tarifa_acabado = $acabado->tarifa(); + if ($tarifa_acabado->estampado) { + $flag = true; + break; + } + } + $this->isEstampado = $flag; + return $this->isEstampado; + } public function cosido(): bool { $flag = false; diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2.php index 456f529c..71505836 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2.php @@ -1,7 +1,7 @@ - + @@ -10,10 +10,13 @@ 0): ?> - $value): ?> - - + + solapas > 0): ?> + + + + @@ -21,7 +24,6 @@ - diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2S.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2S.php deleted file mode 100644 index 285f4e6d..00000000 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2S.php +++ /dev/null @@ -1,30 +0,0 @@ -
Encuadernacionsolapas > 0 ? "Solapas" : ""?> Marcapáginas
tarifa()->nombre ?>tarifa()->nombre ?>solapas_ancho mm.)" ?> retractilado ? "SI" : "NO" ?> marcapaginas ? "SI" : "NO" ?>
Sin encuadernación
- - - - - - - - - - - 0): ?> - $value): ?> - - - - - - - - - - - - - - - - -
EncuadernacionSolapasRetractiladoMarcapáginas
tarifa()->nombre ?>solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?>retractilado ? "SI" : "NO" ?>marcapaginas ? "SI" : "NO" ?>
Sin encuadernación
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/ESP.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/ESP.php index d12593bb..75396955 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/ESP.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/ESP.php @@ -9,17 +9,15 @@ Retractilado 0): ?> - $value): ?> - tarifa()->nombre ?> - - - + tarifa()->nombre ?> + + + proveedor() ? $encuadernacion->proveedor()->nombre : "" ?> retractilado ? "SI" : "NO" ?> - Sin encuadernación diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHV.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHV.php index 4b984852..769f698e 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHV.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHV.php @@ -3,25 +3,27 @@ Encuadernacion Pliegos Pliegos - + solapas > 0 ? "Solapas" : ""?> Sobrecubierta Guardas Retractilado Marcapáginas 0): ?> - $value): ?> - tarifa()->nombre ?> - pliego_1." de ".$tareaCosido->pliego_1_total?> - pliego_2." de ".$tareaCosido->pliego_2_total?> - + tarifa()->nombre ?> + pliego_1 . " de " . $tareaCosido->pliego_1_total ?> + pliego_2 . " de " . $tareaCosido->pliego_2_total ?> + solapas > 0): ?> + solapas_ancho mm.)" ?> + + NO + hasSobrecubierta() ? "SI" : "NO" ?> guardas ? "SI" : "NO" ?> retractilado ? "SI" : "NO" ?> marcapaginas ? "SI" : "NO" ?> - Sin encuadernación diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHVS.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHVS.php deleted file mode 100644 index e8fa2d41..00000000 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHVS.php +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - 0): ?> - $value): ?> - - - - - - - - - - - - - - - - -
EncuadernacionPliegosPliegosSolapasSobrecubiertaGuardasRetractiladoMarcapáginas
tarifa()->nombre ?>pliego_1." de ".$tareaCosido->pliego_1_total?>pliego_2." de ".$tareaCosido->pliego_2_total?>solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?>hasSobrecubierta() ? "SI" : "NO" ?>guardas ? "SI" : "NO" ?>retractilado ? "SI" : "NO" ?>marcapaginas ? "SI" : "NO" ?>
Sin encuadernación
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RF.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RF.php index de0a6374..11ca2aa7 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RF.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RF.php @@ -1,7 +1,7 @@ - + @@ -10,10 +10,13 @@ 0): ?> - $value): ?> - - + + solapas > 0): ?> + + + + @@ -21,7 +24,6 @@ - diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RFS.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RFS.php deleted file mode 100644 index 5fcf0d22..00000000 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/RFS.php +++ /dev/null @@ -1,30 +0,0 @@ -
Encuadernacionsolapas > 0 ? "Solapas" : ""?> SobrecubiertaMarcapáginas
tarifa()->nombre ?>tarifa()->nombre ?>solapas_ancho mm.)" ?> hasSobrecubierta() ? "SI" : "NO" ?>retractilado ? "SI" : "NO" ?> marcapaginas ? "SI" : "NO" ?>
Sin encuadernación
- - - - - - - - - - - 0): ?> - $value): ?> - - - - - - - - - - - - - - - - -
EncuadernacionSolapasSobrecubiertaGuardasRetractiladoMarcapáginas
tarifa()->nombre ?>solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?>hasSobrecubierta() ? "SI" : "NO" ?>guardas ? "SI" : "NO" ?>retractilado ? "SI" : "NO" ?>marcapaginas ? "SI" : "NO" ?>
Sin encuadernación
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDC.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDC.php deleted file mode 100644 index 23bbb605..00000000 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDC.php +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - 0): ?> - $value): ?> - - - - - - - - - - - - - - - - - - - - - - - -
EncuadernacionPliegosPliegosGuardasGuardas ImpresionCabezadaLomo
tarifa()->nombre ?>pliego_1." de ".$tareaCosido->pliego_1_total?>pliego_2." de ".$tareaCosido->pliego_2_total?>Color/NORecto/Redondo
SobrecubiertaisSobreCubierta() ? "SI" : "NO" ?>Retractiladoretractilado ? "SI" : "NO" ?>Marcapáginasmarcapaginas ? "SI" : "NO" ?>
Sin encuadernación
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDCF.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDCF.php new file mode 100644 index 00000000..8e67f288 --- /dev/null +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDCF.php @@ -0,0 +1,48 @@ + + + + + + + + + + + 0): ?> + + + + + + + + + + + + presupuestoLineaGuarda()): ?> + + + + + + + + + + + + + + + + + + + + + + + + +
EncuadernacionPliegosPliegosGuardasGuardas ImpresionCabezadaLomo
tarifa()->nombre ?>pliego_1 . " de " . $tareaCosido->pliego_1_total ?>pliego_2 . " de " . $tareaCosido->pliego_2_total ?>presupuestoLineaGuarda()->papel_generico()?->code ?>presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?>?presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?>>cabezada ? "COLOR" : "NO" ?>lomo_redondo ? "REDONDO" : "RECTO" ?>
SobrecubiertaisSobreCubierta() ? "SI" : "NO" ?>Retractiladoretractilado ? "SI" : "NO" ?>Marcapáginasmarcapaginas ? "SI" : "NO" ?>
Sin encuadernación
\ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDF.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDF.php index 32241733..d558947d 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDF.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDF.php @@ -1,6 +1,6 @@ - + @@ -10,18 +10,27 @@ 0): ?> - $value): ?> - - - - - - - - + + + presupuestoLineaGuarda()): ?> + + + + + + + + + + + + + + + + - diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/WIO.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/WIO.php index c46e8ae9..026a4b7a 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/WIO.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/WIO.php @@ -1,7 +1,4 @@
EncuadernacionEncuadernacion Guardas Guardas Imp. CabezadaMarcapáginas
tarifa()->nombre ?>tarifa()->nombre ?>presupuestoLineaGuarda()->papel_generico()?->nombre ?>presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?>>?presupuestoLineaGuarda()->paginas_impresion > 0 ? "SI" : "NO" ?>>cabezada ? "COLOR" : "NO" ?>lomo_redondo ? "REDONDO" : "RECTO" ?>isSobreCubierta() ? "SI" : "NO" ?>retractilado ? "SI" : "NO" ?>marcapaginas ? "SI" : "NO" ?>
Sin encuadernación
- @@ -11,16 +8,14 @@ 0): ?> - $value): ?> - - - - + + + + - diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php index de0a6374..07b92483 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php @@ -10,9 +10,8 @@ 0): ?> - $value): ?> - + @@ -21,7 +20,6 @@ - diff --git a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php index 5c9cd063..408ce733 100755 --- a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php +++ b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php @@ -85,9 +85,9 @@ $settings = $session->get('settings');
-
- WIO -
Encuadernacion ColorRetractilado
tarifa()->nombre ?>tarifa()->nombre ?> proveedor() ? $encuadernacion->proveedor()->nombre : "" ?> retractilado ? "SI" : "NO" ?>
Sin encuadernaciónMarcapáginas
tarifa()->nombre ?>tarifa()->nombre ?> retractilado ? "SI" : "NO" ?> marcapaginas ? "SI" : "NO" ?>
Sin encuadernación
+
- + @@ -113,7 +113,7 @@ $settings = $session->get('settings');
;color:;"> - tarifa()->code ?? "" : "" ?> +
@@ -308,27 +308,30 @@ $settings = $session->get('settings');
-
ENCUADERNACIÓN
+
ACABADOS/ENCUADERNACIÓN
;color:;"> - tarifa()->code ?? "" : "" ?> +
ININ
- - - - - - - - - - - - - - - + $acabado): ?> + + + + + + + + + + + + + + + + +
Plastificadotarifa()->nombre ?>UVI EXTERNO:
Meter datos de solapas y preparación guillotinaCORTE PIE:
Plastificadotarifa()->nombre ?>UVI EXTERNO:proveedor() ? $acabado->proveedor()->nombre : "" ?>
Meter datos de solapas y preparación guillotinaCORTE PIE:
get('settings'); $encuadernacion_code = $encuadernacion->tarifa()->code; try { if ($encuadernacion_code) { - echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php"); + echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php", ["encuadernacion" => $encuadernacion]); } else { - echo view("/themes/vuexy/pdfs/encuadernados/default.php"); + echo view("/themes/vuexy/pdfs/encuadernados/default.php", ["encuadernacion" => $encuadernacion]); } } catch (\Throwable $th) { $error_message = $th->getMessage(); - echo view("/themes/vuexy/pdfs/encuadernados/default.php"); echo "No se ha podido renderizar la tabla de encuadernación"; // echo "
$error_message"; } diff --git a/httpdocs/assets/js/safekat/pages/pdf/otDownload.js b/httpdocs/assets/js/safekat/pages/pdf/otDownload.js index 69747833..1e80622d 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