-
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/disenioLibro.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/disenioLibro.js
index 8eb7e879..1cb11634 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/disenioLibro.js
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/disenioLibro.js
@@ -40,7 +40,7 @@ function updateTapaCheck(el)
})
}
el.closest('.custom-option-tapa').classList.add('checked')
- if(el.closest('.custom-option-tapa').id == 'tapaBlandaDiv') {
+ if(el.closest('.custom-option-tapa').id == 'tapaBlandaInnerDiv') {
$('#tapaBlanda').prop('checked', true);
$('#tapaDura').prop('checked', false);
}
@@ -136,22 +136,42 @@ function updateCalidadCheck(el)
}
}
+$('#enableSobrecubierta').on('change', function() {
+ if ($(this).is(":checked")) {
+ $('.enable-sobrecubierta').show();
+ } else {
+ $('.enable-sobrecubierta').hide();
+ }
+});
function initDisenioLibro(){
initTapaCheck();
initColorCheck();
initCalidadCheck();
-
- updatePapelInterior();
+
+ $('.elementos-libro').trigger('change');
+ $('.change-tipo-impresion').trigger('change');
+
+ $('#papelInterior').trigger('change');
+ $('#papelCubierta').trigger('change');
+ if($('#enableSobrecubierta').prop('checked')){
+ $('#papelSobrecubierta').trigger('change');
+ }
}
-$('.change-papel-interior ').on('change', updatePapelInterior)
-
-function updatePapelInterior() {
+$('.change-tipo-impresion').on('change', function () {
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
isHq = $('#calidadEstandarDiv').hasClass('checked') ? false : true;
+ //si es color hay que mostrar el numero de paginas a color
+ if(isColor){
+ $('#pagColorDiv').show();
+ }
+ else{
+ $('#pagColorDiv').hide();
+ }
+
var data = [];
if(!isColor && !isHq) {
@@ -173,9 +193,22 @@ function updatePapelInterior() {
dropdown.append($("
").val(this.id).text(this.nombre));
});
//Se quita la seleccion del dropdown
- dropdown.val('').trigger('change');
+ //dropdown.val('').trigger('change');
+
+});
+
+$('#tirada').on('change', function() {
+
+ const valInterior = $('#gramajeInterior option:selected').val();
+ const valCubierta = $('#gramajeCubierta option:selected').val();
+ const valSobrecubierta = $('#gramajeSobrecubierta option:selected').val();
+
+
+ $('#papelInterior').trigger('change');
+ $('#papelCubierta').trigger('change');
+ $('#papelSobrecubierta').trigger('change');
+});
-}
$('#papelInterior').on('change', function() {
isColor = $('#colorNegroDiv').hasClass('checked') ? false : true;
@@ -196,7 +229,6 @@ $('#papelInterior').on('change', function() {
else if(isColor && isHq) {
uso = 'colorhq';
}
- merma = calcular_mermas();
datos = {
tirada: $('#tirada').val(),
merma: calcular_mermas(),
@@ -205,17 +237,113 @@ $('#papelInterior').on('change', function() {
};
datos = Object.assign(datos, window.token_ajax)
+ const valInterior = $('#gramajeInterior option:selected').val();
+
$.ajax({
url: window.routes_disenio_libro.obtenerGramaje,
type: 'POST',
data: datos,
success: function(response) {
- console.log(response);
- var data = JSON.parse(response);
- //$('#papelInteriorGramaje').val(data.gramaje);
+ $('#gramajeInterior').empty();
+ $(response.menu).each(function( index, element ) {
+
+ $('#gramajeInterior').append($("
").val(element.id).text(element.text));
+ });
+ if(valInterior != undefined)
+ $('#gramajeInterior option[value='+valInterior + ']').prop('selected', true).trigger('change');
+
}
});
}
});
+
+
+$('#papelCubierta').on('change', function() {
+ isColor = true;
+ isHq = true;
+
+ if($('#papelCubierta option:selected').val() != undefined){
+ var uso = 'colorhq';
+
+ datos = {
+ tirada: $('#tirada').val(),
+ merma: calcular_mermas(),
+ uso: uso,
+ papel: $('#papelCubierta option:selected').text()
+ };
+ datos = Object.assign(datos, window.token_ajax)
+
+ const valCubierta = $('#gramajeCubierta option:selected').val();
+
+ $.ajax({
+ url: window.routes_disenio_libro.obtenerGramaje,
+ type: 'POST',
+ data: datos,
+ success: function(response) {
+
+ $('#gramajeCubierta').empty();
+ $(response.menu).each(function( index, element ) {
+ $('#gramajeCubierta').append($("
").val(element.id).text(element.text));
+ });
+
+ if(valCubierta != undefined)
+ $('#gramajeCubierta option[value='+ valCubierta + ']').prop('selected', true).trigger('change');
+ }
+ });
+ }
+});
+
+
+$('#papelSobrecubierta').on('change', function() {
+ isColor = true;
+ isHq = true;
+
+ if($('#papelSobrecubierta option:selected').val() != undefined){
+ var uso = 'colorhq';
+
+ datos = {
+ tirada: $('#tirada').val(),
+ merma: calcular_mermas(),
+ uso: uso,
+ papel: $('#papelSobrecubierta option:selected').text()
+ };
+ datos = Object.assign(datos, window.token_ajax)
+
+ const valSobrecubierta = $('#gramajeSobrecubierta option:selected').val();
+
+ $.ajax({
+ url: window.routes_disenio_libro.obtenerGramaje,
+ type: 'POST',
+ data: datos,
+ success: function(response) {
+
+ $('#gramajeSobrecubierta').empty();
+ $(response.menu).each(function( index, element ) {
+ $('#gramajeSobrecubierta').append($("
").val(element.id).text(element.text));
+ });
+
+ if(valSobrecubierta != undefined)
+ $('#gramajeSobrecubierta option[value='+ valCubierta + ']').prop('selected', true).trigger('change');
+ }
+ });
+ }
+});
+
+
+$('#solapasCubierta').on('change', function() {
+ if ($(this).is(":checked")) {
+ $('#tamanioSolapasCubierta').show();
+ } else {
+ $('#tamanioSolapasCubierta').hide();
+ }
+});
+
+$('#solapasSobrecubierta').on('change', function() {
+ if ($(this).is(":checked")) {
+ $('#tamanioSolapasSobrecubierta').show();
+ } else {
+ $('#tamanioSolapasSobrecubierta').hide();
+ }
+});
\ No newline at end of file
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/presupuestoCliente.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/presupuestoCliente.js
index 5beed19e..6861633b 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/presupuestoCliente.js
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/presupuestoCliente.js
@@ -5,7 +5,7 @@
'use strict';
(function () {
-
+
// Init custom option check
//window.Helpers.initCustomOptionCheck();
@@ -32,24 +32,28 @@
// Deal Type
const FormValidation1 = FormValidation.formValidation(clientePresupuestoWizardFormStep1, {
+
fields: {
- dealAmount: {
+ titulo: {
validators: {
notEmpty: {
- message: 'Please enter amount'
+ message: window.Presupuestos.validation.requerido_short
},
- numeric: {
- message: 'The amount must be a number'
+ }
+ },
+ clienteId: {
+ validators: {
+ callback: {
+ message: window.Presupuestos.validation.cliente,
+ callback: function (input) {
+ // Get the selected options
+ const options = $("#clienteId").select2('data');
+ const hasValidOption = options.some(option => parseInt(option.id) > 0);
+ return options !== null && options.length > 0 && hasValidOption;
+ },
}
}
},
- dealRegion: {
- validators: {
- notEmpty: {
- message: 'Please select region'
- }
- }
- }
},
plugins: {
@@ -68,48 +72,16 @@
validationStepper.next();
});
- // select2 (Region)
- const dealRegion = $('#dealRegion');
- if (dealRegion.length) {
- dealRegion.wrap('
');
- dealRegion
- .select2({
- placeholder: 'Select an region',
- dropdownParent: dealRegion.parent()
- })
- .on('change.select2', function () {
- // Revalidate the region field when an option is chosen
- FormValidation1.revalidateField('dealRegion');
- });
- }
+ // select2 (clienteId)
+ const clienteId = $('#clienteId');
+ clienteId.on('change.select2', function () {
+ // Revalidate the clienteId field when an option is chosen
+ FormValidation1.revalidateField('clienteId');
+ });
// Deal Details
const FormValidation2 = FormValidation.formValidation(clientePresupuestoWizardFormStep2, {
fields: {
- // * Validate the fields here based on your requirements
- dealTitle: {
- validators: {
- notEmpty: {
- message: 'Please enter deal title'
- }
- }
- },
- dealCode: {
- validators: {
- notEmpty: {
- message: 'Please enter deal code'
- },
- stringLength: {
- min: 4,
- max: 10,
- message: 'The deal code must be more than 4 and less than 10 characters long'
- },
- regexp: {
- regexp: /^[A-Z0-9]+$/,
- message: 'The deal code can only consist of capital alphabetical and number'
- }
- }
- }
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
@@ -117,7 +89,7 @@
// Use this for enabling/changing valid/invalid class
// eleInvalidClass: '',
eleValidClass: '',
- rowSelector: '.col-sm-6'
+ rowSelector: '.col-sm-3'
}),
autoFocus: new FormValidation.plugins.AutoFocus(),
submitButton: new FormValidation.plugins.SubmitButton()
@@ -127,25 +99,106 @@
validationStepper.next();
});
- // select2 (Offered Item)
- const dealOfferedItem = $('#dealOfferedItem');
- if (dealOfferedItem.length) {
- dealOfferedItem.wrap('
');
- dealOfferedItem
- .select2({
- placeholder: 'Select an offered item',
- dropdownParent: dealOfferedItem.parent()
- })
- .on('change.select2', function () {
- // Revalidate the field if needed when an option is chosen
- // FormValidation2.revalidateField('dealOfferedItem');
- });
- }
-
// Deal Usage
const FormValidation3 = FormValidation.formValidation(clientePresupuestoWizardFormStep3, {
fields: {
- // * Validate the fields here based on your requirements
+ tirada: {
+ validators: {
+ callback: {
+ message: window.Presupuestos.validation.integer_greatherThan_0,
+ callback: function (input) {
+ const value = $("#tirada").val();
+ return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
+ },
+ }
+ }
+ },
+ paginas: {
+ validators: {
+ callback: {
+ message: window.Presupuestos.validation.integer_greatherThan_0,
+ callback: function (input) {
+ const value = $("#paginas").val();
+ return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
+ },
+ }
+ }
+ },
+ paginasColor: {
+ validators: {
+ callback: {
+ message: window.Presupuestos.validation.integer_greatherThan_0,
+ callback: function (input) {
+ if ($('#pagColorDiv').is(':hidden'))
+ return true;
+ else {
+ const value = $("#paginasColor").val();
+ return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
+ }
+ },
+ }
+ }
+ },
+ gramajeInterior: {
+ validators: {
+ callback: {
+ message: window.Presupuestos.validation.tirada_no_valida,
+ callback: function (input) {
+ const value = $("#tirada").val();
+ if ($('#gramajeInterior option:selected').text().length == 0) {
+ return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
+ }
+ return true;
+ },
+ },
+ callback: {
+ message: window.Presupuestos.validation.sin_gramaje,
+ callback: function (input) {
+ if ($('#gramajeInterior option:selected').text().length == 0) {
+ return false;
+ }
+ return true;
+ },
+ }
+ }
+ },
+ gramajeCubierta: {
+ validators: {
+ callback: {
+ message: window.Presupuestos.validation.tirada_no_valida,
+ callback: function (input) {
+ const value = $("#tirada").val();
+ if ($('#gramajeCubierta option:selected').text().length == 0) {
+ return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
+ }
+ return true;
+ },
+ },
+ callback: {
+ message: window.Presupuestos.validation.sin_gramaje,
+ callback: function (input) {
+ if ($('#gramajeCubierta option:selected').text().length == 0) {
+ return false;
+ }
+ return true;
+ },
+ }
+ }
+ },
+ gramajeSobrecubierta: {
+ validators: {
+ callback: {
+ message: window.Presupuestos.validation.tirada_no_valida,
+ callback: function (input) {
+ const value = $("#tirada").val();
+ if ($('#gramajeSobrecubierta option:selected').text().length == 0) {
+ return value.length > 0 && Number.isInteger(parseInt(value)) && parseInt(value) > 0;
+ }
+ return true;
+ },
+ }
+ }
+ },
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
@@ -153,7 +206,19 @@
// Use this for enabling/changing valid/invalid class
// eleInvalidClass: '',
eleValidClass: '',
- rowSelector: '.col-sm-6'
+ rowSelector: function (field, ele) {
+ // field is the field name
+ // ele is the field element
+ switch (field) {
+ case 'gramajeInterior':
+ case 'gramajeCubierta':
+ case 'gramajeSobrecubierta':
+ return '.col-sm-2';
+
+ default:
+ return '.col-sm-3';
+ }
+ }
}),
autoFocus: new FormValidation.plugins.AutoFocus(),
submitButton: new FormValidation.plugins.SubmitButton()
@@ -162,10 +227,18 @@
validationStepper.next();
});
+ const tirada = $('#tirada');
+ tirada.on('change', function () {
+ // Revalidate the clienteId field when an option is chosen
+ FormValidation1.revalidateField('gramajeInterior');
+ FormValidation1.revalidateField('gramajeCubierta');
+ FormValidation1.revalidateField('gramajeSobrecubierta');
+ });
+
// Deal Usage
const FormValidation4 = FormValidation.formValidation(clientePresupuestoWizardFormStep4, {
fields: {
- // * Validate the fields here based on your requirements
+
},
plugins: {
trigger: new FormValidation.plugins.Trigger(),
@@ -179,11 +252,7 @@
submitButton: new FormValidation.plugins.SubmitButton()
}
}).on('core.form.valid', function () {
- // You can submit the form
- // clientePresupuestoWizardForm.submit()
- // or send the form data to server via an Ajax request
- // To make the demo simple, I just placed an alert
- alert('Submitted..!!');
+ validationStepper.next();
});
// Deal Usage
@@ -243,6 +312,10 @@
clientePresupuestoWizardPrev.forEach(item => {
item.addEventListener('click', event => {
switch (validationStepper._currentIndex) {
+ case 4:
+ validationStepper.previous();
+ break;
+
case 3:
validationStepper.previous();
break;
@@ -265,50 +338,232 @@
}
})();
-function calcular_mermas(){
-
+
+$('.elementos-libro').on('change', function () {
+ // Libro cosido
+ if ($('#cosidoDiv').hasClass('checked')) {
+ $('#tituloDisenioLibro').text("Libro cosido");
+ if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
+ // Cosido tapa blanda
+ $('.guardas').hide();
+ $('.solapas-cubierta').show();
+ $('.sobrecubierta').show();
+ }
+ else {
+ // Cosido tapa dura
+ $('.guardas').show();
+ numCarasGuardas(2);
+ $('.solapas-cubierta').hide();
+ $('.sobrecubierta').show();
+ }
+ }
+ // Libro fresado
+ else if ($('#fresadoDiv').hasClass('checked')) {
+ $('#tituloDisenioLibro').text("Libro fresado");
+ if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
+ // fresado tapa blanda
+ $('.guardas').hide();
+ $('.solapas-cubierta').show();
+ $('.sobrecubierta').show();
+ }
+ else {
+ // fresado tapa dura
+ $('.guardas').show();
+ numCarasGuardas(2);
+ $('.solapas-cubierta').hide();
+ $('.sobrecubierta').show();
+ }
+ }
+ // Libro grapado
+ else if ($('#grapadoDiv').hasClass('checked')) {
+ $('#tituloDisenioLibro').text("Libro grapado");
+ if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
+ // grapado tapa blanda
+ $('.guardas').hide();
+ $('.solapas-cubierta').show();
+ $('.sobrecubierta').hide();
+ }
+ }
+ // Libro wire-o
+ else if ($('#wireoDiv').hasClass('checked')) {
+ $('#tituloDisenioLibro').text("Libro Wire-O");
+ if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
+ // wire-o tapa blanda
+ $('.guardas').hide();
+ $('.solapas-cubierta').show();
+ $('.sobrecubierta').hide();
+ $('#enableSobrecubierta').prop('checked', false);
+ }
+ else {
+ // wire-o tapa dura
+ $('.guardas').show();
+ numCarasGuardas(1);
+ $('.solapas-cubierta').hide();
+ $('.sobrecubierta').hide();
+ $('#enableSobrecubierta').prop('checked', false);
+ }
+ }
+ // Libro espiral
+ else if ($('#espiralDiv').hasClass('checked')) {
+ $('#tituloDisenioLibro').text("Libro espiral");
+ if ($('#tapaBlandaInnerDiv').hasClass('checked')) {
+ // espiral tapa blanda
+ $('.guardas').hide();
+ $('.solapas-cubierta').show();
+ $('.sobrecubierta').hide();
+ $('#enableSobrecubierta').prop('checked', false);
+ }
+ else {
+ // espiral tapa dura
+ $('.espiral').show();
+ numCarasGuardas(1);
+ $('.solapas-cubierta').hide();
+ $('.sobrecubierta').hide();
+ $('#enableSobrecubierta').prop('checked', false);
+ }
+ }
+});
+
+
+function numCarasGuardas(numCaras) {
+ if (numCaras == 1) {
+ $("#impresionGuardas option[value='8']").remove();
+ }
+ else {
+ if ($("#impresionGuardas option[value='8']").length == 0)
+ $("#impresionGuardas").append('
');
+
+ }
+}
+
+
+
+function calcular_mermas() {
+
const tirada = parseInt($('#tirada').val())
var merma = 0
- if(tirada> window.datosPresupuesto.POD ){
- merma = tirada*0.1<=30 ? tirada*0.1 : 30
+ if (tirada > window.datosPresupuesto.POD) {
+ merma = tirada * 0.1 <= 30 ? tirada * 0.1 : 30
}
- else{
- /*merma_lineas = []
- tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
- var rowData = this.data();
- if(rowData.row_id != 'lp_guardas' && rowData.row_id != 'lp_cubierta' && rowData.row_id != 'lp_sobrecubierta'){
- const formas_linea = parseInt($('#isCosido').val())==0?parseInt(rowData.formas):parseInt(rowData.formas)/2
- if(formas_linea > tirada)
- merma_lineas.push(formas_linea-tirada)
- else
- merma_lineas.push(tirada%formas_linea)
- }
-
- })
+ else {
+ /*merma_lineas = []
+ tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
+ var rowData = this.data();
+ if(rowData.row_id != 'lp_guardas' && rowData.row_id != 'lp_cubierta' && rowData.row_id != 'lp_sobrecubierta'){
+ const formas_linea = parseInt($('#isCosido').val())==0?parseInt(rowData.formas):parseInt(rowData.formas)/2
+ if(formas_linea > tirada)
+ merma_lineas.push(formas_linea-tirada)
+ else
+ merma_lineas.push(tirada%formas_linea)
+ }
+
+ })
+
+
+ if(merma_lineas.length>0)
+ merma = Math.max(...merma_lineas)
-
- if(merma_lineas.length>0)
- merma = Math.max(...merma_lineas)
+ else{
+ htmlString = `
+
+
+
+
+
+
` +
+ window.Presupuestos.validation.no_lp_for_merma +
+ `
+
+
`;
- else{
- htmlString = `
-
-
-
-
-
-
` +
- window.Presupuestos.validation.no_lp_for_merma +
- `
-
-
`;
-
- merma = 0
-
- }*/
-
- }
+ merma = 0
-}
\ No newline at end of file
+ }*/
+
+ }
+ return merma;
+}
+
+function getDimensionLibro() {
+ var ancho = 0;
+ var alto = 0;
+
+
+ if ($('#papelFormatoId').select2('data').length > 0) {
+ if ($('#papelFormatoId').select2('data')[0].id.length > 0) {
+ ancho = parseFloat($('#papelFormatoId').select2('data')[0].text.trim().split(" x ")[0]);
+ alto = parseFloat($('#papelFormatoId').select2('data')[0].text.trim().split(" x ")[1]);
+ }
+ else if (document.getElementById('papelFormatoPersonalizado').checked) {
+ ancho = parseFloat(document.getElementById('papelFormatoAncho').value);
+ alto = parseFloat(document.getElementById('papelFormatoAlto').value);
+ }
+ }
+
+ else if (document.getElementById('papelFormatoPersonalizado').checked) {
+ ancho = parseFloat(document.getElementById('papelFormatoAncho').value);
+ alto = parseFloat(document.getElementById('papelFormatoAlto').value);
+ }
+ return {
+ ancho: ancho,
+ alto: alto
+ }
+}
+
+function getTiradas() {
+ let tiradas = [];
+ tiradas.push(parseInt($('#tirada').val()));
+ if($('#tirada2').val().length > 0 && parseInt($('#tirada2').val()) > 0)
+ tiradas.push(parseInt($('#tirada2').val()));
+ if($('#tirada3').val().length > 0 && parseInt($('#tirada3').val()) > 0)
+ tiradas.push(parseInt($('#tirada3').val()));
+ if($('#tirada4').val().length > 0 && parseInt($('#tirada4').val()) > 0)
+ tiradas.push(parseInt($('#tirada4').val()));
+ return tiradas;
+}
+
+
+function checkPresupuestoData(){
+ if(
+ $('#clienteId').val().length > 0 &&
+ $('#paginas').val().length > 0 &&
+ $('#tirada').val().length > 0 &&
+ $('#papelInterior').val().length > 0 &&
+ $('#gramajeInterior').val().length > 0 &&
+ $('#papelCubierta').val().length > 0 &&
+ $('#gramajeCubierta').val().length > 0
+ ){
+ return true;
+ }
+ return false;
+}
+
+
+function obtenerDatos() {
+
+ if(!checkPresupuestoData()){
+ return;
+ }
+
+ libro = getDimensionLibro();
+
+ let data = {
+ clienteId: $('#clienteId').val(),
+ ancho: libro.ancho,
+ alto: libro.alto,
+ paginas: parseInt($('#paginas').val()),
+ tiradas: getTiradas(),
+ papelInterior: $('#papelInterior').val(),
+ gramajeInterior: $('#gramajeInterior').val(),
+ papelCubierta: $('#papelCubierta').val(),
+ gramajeCubierta: $('#gramajeCubierta').val(),
+ carasCubierta: $('#carasCubierta').val(),
+ acabadoCubierta: $('#acabadoCubiertaId').val(),
+ solapasCubierta: $('#solapasCubierta').is(':checked'),
+ tamanioSolapasCubierta: $('#anchoSolapasCubierta').val(),
+ }
+
+
+}
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/tipoLibroItems.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/tipoLibroItems.js
index e9d0b6e1..de35da33 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/tipoLibroItems.js
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/tipoLibroItems.js
@@ -27,10 +27,11 @@ function updateTipoLibroCheck(el)
}
el.closest('.custom-option-tipo').classList.add('checked')
if(el.closest('.custom-option-tipo').id == 'grapadoDiv') {
- $('#tapaDiv').hide();
+ $('#tapaDuraDiv').hide();
+ $('#tapaBlanda').prop('checked', true);
}
else {
- $('#tapaDiv').show();
+ $('#tapaDuraDiv').show();
}
} else {
el.closest('.custom-option-tipo').classList.remove('checked')
@@ -49,5 +50,3 @@ function getUpdatePapelInterior() {
$('#colorInteriorDiv').hide();
}
}
-
-
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php
index bd7cb62c..f969ea51 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/viewPresupuestoclienteForm.php
@@ -17,7 +17,7 @@