batch journal entries

This commit is contained in:
Thanakorn S
2026-05-23 15:55:22 +07:00
parent 4bb378a905
commit 5affae1fc5
2 changed files with 249 additions and 122 deletions
+3 -2
View File
@@ -555,7 +555,7 @@ function load_location_config(callback) {
/** =========================
* PREPARE FORM DATA
* ========================= */
function load_formula_options(select_id, document_type, selected_id) {
function load_formula_options(select_id, document_type, selected_id, onLoaded) {
var ctx = document.getElementById('session-context');
ajax_request({
url: server_url + 'accounting/api/engine/account_formula.php',
@@ -570,12 +570,13 @@ function load_formula_options(select_id, document_type, selected_id) {
},
onSuccess: function(res) {
var $sel = $('#' + select_id);
$sel.empty().append('<option value="">— None —</option>');
$sel.empty();
$.each(res.output || [], function(i, f) {
var label = escape_html(f.formula_name) + (f.is_default == 1 ? ' (default)' : '');
$sel.append('<option value="' + f.id + '">' + label + '</option>');
});
if (selected_id) $sel.val(selected_id);
if (onLoaded) onLoaded(res.output || []);
}
});
}