Merge branch 'bug/error_tipo_imp_color' into 'main'

Arreglado el bug

See merge request jjimenez/safekat!133
This commit is contained in:
2024-01-18 07:44:44 +00:00
2 changed files with 25 additions and 16 deletions

View File

@ -1082,6 +1082,10 @@
$('#compPaginasNegrohq').val('0'); $('#compPaginasNegrohq').val('0');
$('#compPaginasNegro').val($('#paginas').val()) $('#compPaginasNegro').val($('#paginas').val())
if($('#tipoImpresion').select2('data')[0].id == 'negro'){
$('#compGramajeColor').val('').trigger('change')
$('#compPapelColor').val(0).trigger('change')
}
if( $('#tableCompIntPlana').DataTable().rows().count() > 0 && if( $('#tableCompIntPlana').DataTable().rows().count() > 0 &&
$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) { $('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
@ -1101,6 +1105,11 @@
$('#compPaginasColor').val('0') $('#compPaginasColor').val('0')
$('#compPaginasNegro').val('0') $('#compPaginasNegro').val('0')
$('#compPaginasNegrohq').val($('#paginas').val()) $('#compPaginasNegrohq').val($('#paginas').val())
if($('#tipoImpresion').select2('data')[0].id == 'negrohq'){
$('#compGramajeColorhq').val('').trigger('change')
$('#compPapelColorhq').val(0).trigger('change')
}
if($('#tableCompIntPlana').DataTable().rows().count() > 0 && if($('#tableCompIntPlana').DataTable().rows().count() > 0 &&
!$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) { !$('#tableCompIntPlana').DataTable().cell(0, 0).data().includes('hq')) {
@ -1117,7 +1126,7 @@
}) })
function checkComparadorInt(is_color, is_hq, actualizarLinea=false) { function checkComparadorInt(is_color, is_hq, actualizarLineaPlana=false, actualizarLineaRot=false) {
try{ try{
@ -1134,11 +1143,11 @@
checkDatosPedidoForComp()) { checkDatosPedidoForComp()) {
getLineasIntPlana(is_color, is_hq, actualizarLinea).then((result) =>{ getLineasIntPlana(is_color, is_hq, actualizarLineaPlana).then((result) =>{
// Para rotativa, si es color el papel y el gramaje tiene que ser igual // Para rotativa, si es color el papel y el gramaje tiene que ser igual
if(!is_color) if(!is_color)
{ {
getLineasIntRot(is_hq, actualizarLinea); getLineasIntRot(is_hq, actualizarLineaRot);
} }
else else
{ {
@ -1149,7 +1158,7 @@
if(($('#compPapelNegro').select2('data')[0].id == $('#compPapelColor').select2('data')[0].id && if(($('#compPapelNegro').select2('data')[0].id == $('#compPapelColor').select2('data')[0].id &&
$('#compGramajeNegro').select2('data')[0].text.trim() == $('#compGramajeColor').select2('data')[0].text.trim())) $('#compGramajeNegro').select2('data')[0].text.trim() == $('#compGramajeColor').select2('data')[0].text.trim()))
{ {
getLineasIntRot(is_hq, actualizarLinea); getLineasIntRot(is_hq, actualizarLineaRot);
} }
else else
{ {

View File

@ -3361,23 +3361,23 @@ function updateLineasPresupuesto(){
$('#tableLineasPresupuesto tbody tr:visible ').each(function(){ $('#tableLineasPresupuesto tbody tr:visible ').each(function(){
if(this.id.endsWith('_bn')){ if(this.id.endsWith('lp_bn')){
checkComparadorInt(false, false, true); checkComparadorInt(false, false, true, false);
} }
else if(this.id.endsWith('_bnhq')){ else if(this.id.endsWith('lp_bnhq')){
checkComparadorInt(false, true, true); checkComparadorInt(false, true, true, false);
} }
else if(this.id.endsWith('_color')){ else if(this.id.endsWith('lp_color')){
checkComparadorInt(true, false, true); checkComparadorInt(true, false, true, false);
} }
else if(this.id.endsWith('_colorhq')){ else if(this.id.endsWith('lp_colorhq')){
checkComparadorInt(true, true, true); checkComparadorInt(true, true, true, false);
} }
else if(this.id.endsWith('_rot_bn')){ else if(this.id.endsWith('lp_rot_bn')){
checkComparadorInt(false, false, true) checkComparadorInt(false, false, false, true)
} }
else if(this.id.endsWith('_rot_color')){ else if(this.id.endsWith('lp_rot_color')){
checkComparadorInt(false,true, true); checkComparadorInt(false,true, false, true);
} }
else if(this.id.endsWith('_cubierta')){ else if(this.id.endsWith('_cubierta')){
checkComparadorCubierta(true) checkComparadorCubierta(true)