Analytic dimensions — system description

Data model of dimensions, codes and allocations, key normalisation and uniqueness, reference-protected deletion, and the gaps in permission checking.

Overview

Analytic dimensions (key, name, amount-based or not, sort order) and per dimension codes (code, name, validity from–to). Invoice line allocations reference the codes. The code list opens from the code list icon of the dimension's row.

Data model

Table names carry the installation's own prefix in the database.

TablePurposeMain fields
analytic_dimensiondimensionkey (unique), name, amount-based flag, sort order, status, created_by
analytic_codecode within a dimensiondimension, code (unique within the dimension), name, validity, status
analytic_allocationinvoice line allocationreferences the code; source of the delete protection

Process and validation

  1. Lists: dimensions by name, key and status, with code count; codes by dimension, code and status.
  2. Saving a dimension: key lower-cased and normalised to the allowed characters, at most 64; name at most 128; key uniqueness; insert or update with the creator.
  3. Saving a code: dimension required, code at most 64, name at most 255, validity from ≤ to, code unique within the dimension.
  4. Status change per row and in bulk.
  5. Delete: a dimension only without codes, a code only without allocations; the other selected rows are deleted, the refused ones come back as an error list.
  6. Every step is logged.

Permissions

  • Layer 2: list (both lists); add + edit for the Add button (for codes also a selected dimension); saving a new dimension asks add if the key is in the catalogue, otherwise edit; saving a code and status changes edit; delete; debug on both lists.
  • Layer 3: none — global master.

Known limitations

  • Opening the page, the code list page and the two forms checks no permission; the checks are on the lists and on saving.
  • The catalogue key statusdelete is not implemented by the controller.