|
|
|
|
@ -51,7 +51,7 @@
|
|
|
|
|
<input type="hidden" name="lp_bn_formas_h" id="lp_bn_formas_h" class="form-control" value="0"></input>
|
|
|
|
|
<input type="hidden" name="lp_bn_formas_orientacion" id="lp_bn_formas_orientacion" class="form-control" value="0"></input>
|
|
|
|
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bn.png') ?>" /></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_bn_paginas" name="lp_bn_paginas" class="lp-cell lp-input lp-bn-input" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_bn_paginas" name="lp_bn_paginas" class="lp-cell lp-input lp-bn-input paginas-lp" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td">
|
|
|
|
|
<select id="lp_bn_papel" name="lp_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
|
|
|
|
<?php if (isset($papelGenericoNegroList) && is_array($papelGenericoNegroList) && !empty($papelGenericoNegroList)) :
|
|
|
|
|
@ -104,7 +104,7 @@
|
|
|
|
|
<input type="hidden" name="lp_bnhq_formas_h" id="lp_bnhq_formas_h" class="form-control" value="0"></input>
|
|
|
|
|
<input type="hidden" name="lp_bnhq_formas_orientacion" id="lp_bnhq_formas_orientacion" class="form-control" value="0"></input>
|
|
|
|
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_bnhq.png') ?>" /></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_bnhq_paginas" name="lp_bnhq_paginas" class="lp-cell lp-input lp-bnhq-input" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_bnhq_paginas" name="lp_bnhq_paginas" class="lp-cell lp-input lp-bnhq-input paginas-lp" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td">
|
|
|
|
|
<select id="lp_bnhq_papel" name="lp_bnhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
|
|
|
|
<?php if (isset($papelGenericoNegroHQList) && is_array($papelGenericoNegroHQList) && !empty($papelGenericoNegroHQList)) :
|
|
|
|
|
@ -157,7 +157,7 @@
|
|
|
|
|
<input type="hidden" name="lp_color_formas_h" id="lp_color_formas_h" class="form-control" value="0"></input>
|
|
|
|
|
<input type="hidden" name="lp_color_formas_orientacion" id="lp_color_formas_orientacion" class="form-control" value="0"></input>
|
|
|
|
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_color.png') ?>" /></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_color_paginas" name="lp_color_paginas" class="lp-cell lp-input lp-color-input" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_color_paginas" name="lp_color_paginas" class="lp-cell lp-input lp-color-input paginas-lp" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td">
|
|
|
|
|
<select id="lp_color_papel" name="lp_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
|
|
|
|
<?php if (isset($papelGenericoColorList) && is_array($papelGenericoColorList) && !empty($papelGenericoColorList)) :
|
|
|
|
|
@ -211,7 +211,7 @@
|
|
|
|
|
<input type="hidden" name="lp_colorhq_formas_h" id="lp_colorhq_formas_h" class="form-control" value="0"></input>
|
|
|
|
|
<input type="hidden" name="lp_colorhq_formas_orientacion" id="lp_colorhq_formas_orientacion" class="form-control" value="0"></input>
|
|
|
|
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_colorhq.png') ?>" /></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_colorhq_paginas" name="lp_colorhq_paginas" class="lp-cell lp-input lp-colorhq-input" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_colorhq_paginas" name="lp_colorhq_paginas" class="lp-cell lp-input lp-colorhq-input paginas-lp" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td">
|
|
|
|
|
<select id="lp_colorhq_papel" name="lp_colorhq_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
|
|
|
|
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
|
|
|
|
|
@ -264,7 +264,7 @@
|
|
|
|
|
<input type="hidden" name="lp_rot_bn_formas_h" id="lp_rot_bn_formas_h" class="form-control" value="0"></input>
|
|
|
|
|
<input type="hidden" name="lp_rot_bn_formas_orientacion" id="lp_rot_bn_formas_orientacion" class="form-control" value="0"></input>
|
|
|
|
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_bn.png') ?>" /></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_rot_bn_paginas" name="lp_rot_bn_paginas" class="lp-cell lp-input lp-rotbn-input" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_rot_bn_paginas" name="lp_rot_bn_paginas" class="lp-cell lp-input lp-rotbn-input paginas-lp" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td">
|
|
|
|
|
<select id="lp_rot_bn_papel" name="lp_rot_bn_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
|
|
|
|
<?php if (isset($papelGenericoRotativaNegroList) && is_array($papelGenericoRotativaNegroList) && !empty($papelGenericoRotativaNegroList)) :
|
|
|
|
|
@ -524,7 +524,7 @@
|
|
|
|
|
<input type="hidden" name="lp_rot_color_formas_h" id="lp_rot_color_formas_h" class="form-control" value="0"></input>
|
|
|
|
|
<input type="hidden" name="lp_rot_color_formas_orientacion" id="lp_rot_color_formas_orientacion" class="form-control" value="0"></input>
|
|
|
|
|
<td class="lp-td"> <img style="padding: 0; margin:0;" src="<?= site_url('themes/vuexy/img/safekat/presupuestos/icon_rotativa_color.png') ?>" /></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_rot_color_paginas" name="lp_rot_color_paginas" class="lp-cell lp-input lp-rotcolor-input" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td"><input id="lp_rot_color_paginas" name="lp_rot_color_paginas" class="lp-cell lp-input lp-rotcolor-input paginas-lp" type="text" value="0"></td>
|
|
|
|
|
<td class="lp-td">
|
|
|
|
|
<select id="lp_rot_color_papel" name="lp_rot_color_papel" class="form-control form-select-sm lp-cell lp-select" style="min-width: 150px;">
|
|
|
|
|
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
|
|
|
|
|
@ -933,6 +933,9 @@ $('#lp_cubierta_papel').val('');
|
|
|
|
|
$('#lp_sobrecubierta_papel').val('');
|
|
|
|
|
$('#addLineasPresupuesto').val('');
|
|
|
|
|
|
|
|
|
|
$('.paginas-lp').on('change', function(){
|
|
|
|
|
checkPaginasPresupuesto()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$('#lp_rot_color_vercalculos').on("click", function () {
|
|
|
|
|
if($( ".calculos_rot_color" ).css('display') == 'none')
|
|
|
|
|
@ -1389,6 +1392,7 @@ function fill_lp_bn(row, fromComparator=false){
|
|
|
|
|
$('#lp_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
|
|
|
|
$('#lp_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
|
|
|
|
|
|
|
|
|
calcular_mermas()
|
|
|
|
|
updateTotales()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1626,6 +1630,7 @@ function fill_lp_color(row, fromComparator=false){
|
|
|
|
|
$('#lp_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
|
|
|
|
$('#lp_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
|
|
|
|
|
|
|
|
|
calcular_mermas()
|
|
|
|
|
updateTotales()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1862,6 +1867,7 @@ function fill_lp_bnhq(row, fromComparator=false){
|
|
|
|
|
$('#lp_bnhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
|
|
|
|
$('#lp_bnhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
|
|
|
|
|
|
|
|
|
calcular_mermas()
|
|
|
|
|
updateTotales()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -2100,6 +2106,7 @@ function fill_lp_colorhq(row, fromComparator=false){
|
|
|
|
|
$('#lp_colorhq_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
|
|
|
|
$('#lp_colorhq_formas_orientacion').val(row.num_formas.posicion_formas)
|
|
|
|
|
|
|
|
|
|
calcular_mermas()
|
|
|
|
|
updateTotales()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -2444,6 +2451,7 @@ function fill_lp_rot_bn(row, fromComparador=false){
|
|
|
|
|
$('#lp_rot_bn_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
|
|
|
|
$('#lp_rot_bn_formas_orientacion').val(row.num_formas.posicion_formas)
|
|
|
|
|
|
|
|
|
|
calcular_mermas()
|
|
|
|
|
updateTotales()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -2798,6 +2806,7 @@ function fill_lp_rot_color(row, fromComparador=false){
|
|
|
|
|
$('#lp_rot_color_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
|
|
|
|
$('#lp_rot_color_formas_orientacion').val(row.num_formas.posicion_formas)
|
|
|
|
|
|
|
|
|
|
calcular_mermas()
|
|
|
|
|
updateTotales()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -3078,6 +3087,7 @@ function fill_lp_cubierta(row, fromComparador=false){
|
|
|
|
|
$('#lp_cubierta_formas_v').val(isNaN(parseInt(row.num_formas.num_formas_verticales)) ? "" : parseInt(row.num_formas.num_formas_verticales))
|
|
|
|
|
$('#lp_cubierta_formas_orientacion').val(row.num_formas.posicion_formas)
|
|
|
|
|
|
|
|
|
|
calcular_mermas()
|
|
|
|
|
updateTotales()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -3327,6 +3337,59 @@ async function fill_bbdd_from_lp(presupuesto_id){
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateLineasPresupuesto(){
|
|
|
|
|
|
|
|
|
|
$('#tableLineasPresupuesto tbody tr:visible ').each(function(){
|
|
|
|
|
if(!this.id.includes('_data')){
|
|
|
|
|
if(this.id.endsWith('_bn')){
|
|
|
|
|
calcularPresupuesto_bn()
|
|
|
|
|
}
|
|
|
|
|
else if(this.id.endsWith('_bnhq')){
|
|
|
|
|
calcularPresupuesto_bnhq()
|
|
|
|
|
}
|
|
|
|
|
else if(this.id.endsWith('_color')){
|
|
|
|
|
calcularPresupuesto_color()
|
|
|
|
|
}
|
|
|
|
|
else if(this.id.endsWith('_colorhq')){
|
|
|
|
|
calcularPresupuesto_colorhq()
|
|
|
|
|
}
|
|
|
|
|
else if(this.id.endsWith('_rot_bn')){
|
|
|
|
|
calcularPresupuesto_rot_bn()
|
|
|
|
|
}
|
|
|
|
|
else if(this.id.endsWith('_rot_color')){
|
|
|
|
|
calcularPresupuesto_rot_color()
|
|
|
|
|
}
|
|
|
|
|
else if(this.id.endsWith('_cubierta')){
|
|
|
|
|
calcularPresupuesto_cubierta()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function checkPaginasPresupuesto(){
|
|
|
|
|
|
|
|
|
|
cantidad_total = 0
|
|
|
|
|
|
|
|
|
|
$('#tableLineasPresupuesto tbody tr:visible ').each(function(){
|
|
|
|
|
if(!this.id.includes('_data') && !this.id.endsWith('_cubierta') && !this.id.endsWith('_sobrecubierta')){
|
|
|
|
|
cantidad_total += parseInt($('#' + this.id + '_paginas').val() )
|
|
|
|
|
}
|
|
|
|
|
} );
|
|
|
|
|
htmlString = ''
|
|
|
|
|
|
|
|
|
|
if(cantidad_total != parseInt($('#paginas').val())){
|
|
|
|
|
htmlString = `
|
|
|
|
|
<div class="alert alert-warning d-flex align-items-baseline" role="alert">
|
|
|
|
|
<span class="alert-icon alert-icon-lg text-primary me-2">
|
|
|
|
|
<i class="ti ti-bell ti-sm"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="d-flex flex-column ps-1">
|
|
|
|
|
<h5 class="alert-heading mb-2"><?= lang("Presupuestos.errores.paginasLP") ?></h5>
|
|
|
|
|
</div>
|
|
|
|
|
</div>`;
|
|
|
|
|
}
|
|
|
|
|
$('#divAlarmasLineasPresupuesto').html(htmlString)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|