arreglados bug en el tamanio, al guardar cuando hay tamanio personalizado en en update tarifas enc horas

This commit is contained in:
2024-02-19 17:02:07 +01:00
parent ff323deccd
commit 40acf85725
3 changed files with 31 additions and 15 deletions

View File

@ -73,13 +73,13 @@
<div class="row">
<div class="col-md-12 col-lg-6">
<div class="mb-3">
<input <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
<input <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control formato_libro" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-6">
<div class="mb-3">
<input <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
<input <?= $presupuestoEntity->papel_formato_personalizado == true ? '' : 'style="display: none"'; ?> type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control formato_libro" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div>
@ -359,7 +359,7 @@ $('#papelFormatoPersonalizado').on("click",function(){
document.getElementById("papelFormatoAncho").style.display = "block";
document.getElementById("papelFormatoAlto").style.display = "block";
$('#papelFormatoId').next(".select2-container").hide();
$('#papelFormatoId').val('').change();
$('#papelFormatoId').val(0).change();
document.getElementById("label_papelFormatoId").innerHTML =
"<?=lang('Presupuestos.papelFormatoId') ?> (" +
"<?=lang('Presupuestos.papelFormatoAncho') ?> x <?=lang('Presupuestos.papelFormatoAncho') ?>)*";
@ -404,23 +404,31 @@ $('#papelFormatoPersonalizado').on("click",function(){
});
$('#papelFormatoId').on('select2:select', function (e){
$('#papelFormatoId').on('select2:select', event_change_formato)
$('.formato_libro').on('change', event_change_formato)
function event_change_formato(){
ancho_libro = getDimensionLibro().ancho;
alto_libro = getDimensionLibro().alto;
checkPaginasPresupuesto()
updateLineasPresupuesto()
// Si es negro o color
if ($('#tipoImpresion').select2('data')[0].id == 'negro' ||
$('#tipoImpresion').select2('data')[0].id == 'color') {
$('#compPaginasNegro').trigger('change')
}
// Si es negrohq o colorhq
if ($('#tipoImpresion').select2('data')[0].id == 'negrohq' ||
$('#tipoImpresion').select2('data')[0].id == 'colorhq') {
$('#compPaginasNegrohq').trigger('change');
}
update_servicios(false)
})
}
<?php endif; ?>
$('#papelFormatoAncho').on('change', function (e){
ancho_libro = getDimensionLibro().ancho;
alto_libro = getDimensionLibro().alto;
})
$('#papelFormatoAlto').on('change', function (e){
ancho_libro = getDimensionLibro().ancho;
alto_libro = getDimensionLibro().alto;
})
<?php if($tipo_impresion_id != 1 && $tipo_impresion_id != 3 && $tipo_impresion_id != 5 && $tipo_impresion_id != 7): ?>
$("#solapas").on("click", function () {