terminado lineas de presupuesto

This commit is contained in:
Jaime Jiménez Ortega
2023-11-10 13:18:02 +01:00
parent 397d69f823
commit 75eb95b040
10 changed files with 1347 additions and 224 deletions

View File

@ -208,6 +208,7 @@ function getRowFromLineaRot(linea) {
'tiempoMaquina': linea.fields.tiempo_maquina,
'papelGenericoId': linea.fields.papel_generico_id,
'papelImpresionId': linea.fields.papel_impresion_id,
'paginasColor': linea.fields.paginas_color,
}
}

View File

@ -184,7 +184,7 @@
info: false,
ordering: false,
responsive: true,
select: true,
select: false,
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
@ -239,7 +239,7 @@
info: false,
ordering: false,
responsive: true,
select: true,
select: false,
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
@ -281,11 +281,12 @@
{ 'data': 'maquinaVelocidad'},
{ 'data': 'tiempoMaquina'},
{ 'data': 'papelGenericoId'},
{ 'data': 'papelImpresionId'}
{ 'data': 'papelImpresionId'},
{ 'data': 'paginasColor'},
],
columnDefs: [
{
target: [21,22,23,24,25],
target: [21,22,23,24,25,26],
visible: false,
searchable: false
},
@ -299,7 +300,7 @@
info: false,
ordering: false,
responsive: true,
select: true,
select: false,
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
@ -549,38 +550,17 @@
$('#tipoImpresion').on("change", function () {
updatePapelesComparador();
$('#title_int_rot').html('<?= lang("Presupuestos.compInteriorRotativa") ?>');
$('#title_int_plana').html('<?= lang("Presupuestos.compInteriorPlana") ?>');
$('#paginas').change();
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').html("0.00");
if (($('#tipoImpresion').select2('data')[0].id == 'negro' ||
$('#tipoImpresion').select2('data')[0].id == 'color')){
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').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");
$('#tableCompIntPlana').DataTable().clear().draw();
$('#total_comp_plana').html("0.00");
}
}
else if (($('#tipoImpresion').select2('data')[0].id == 'negrohq' ||
$('#tipoImpresion').select2('data')[0].id == 'colorhq')){
$('#tableCompIntRotativa').DataTable().clear().draw();
$('#total_comp_rot').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");
}
}
});
@ -593,7 +573,13 @@
checkDatosPedidoForComp()) {
getLineasIntPlana(is_color, is_hq).then((result) =>{
getLineasIntRot(is_hq);
// Para rotativa, si es color el papel y el gramaje tiene que ser igual
if(!is_color || ($('#compPapelNegro').select2('data')[0].id == $('#compPapelColor').select2('data')[0].id &&
$('#compGramajeNegro').select2('data')[0].text.trim() == $('#compGramajeColor').select2('data')[0].text.trim()))
{
getLineasIntRot(is_hq);
}
});
}
else{