batch journal entries
This commit is contained in:
@@ -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 || []);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user