stock module latest today vadivel J 28-01-2025

This commit is contained in:
vadivelJ96 2025-01-28 08:55:00 +05:30
parent dc8f6a05e9
commit 3bdb21ae53

View File

@ -1695,7 +1695,21 @@ $(document).ready(function() {
function exportTableToExcel(tableID, filename = '') {
let table = document.getElementById(tableID);
let rows = table.rows;
let cloneTable = table.cloneNode(true); // Clone the table to modify
// Remove hidden rows
$(cloneTable).find('tr').filter(function () {
return $(this).css('display') === 'none';
}).remove();
// Remove hidden columns
$(cloneTable).find('th, td').each(function () {
if ($(this).css('display') === 'none') {
$(this).remove();
}
});
let rows = cloneTable.rows;
let data = [];
for (let i = 0; i < rows.length; i++) {