añadido plantilla id

This commit is contained in:
2023-12-28 13:26:16 +01:00
parent 101b6508de
commit aa245fcfda
3 changed files with 165 additions and 12 deletions

View File

@ -1063,21 +1063,23 @@
$('#tipoImpresion').on("change", function () {
$('#tipoImpresion').on("change.select2", function () {
updatePapelesComparador();
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>');
$('#paginas').change();
if (($('#tipoImpresion').select2('data')[0].id == 'negro' ||
$('#tipoImpresion').select2('data')[0].id == 'color')){
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').html("0.00");
if($('#tipoImpresion').select2('data')[0].id == 'negro'){
$('#compPaginasColor').val('0')
$('#compPaginasNegro').val($('#paginas').val())
}
if( $('#tableCompIntPlana').DataTable().rows().count() > 0 &&
$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
$('#tableCompIntPlana').DataTable().clear().draw();
$('#total_comp_plana').html("0.00");
@ -1087,18 +1089,29 @@
else if (($('#tipoImpresion').select2('data')[0].id == 'negrohq' ||
$('#tipoImpresion').select2('data')[0].id == 'colorhq')){
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').html("0.00");
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').html("0.00");
if($('#tableCompIntPlana').DataTable().rows().count() > 0 &&
!$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
if($('#tipoImpresion').select2('data')[0].id == 'negrohq'){
$('#compPaginasColorhq').val('0')
$('#compPaginasNegrohq').val($('#paginas').val())
$('#compGramajeNegohq').change().trigger()
}
$('#tableCompIntPlana').DataTable().clear().draw();
$('#total_comp_plana').html("0.00");
}
if($('#tableCompIntPlana').DataTable().rows().count() > 0 &&
!$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
$('#tableCompIntPlana').DataTable().clear().draw();
$('#total_comp_plana').html("0.00");
}
}
});
$('#tipoImpresion').on("select2:close", function () {
$('#paginas').change(),trigger();
})
function checkComparadorInt(is_color, is_hq, actualizarLinea=false) {