From fcd6adebb7896f6b551647dc72108da5ffd23752 Mon Sep 17 00:00:00 2001 From: imnavajas Date: Tue, 25 Feb 2025 15:36:11 +0100 Subject: [PATCH] Implementacion de feedback JM sobre presupuestos --- .../Presupuestos/PresupuestoLineaModel.php | 15 ++++++---- .../Models/Presupuestos/PresupuestoModel.php | 1 + .../Views/themes/vuexy/pdfs/presupuesto.php | 29 ++++++++++++++++++- httpdocs/themes/vuexy/css/pdf.presupuesto.css | 4 +++ 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php b/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php index 0c792c5d..e6ce9656 100755 --- a/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php +++ b/ci4/app/Models/Presupuestos/PresupuestoLineaModel.php @@ -556,9 +556,10 @@ class PresupuestoLineaModel extends \App\Models\BaseModel $builder = $this->db ->table($this->table . " t1") ->select( - "t1.paginas AS paginas, t1.papel_impresion AS papel, t1.gramaje AS gramaje" + "t1.paginas AS paginas, t2.nombre AS papel, t1.gramaje AS gramaje" ) ->where("t1.presupuesto_id", $presupuesto_id) + ->join("lg_papel_generico t2", "t1.papel_id = t2.id", "left") ->whereIn('t1.tipo', ['lp_bn', 'lp_bnhq', 'lp_rot_bn']); return $builder; @@ -569,9 +570,10 @@ class PresupuestoLineaModel extends \App\Models\BaseModel $builder = $this->db ->table($this->table . " t1") ->select( - "t1.paginas AS paginas, t1.papel_impresion AS papel, t1.gramaje AS gramaje" + "t1.paginas AS paginas, t2.nombre AS papel, t1.gramaje AS gramaje" ) ->where("t1.presupuesto_id", $presupuesto_id) + ->join("lg_papel_generico t2", "t1.papel_id = t2.id", "left") ->whereIn('t1.tipo', ['lp_color', 'lp_colorhq', 'lp_rot_color']); return $builder; @@ -582,9 +584,10 @@ class PresupuestoLineaModel extends \App\Models\BaseModel $builder = $this->db ->table($this->table . " t1") ->select( - "t1.paginas AS paginas, t1.papel_impresion AS papel, t1.gramaje AS gramaje" + "t1.paginas AS paginas, t2.nombre AS papel, t1.gramaje AS gramaje" ) ->where("t1.presupuesto_id", $presupuesto_id) + ->join("lg_papel_generico t2", "t1.papel_id = t2.id", "left") ->whereIn('t1.tipo', ['lp_cubierta']); return $builder; @@ -595,9 +598,10 @@ class PresupuestoLineaModel extends \App\Models\BaseModel $builder = $this->db ->table($this->table . " t1") ->select( - "t1.paginas AS paginas, t1.papel_impresion AS papel, t1.gramaje AS gramaje" + "t1.paginas AS paginas, t2.nombre AS papel, t1.gramaje AS gramaje" ) ->where("t1.presupuesto_id", $presupuesto_id) + ->join("lg_papel_generico t2", "t1.papel_id = t2.id", "left") ->whereIn('t1.tipo', ['lp_sobrecubierta']); return $builder; @@ -608,9 +612,10 @@ class PresupuestoLineaModel extends \App\Models\BaseModel $builder = $this->db ->table($this->table . " t1") ->select( - "t1.paginas AS paginas, t1.papel_impresion AS papel, t1.gramaje AS gramaje" + "t1.paginas AS paginas, t2.nombre AS papel, t1.gramaje AS gramaje" ) ->where("t1.presupuesto_id", $presupuesto_id) + ->join("lg_papel_generico t2", "t1.papel_id = t2.id", "left") ->whereIn('t1.tipo', ['lp_guardas']); return $builder; diff --git a/ci4/app/Models/Presupuestos/PresupuestoModel.php b/ci4/app/Models/Presupuestos/PresupuestoModel.php index 9db7175d..341b10b9 100755 --- a/ci4/app/Models/Presupuestos/PresupuestoModel.php +++ b/ci4/app/Models/Presupuestos/PresupuestoModel.php @@ -324,6 +324,7 @@ class PresupuestoModel extends \App\Models\BaseModel t1.comentarios_pdf AS comentarios_pdf, t1.tirada_alternativa_json_data AS tiradas_alternativas, t1.total_presupuesto AS total_presupuesto, t1.total_precio_unidad AS total_precio_unidad, t1.papel_formato_personalizado AS isPersonalizado, t1.envios_recoge_cliente AS recoge_cliente, + t1.solapas_ancho_faja_color AS ancho_solapas_faja, CONCAT(t1.papel_formato_ancho, 'x', t1.papel_formato_alto) AS formatoPersonalizado, t2.nombre AS cliente, CONCAT(t3.first_name, ' ', t3.last_name) AS comercial, t5.secret AS email_comercial, diff --git a/ci4/app/Views/themes/vuexy/pdfs/presupuesto.php b/ci4/app/Views/themes/vuexy/pdfs/presupuesto.php index 9c631113..99a685b3 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/presupuesto.php +++ b/ci4/app/Views/themes/vuexy/pdfs/presupuesto.php @@ -232,13 +232,40 @@ Guardas + + solapas_sobrecubierta !== null): ?> + + Sobrecubierta + SI + Solapas + + solapas_sobrecubierta !== null ? 'SI' : 'NO' ?> + + Ancho + + solapas_sobrecubierta_ancho !== null ? + number_format($presupuesto->solapas_sobrecubierta_ancho, 2, ",", ".") : + '0,00' ?> mm + + + Marcapáginas marcapaginas == 1) ? "SI" : "NO"); ?> Faja - + + Solapas + + ancho_solapas_faja !== null) ? 'SI' : 'NO' ?> + + Ancho + + ancho_solapas_faja !== null) ? + number_format($presupuesto->ancho_solapas_faja, 2, ",", ".") : + '0,00' ?> mm + diff --git a/httpdocs/themes/vuexy/css/pdf.presupuesto.css b/httpdocs/themes/vuexy/css/pdf.presupuesto.css index a2a427f8..d700da62 100644 --- a/httpdocs/themes/vuexy/css/pdf.presupuesto.css +++ b/httpdocs/themes/vuexy/css/pdf.presupuesto.css @@ -286,6 +286,10 @@ body table.extras td.t { border-right: 1px dotted black; } +body table.extras td.v { + border-right: 1px dotted black; +} + body table.envio { width: 100%; font-size: 11px;