trabajando en servicios encuadernacion

This commit is contained in:
2023-11-20 21:11:20 +01:00
parent d7fda0e8db
commit 58af5bf90f
12 changed files with 114 additions and 1318 deletions

View File

@ -81,7 +81,7 @@
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="autor" class="form-label">
<?=lang('Presupuestos.autor') ?>*
<?=lang('Presupuestos.autor') ?>
</label>
<input type="text" id="autor" name="autor" maxLength="150" class="form-control" value="<?=old('autor', $presupuestoEntity->autor) ?>">
</div><!--//.mb-3 -->

View File

@ -242,6 +242,7 @@
});
var theTable = $('#tableOfServiciosAcabado').DataTable( {
draw: 1,
serverSide: true,
processing: true,
autoWidth: true,
@ -261,7 +262,7 @@
},
method: 'POST',
headers: {'X-Requested-With': 'XMLHttpRequest'},
async: true,
async: false,
}),
columns: [
{'data': 'tarifa_acabado_id',
@ -375,6 +376,7 @@
var theTable2 = $('#tableOfServiciosEncuadernacion').DataTable( {
draw: 2,
serverSide: true,
processing: true,
autoWidth: true,
@ -391,6 +393,8 @@
url: '<?= route_to('dataTableOfPresupuestoEncuadernaciones') ?>',
data: {
id_presupuesto: id,
tipo_presupuesto: 4,
solapas: $('#solapas').is(':checked'),
},
method: 'POST',
headers: {'X-Requested-With': 'XMLHttpRequest'},
@ -511,6 +515,7 @@
var theTable3 = $('#tableOfServiciosManipulado').DataTable( {
draw: 3,
serverSide: true,
processing: true,
autoWidth: true,
@ -648,6 +653,7 @@
var theTable4 = $('#tableOfServiciosPreimpresion').DataTable( {
draw: 4,
serverSide: true,
processing: true,
autoWidth: true,

View File

@ -5,7 +5,7 @@
data-bs-target="#accordionPreviewTip" aria-expanded="false"
aria-controls="accordionPreviewTip">
<h4><?= lang("Presupuestos.preview") ?></h4>
</button>
</button>
</h2>
<div id="accordionPreviewTip" class="accordion-collapse collapse show"

View File

@ -16,7 +16,6 @@ $('#compPaginasNegro').on("change", function () {
document.getElementById('compPaginasColor').value = newValue >= 0 ? newValue : 0;
$('#compPaginasColor').change();
}
}
});
@ -37,16 +36,23 @@ $('#compPaginasColor').on("change", function () {
});
$('#compPaginasNegrohq').on("change", function () {
if (document.getElementById('paginas').value < document.getElementById('compPaginasNegrohq').value) {
document.getElementById('compPaginasNegrohq').value = document.getElementById('paginas').value;
}
if ($('#tipoImpresion').select2('data')[0].id == 'color') {
if (document.getElementById('compPaginasNegrohq').value + document.getElementById('compPaginasColorhq').value > document.getElementById('paginas').value) {
var newValue = document.getElementById('paginas').value - document.getElementById('compPaginasNegrohq').value;
var negro = parseInt(document.getElementById('compPaginasNegrohq').value);
const paginas = parseInt(document.getElementById('paginas').value);
if (paginas < negro) {
document.getElementById('compPaginasNegrogq').value = paginas;
negro = paginas;
}
var color = parseInt(document.getElementById('compPaginasColorhq').value);
if ($('#tipoImpresion').select2('data')[0].id == 'colorhq') {
var newValue = paginas - negro;
if (newValue != color) {
document.getElementById('compPaginasColorhq').value = newValue >= 0 ? newValue : 0;
$('#compPaginasColorhq').change();
}
}
});
$('#compPaginasColorhq').on("change", function () {

View File

@ -133,6 +133,8 @@ $('#presupuestoForm').on( "submit", function( event ) {
return false; //stop the actual form post !important!
});
<?= $this->endSection() ?>
<?php endif; ?>