Arreglados bugs de warning numero de paginas

This commit is contained in:
imnavajas
2024-01-08 09:17:54 +01:00
parent a05c717c9f
commit f85dfc1cfc
2 changed files with 24 additions and 21 deletions

View File

@ -364,7 +364,7 @@ const actionBtns_lp = function(data) {
`; `;
}; };
window.tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{ var tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{
scrollX: true, scrollX: true,
searching: false, searching: false,
paging: false, paging: false,
@ -3285,6 +3285,7 @@ async function fill_bbdd_from_lp(presupuesto_id){
data.push(linea_data) data.push(linea_data)
} ); } );
if(data.lengh > 0){
await $.ajax({ await $.ajax({
type: 'post', type: 'post',
@ -3307,6 +3308,7 @@ async function fill_bbdd_from_lp(presupuesto_id){
console.log(jqXHR) console.log(jqXHR)
}); });
} }
}
function updateLineasPresupuesto(){ function updateLineasPresupuesto(){
@ -3344,6 +3346,7 @@ function checkPaginasPresupuesto(){
tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) { tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
var rowData = this.data(); var rowData = this.data();
if((rowData.row_id != 'lp_cubierta') && (rowData.row_id != 'lp_sobrecubierta'))
cantidad_total += rowData.paginas cantidad_total += rowData.paginas
}) })

View File

@ -463,7 +463,7 @@ function getObjetoLP(lpName) {
function getVisibleTabs() { function getVisibleTabs() {
window.tableLineasPresupuesto.rows().every( function ( rowIdx, tableLoop, rowLoop ) { $('#tableLineasPresupuesto').DataTable().rows().every( function ( rowIdx, tableLoop, rowLoop ) {
var rowData = this.data(); var rowData = this.data();
console.log(rowData.row_id); console.log(rowData.row_id);
$("#tab-pv-bn").show(); $("#tab-pv-bn").show();