automate and view gl entries

This commit is contained in:
Thanakorn S
2026-05-23 16:46:35 +07:00
parent 363da054e0
commit eddb10aa22
12 changed files with 551 additions and 26 deletions
+8 -1
View File
@@ -337,7 +337,14 @@
id: invoice_id,
due_date: due_date ? due_date.split('/').reverse().join('-') : ''
},
onSuccess: function() { retrieve_invoice(); }
onSuccess: function(res) {
retrieve_invoice();
if (res.gl_posted === true) {
toastr.success('GL entry posted automatically.', 'GL Posted');
} else if (res.gl_posted === false) {
toastr.warning('Invoice issued, but GL posting failed: ' + (res.gl_message || 'Unknown error'), 'GL Skipped', { timeOut: 8000 });
}
}
});
}
});