Chart of accounts — data model, two-branch mapping, delete protection
Tables of the central ledger account master, the save checks, the two-branch statement row mapping, bulk mapping, the delete block and the rights.
The ledger/account module is the central (not client-specific) ledger account master. Per account it stores a two-branch (debit / credit) mapping to a balance sheet or income statement row. There is no content scope, as it is central master data.
Data model
Table names carry the installation's own prefix in the database.
| Table | Role |
|---|---|
account | the ledger number itself is the key; Hungarian name: account_name |
gl_account_description | names in other languages |
gl_account_ext | kind (customer, supplier, cash, bank, opening, closing, other, total), classification (BS, PL or empty), currency, mapping of the two branches |
gl_statement_schema | statement rows (read) |
Save (save)
- Ledger number 1–10 digits; for a new account it must not exist (
error_account_id,error_account_exists). - Hungarian name at least 2 characters (
error_name); valid kind and classification (error_kind,error_classification). - For a classified account both branches are required (
error_debit_row,error_credit_row); the row must exist, be mappable, active and in the statement matching the classification (error_row_not_found,error_row_not_selectable,error_row_inactive,error_row_wrong_statement). - New account:
is_new = 1.
Bulk mapping (bulkmap): sets both branches of the selected classified accounts in one step and skips unclassified ones (error_no_selection, error_bulk_rows). Status: enable, disable (setStatus).
Deletion
Physical delete from the three tables if no posting leg refers to it (net, VAT or gross leg of entry_item) and no coding parameter refers to it (contir_config.config_value); otherwise an error with the count.
Mapping health
The list header shows the result of getMappingHealth (missing, half mapped, dead reference); getMissingTables warns about missing tables.
Permissions
list(UNMAPPED,gl_account_v1.sql).addis not in the seeds, socanSave(0)asks foredit; the + button shows on theeditright.edit+ coremodifyfor save, status and bulk mapping (the form checks onlyedit);delete+ coremodify;debug;statusdeleteseed only (BASE).