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() {