diff --git a/app/Views/invoice_list.php b/app/Views/invoice_list.php index 0be12d49..371da015 100755 --- a/app/Views/invoice_list.php +++ b/app/Views/invoice_list.php @@ -146,7 +146,7 @@ - + × @@ -269,4 +269,16 @@ }; }); }); + function reloadBodyContent() { + console.log("Inside Reload Function"); + fetch(window.location.href) // Fetch the current page's content + .then(response => response.text()) + .then(html => { + const parser = new DOMParser(); + const doc = parser.parseFromString(html, 'text/html'); + document.body.innerHTML = doc.body.innerHTML; // Replace the body content + // Reinitialize any required scripts if needed + }) + .catch(error => console.error('Error reloading body:', error)); +} \ No newline at end of file diff --git a/app/Views/offline_invoice_list.php b/app/Views/offline_invoice_list.php index 154b65dc..cbb011da 100755 --- a/app/Views/offline_invoice_list.php +++ b/app/Views/offline_invoice_list.php @@ -154,8 +154,7 @@ - + × @@ -286,6 +285,18 @@ }); }); + function reloadBodyContent() { + console.log("Inside Reload Function"); + fetch(window.location.href) // Fetch the current page's content + .then(response => response.text()) + .then(html => { + const parser = new DOMParser(); + const doc = parser.parseFromString(html, 'text/html'); + document.body.innerHTML = doc.body.innerHTML; // Replace the body content + // Reinitialize any required scripts if needed + }) + .catch(error => console.error('Error reloading body:', error)); +}