diff --git a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php
index 58abbb68..26ef21a9 100644
--- a/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php
+++ b/ci4/app/Controllers/Presupuestos/Presupuestoadmin.php
@@ -391,6 +391,7 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
'solapas_grandes_sobrecubierta' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_sobrecubierta')->value,
'solapas_grandes_faja' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_plegado_exceso_solapas_faja')->value,
'lomo_redondo' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_lomo_redondo')->value,
+ 'ferro_digital' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_ferro_digital')->value,
];
$this->viewData['tipo_impresion_id'] = $presupuestoEntity->tipo_impresion_id; // Cosido tapa blanda JJO
diff --git a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php
index 3d95da2e..7413e5af 100644
--- a/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php
+++ b/ci4/app/Views/themes/vuexy/form/presupuestos/admin/_datosLibroItems.php
@@ -332,6 +332,7 @@
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js
index df4b06ef..8b1da5ea 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/datosLibro.js
@@ -128,6 +128,7 @@ class DatosLibro {
this.retractilado5.on('change', this.checkRetractilado.bind(this));
this.ferro.on('change', this.changeFerro.bind(this));
this.prototipo.on('change', this.changePrototipo.bind(this));
+ this.ferroDigital.on('change', this.changeFerroDigital.bind(this));
this.tamanio.item.on('select2:select', this.changeFormato.bind(this));
$('.formato_libro').on('change', this.changeFormato.bind(this));
@@ -216,6 +217,19 @@ class DatosLibro {
}
}
+ changeFerroDigital() {
+
+ if (this.cargando)
+ return;
+
+ if (this.ferro.prop('checked')) {
+ $(document).trigger('add-servicio-lineas', 'ferroDigital');
+ }
+ else {
+ $(document).trigger('remove-servicio-lineas', 'ferroDigital');
+ }
+ }
+
changePrototipo() {
if (this.cargando)
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/servicios.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/servicios.js
index 8980df87..adf9927f 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/servicios.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/servicios.js
@@ -119,6 +119,11 @@ class Servicios {
if(!this.checkServiceInTable(this.serviciosExtra.table, id))
this.serviciosExtra.getPresupuestoExtra(id);
}
+ else if (servicio == 'ferroDigital') {
+ const id = $('#ferroDigital').attr('service-id');
+ if(!this.checkServiceInTable(this.serviciosExtra.table, id))
+ this.serviciosExtra.getPresupuestoExtra(id);
+ }
else if (servicio == 'prototipo') {
const id = $('#prototipo').attr('service-id');
if (!this.checkServiceInTable(this.serviciosExtra.table, id))
@@ -188,24 +193,39 @@ class Servicios {
removeServicio(event, servicio) {
+ const self = this;
+
if (servicio == 'ferro') {
const id = $('#ferro').attr('service-id');
this.serviciosExtra.table.rows().every(function () {
let data = this.data();
if (data.tarifa_id == id) {
this.remove();
- this.serviciosExtra.table.draw();
+ self.serviciosExtra.table.draw();
return;
}
});
}
+
+ if (servicio == 'ferroDigital') {
+ const id = $('#ferroDigital').attr('service-id');
+ this.serviciosExtra.table.rows().every(function () {
+ let data = this.data();
+ if (data.tarifa_id == id) {
+ this.remove();
+ self.serviciosExtra.table.draw();
+ return;
+ }
+ });
+ }
+
else if (servicio == 'prototipo') {
const id = $('#prototipo').attr('service-id');
this.serviciosExtra.table.rows().every(function () {
var data = this.data();
if (data.tarifa_id == id) {
this.remove();
- this.serviciosExtra.table.draw();
+ self.serviciosExtra.table.draw();
return;
}
});