From dfa9f7662179a0028ac21cdd859eb00a57ee82d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Thu, 27 Feb 2025 16:29:31 +0100 Subject: [PATCH] =?UTF-8?q?arreglado=20fallo=20en=20la=20obtenci=C3=B3n=20?= =?UTF-8?q?del=20papel=20interior=20en=20presu=20cliente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci4/app/Controllers/Configuracion/Papelesgenericos.php | 6 +++++- .../js/safekat/pages/presupuestoCliente/disenioInterior.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ci4/app/Controllers/Configuracion/Papelesgenericos.php b/ci4/app/Controllers/Configuracion/Papelesgenericos.php index 37e2ca7c..aad7fbb4 100755 --- a/ci4/app/Controllers/Configuracion/Papelesgenericos.php +++ b/ci4/app/Controllers/Configuracion/Papelesgenericos.php @@ -328,7 +328,11 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController $forSelect2 = intval($this->request->getGet('forSelect2') ?? 0); - $anchoLibro = 2 * $ancho + 2 * $solapas + $lomo; + $anchoLibro = $ancho; + + if(intval($cubierta) == 1 || intval($sobrecubierta) == 1){ + $anchoLibro = 2 * $ancho + 2 * $solapas + $lomo; + } $menu = $this->model->getPapelCliente($tipo, $cubierta, $sobrecubierta, $guardas, $selected_papel, $tapa_dura, false, $POD, $anchoLibro, $alto, $tirada); $menu2 = $this->model->getPapelCliente($tipo, $cubierta, $sobrecubierta, $guardas, $selected_papel, $tapa_dura, true, $POD, $anchoLibro, $alto, $tirada); diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js index f0e25efd..a778db69 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/disenioInterior.js @@ -125,7 +125,7 @@ class DisenioInterior { { [this.csrf_token]: this.csrf_hash, tirada: $('#tirada').val(), - tipo: this.getTipoImpresion(), + tipo: () => this.getTipoImpresion(), ancho: this.presupuestoCliente.datosGenerales.getDimensionLibro().ancho, alto: this.presupuestoCliente.datosGenerales.getDimensionLibro().alto, solapas: 0, @@ -144,7 +144,7 @@ class DisenioInterior { { [this.csrf_token]: this.csrf_hash, tirada: $('#tirada').val(), - tipo: this.getTipoImpresion(), + tipo: () => this.getTipoImpresion(), ancho: this.presupuestoCliente.datosGenerales.getDimensionLibro().ancho, alto: this.presupuestoCliente.datosGenerales.getDimensionLibro().alto, solapas: 0,