accounting workflows

This commit is contained in:
Thanakorn S
2026-05-20 10:17:02 +07:00
parent 04a683bd02
commit 7396db6ffc
199 changed files with 23539 additions and 5345 deletions
+5 -5
View File
@@ -128,8 +128,8 @@
checkRequired: 0,
action: 'read',
onSuccess: function(res) {
alasql('CREATE TABLE IF NOT EXISTS ac_department');
alasql.tables.ac_department.data = res.output || [];
alasql('CREATE TABLE IF NOT EXISTS md_department');
alasql.tables.md_department.data = res.output || [];
change_page(1);
}
});
@@ -140,10 +140,10 @@
var kw = search_term.toLowerCase();
var filtered = kw
? alasql(`SELECT * FROM ac_department WHERE LOWER(dept_code) LIKE '%${kw}%' OR LOWER(dept_name) LIKE '%${kw}%' ORDER BY dept_code`)
: alasql(`SELECT * FROM ac_department ORDER BY dept_code`);
? alasql(`SELECT * FROM md_department WHERE LOWER(dept_code) LIKE '%${kw}%' OR LOWER(dept_name) LIKE '%${kw}%' ORDER BY dept_code`)
: alasql(`SELECT * FROM md_department ORDER BY dept_code`);
$('table#dept_table tfoot').html(generate_pagination('ac_department', filtered.length));
$('table#dept_table tfoot').html(generate_pagination('dept_table', filtered.length));
if (filtered.length === 0) {
$('table#dept_table tbody').html('<tr><td colspan="5" class="text-center py-5 text-muted">No departments found.</td></tr>');