diff --git a/.gitignore b/.gitignore index 08e5f6c6..2740fefd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ ci4/.env .vscode/ +xdebug.log \ No newline at end of file diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php index 6bdfefa3..c39c0f90 100755 --- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php +++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php @@ -236,7 +236,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController $sanitizedData['solapas'] = 0; } if ($this->request->getPost('solapas_sobrecubierta') == null) { - $sanitizedData['solapas'] = 0; + $sanitizedData['solapas_sobrecubierta'] = 0; } $noException = true; diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index c9afc8b1..4ba10898 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -1750,7 +1750,7 @@ class PresupuestoService extends BaseService if ($tipo_impresion_id == 5 || $tipo_impresion_id == 6 || $tipo_impresion_id == 7 || $tipo_impresion_id == 8) { - + if ($uso == 'cubierta'){ $linea['fields']['num_formas']['num_formas_horizontales'] *= 2; $linea['fields']['num_formas']['value'] *= 2; diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.js index 9ec619f3..edc64da4 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.js +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.js @@ -2,6 +2,12 @@ $('#paginas').on("change", function () { const url2 = window.location.href; const url_parts2 = url2.split('/'); + + if($('#tipo_impresion_id').val() == 21){ + if(parseInt($('#paginas').val()) > 80){ + $('#paginas').val(80) + } + } if(url_parts2[url_parts2.length-2] == 'edit'){ diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php index ad39064a..0111e9fb 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems.php @@ -19,7 +19,7 @@ - + > @@ -110,7 +110,7 @@
- +
@@ -153,7 +153,7 @@
- + solapas_sobrecubierta == true): ?>
@@ -199,7 +199,7 @@
- +
-
- -
-
- - -
-
- -
+
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php index d6e3c614..c6970f76 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php @@ -215,7 +215,7 @@
- +

@@ -246,7 +246,7 @@
-
+
diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js index f093d563..949079d0 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/previews.js @@ -1,5 +1,4 @@ // Global parameters -//var _isCosido = true; var pvObj; function previewInteriorPlana(lpTagName, isCosido, isTapaDura) { @@ -987,6 +986,12 @@ function getObjetoLP(lpName, _isCosido, _isTapaDura) { pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + (2 * sangre) + pvObj.lomoLibro); pvObj.altoForma += (2 * sangre); } + // Grapado + else if (pvObj.tipoImpresion === 21) { + let sangre = parseFloat(5); // mm + pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + (2 * sangre)); + pvObj.altoForma += (2 * sangre); + } // Espiral TD y TB, Wire-o TD y TB else if (pvObj.tipoImpresion === 5 || pvObj.tipoImpresion === 6 || pvObj.tipoImpresion === 7 || pvObj.tipoImpresion === 8) { @@ -1103,6 +1108,4 @@ function getVisibleTabs() { } } }); -} - - +} \ No newline at end of file