From 33db277af2083b28a0834ba54941fa70d4292dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Wed, 13 Nov 2024 22:16:31 +0100 Subject: [PATCH] =?UTF-8?q?a=C3=B1adida=20migracion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4-11-13-161331_CheckWebClientesPapeles.php | 27 +++++++++++++++++++ .../presupuestoCliente/presupuestoCliente.js | 5 ++++ 2 files changed, 32 insertions(+) create mode 100644 ci4/app/Database/Migrations/2024-11-13-161331_CheckWebClientesPapeles.php diff --git a/ci4/app/Database/Migrations/2024-11-13-161331_CheckWebClientesPapeles.php b/ci4/app/Database/Migrations/2024-11-13-161331_CheckWebClientesPapeles.php new file mode 100644 index 00000000..56decb5f --- /dev/null +++ b/ci4/app/Database/Migrations/2024-11-13-161331_CheckWebClientesPapeles.php @@ -0,0 +1,27 @@ + [ + 'type' => 'TINYINT', + 'constraint' => 1, + 'null' => false, + 'default' => 0, + ], + ]; + + $this->forge->addColumn('lg_papel_impresion', $fields); + } + + public function down() + { + $this->forge->dropColumn('lg_papel_impresion', 'show_in_client'); + } +} diff --git a/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js b/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js index fb486151..949af64e 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoCliente/presupuestoCliente.js @@ -87,6 +87,7 @@ class PresupuestoCliente { this.btnPrev.on('click', this.#prevtStep.bind(this)); this.btnSave.on('click', this.#savePresupuesto.bind(this)); this.btnConfirm.on('click', this.#confirmPresupuesto.bind(this)); + this.btnPrint.on('click', this.#printPresupuesto.bind(this)); this.titulosMenu.on('click', this.#handleTitulosMenu.bind(this)); @@ -379,6 +380,10 @@ class PresupuestoCliente { } } + #printPresupuesto(){ + + window.open('/printpresupuestos/generar/' + window.location.href.split("/").pop(), '_blank'); + } #confirmPresupuesto() {