diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php index 0fc99f1a..98550eed 100755 --- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php +++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php @@ -792,6 +792,8 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController $tarifamodel = new MaquinasTarifasImpresionModel(); [$tarifaId, $tarifa] = $tarifamodel->getTarifa($maquina->maquina_id, ($uso=='guardas')?'interior':$uso, $tipo); + // Generates a message like: User 123 logged into the system from 127.0.0.1 + if(!is_float($tarifa)){ continue; } diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index 83c7f2c6..b8ef70be 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -390,6 +390,17 @@ class PresupuestoService extends BaseService } $altoForCalculo = $alto; + /* + Log ancho y alto de impresion y libro + $info = [ + 'ancho' => $anchoForCalculo, + 'alto' => $altoForCalculo, + 'maquina_ancho' => $maquina->ancho_impresion, + 'maquina_alto' => $maquina->alto_impresion, + ]; + + if($uso == 'cubierta' ) + log_message('error', 'ancho:{ancho} --- alto:{alto} --- ancho2:{maquina_ancho} --- alto2:{maquina_alto} ---', $info);*/ if($uso == 'cubierta' || $uso == 'sobrecubierta') { if(property_exists($maquina, 'forzar_num_formas_horizontales_cubierta') && @@ -565,12 +576,13 @@ class PresupuestoService extends BaseService $ancho_total = floatval($datosPedido->ancho)*2 + floatval($datosPedido->lomo); // si es cubierta // Se añaden 20mm de sangre por cada lado + 2 * 6mm de vuelo portada y contraportada -> total 52 + // por último se añaden 7mm para tener en cuenta el ancho del carton if($uso=="cubierta") - $ancho_total += (12+2*self::SANGRE_FORMAS_CUBIERTA); + $ancho_total += (12 + 2*self::SANGRE_FORMAS_CUBIERTA + 7); // si es sobrecubierta // Se añaden 5mm de sangre por cada lado + 2 * 6mm de vuelo portada y contraportada -> total 52 else - $ancho_total += (12+2*self::SANGRE_FORMAS); + $ancho_total += (12+2*self::SANGRE_FORMAS) + 7; } else{ // En cualquier otro caso se le suma 5mm de sangre por cada lado 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 beb26eda..fb763f10 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 @@ -200,6 +200,7 @@ function portadaTapaDura(lpTagName, isCosido, isTapaDura) { let sangradoValor = parseFloat(20); // mm let anchoPliegue = parseFloat(6); // mm let altoPliegue = parseFloat(7); // mm + let anchoCarton = parseFloat(7); // mm // Get the preview Object parameters getObjetoLP(lpTagName, isCosido, isTapaDura); @@ -306,12 +307,12 @@ function portadaTapaDura(lpTagName, isCosido, isTapaDura) { previewEC.makeText(sangradoTexto, origenEC.x + (lomoLibro / 2 + anchoLibro + 13), origenEC.y, styleSangrado).rotation = -Math.PI / 2; previewEC.makeText(sangradoTexto, origenEC.x - (lomoLibro / 2 + anchoLibro + 13), origenEC.y, styleSangrado).rotation = -Math.PI / 2; // Cotas - previewEC.makeText(pvObj.lomoLibro + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas); + previewEC.makeText(pvObj.lomoLibro + anchoCarton + " mm", origenEC.x, origenEC.y + (altoLibro / 3) + 15, styleCotas); previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas); previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas); previewEC.makeText(pvObj.altoLibro + altoPliegue + " mm", origenEC.x + (lomoLibro / 2) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2; previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + altoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2; - previewEC.makeText((2 * pvObj.anchoLibro) + pvObj.lomoLibro + (2 * sangradoValor) + +(2 * anchoPliegue) + " mm", + previewEC.makeText((2 * pvObj.anchoLibro) + pvObj.lomoLibro + (2 * sangradoValor) + +(2 * anchoPliegue) + anchoCarton + " mm", origenEC.x, origenEC.y + (altoLibro / 2) + 50, styleCotas);