automate and view gl entries

This commit is contained in:
Thanakorn S
2026-05-23 16:46:35 +07:00
parent 5affae1fc5
commit 54f3f11fd2
12 changed files with 551 additions and 26 deletions
+8 -1
View File
@@ -364,7 +364,14 @@
invoice_id: invoice_id,
due_date: is_dn ? '' : 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('Document issued, but GL posting failed: ' + (res.gl_message || 'Unknown error'), 'GL Skipped', { timeOut: 8000 });
}
}
});
}
});