<commit_before>/**
 * SCIPIO: SETUP interactive catalog tree data prep.
 */

import org.ofbiz.base.util.*;
import org.ofbiz.entity.condition.*;
import org.ofbiz.entity.util.*;

import com.ilscipio.scipio.treeMenu.jsTree.JsTreeHelper
 
final module = "EditGlTree.groovy";

glAccountUrls = [
    "addGlAccountUrl" : "setupAddGlAccount",
    "createGlAccountUrl" : "setupCreateGlAccount",
    "editGlAccountUrl" : "setupEditGlAccount",
    "updateGlAccountUrl" : "setupUpdateGlAccount",
    "deleteGlAccountUrl" : "setupDeleteGlAccount",
    "assignGlAccountUrl" : "setupAssignGlAccount",
    "importGlAccountUrl" : "setupImportGlAccounts",
];
context.glAccountUrls = glAccountUrls;

context.organizationPartyId = context.orgPartyId;
context.accountMaps = context.glAccountList;

treeMenuHelper = new JsTreeHelper();
treeMenuData = [];
result = dispatcher.runSync("buildGlAccountTree", ["glAccountId": context.topGlAccountId]);

if (result?.treeList) {
    treeMenuData = treeMenuData + result.treeList;
}
treeMenuHelper.addAll(treeMenuData)

for (data in treeMenuData) {
    Debug.log("data ==============> " + data);
}

context.treeMenuData = treeMenuHelper;


context.treeOptionsFixedParams=["orgPartyId": context.orgPartyId, "topGlAccountId" : context.topGlAccountId];<commit_msg>NoRef (Setup): Accounting step: * Tidied up GLTree script<commit_after>/**
 * SCIPIO: SETUP interactive catalog tree data prep.
 */

import org.ofbiz.base.util.*;
import org.ofbiz.entity.condition.*;
import org.ofbiz.entity.util.*;

import com.ilscipio.scipio.treeMenu.jsTree.JsTreeHelper
 
final module = "EditGlTree.groovy";

glAccountUrls = [
    "addGlAccountUrl" : "setupAddGlAccount",
    "createGlAccountUrl" : "setupCreateGlAccount",
    "editGlAccountUrl" : "setupEditGlAccount",
    "updateGlAccountUrl" : "setupUpdateGlAccount",
    "deleteGlAccountUrl" : "setupDeleteGlAccount",
    "assignGlAccountUrl" : "setupAssignGlAccount",
    "importGlAccountUrl" : "setupImportGlAccounts"
];
context.glAccountUrls = glAccountUrls;
context.organizationPartyId = context.orgPartyId;

treeMenuHelper = new JsTreeHelper();
treeMenuData = [];
result = dispatcher.runSync("buildGlAccountTree", ["glAccountId": context.topGlAccountId]);
if (result?.treeList) {
    treeMenuData = treeMenuData + result.treeList;
}
treeMenuHelper.addAll(treeMenuData);
context.treeMenuData = treeMenuHelper;

context.treeOptionsFixedParams=["orgPartyId": context.orgPartyId, "topGlAccountId" : context.topGlAccountId];
{'fraction_non_alphanumeric': 0.13034705407586764, 'fraction_numerical': 0.0, 'mean_word_length': 6.144092219020173, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7662692', 'n_tokens_mistral': 809, 'n_tokens_neox': 787, 'n_words': 130}