diff --git a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php index 7d6765ca..86986a9e 100644 --- a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php +++ b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php @@ -399,6 +399,8 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController $this->viewData['formAction'] = route_to('updatePresupuestoAdmin', $id); + $this->viewData['cliente_id'] = $presupuestoEntity->cliente_id; + // Si se ha llamado a esta funcion porque se ha duplicado el presupuesto // se actualiza la bbdd para que sólo ejecute algunas funciones una vez if ($presupuestoEntity->is_duplicado) { diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php index 615b2da0..085fc242 100644 --- a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php +++ b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosPresupuestoItems.php @@ -143,7 +143,9 @@
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js index 742aac2d..7adf940f 100644 --- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js +++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosGenerales.js @@ -16,9 +16,7 @@ class DatosGenerales{ this.numeroEdicion = this.domItem.find('#numeroEdicion'); this.isbn = this.domItem.find('#isbn'); - this.openCliente = this.domItem.find('#openCliente'); - - + this.cliente = new ClassSelect($('#clienteId'), '/clientes/cliente/getSelect2', 'Seleccione cliente'); this.pais = new ClassSelect($('#paisId'), '/paises/menuitems2', 'Seleccione País'); this.referenciaCliente = this.domItem.find('#referenciaCliente'); @@ -34,10 +32,7 @@ class DatosGenerales{ allowClear: false, }); - this.openCliente.click(()=>{ - const urlObj = new URL(window.location.href); - window.open(`${urlObj.origin}` + '/clientes/cliente/edit/' + this.cliente.getVal()); - }); + } cargarDatos(datos){