Analytic breakdown — endpoints and validation
The endpoints of the breakdown window, the monthly split, the save checks and the creation of a new analytic code.
The analytic breakdown splits the amounts of invoice lines into codes taken from label groups (dimensions). The allocation is stored through the masterdata/allocation model.
Endpoints
| Endpoint | Purpose | Right |
|---|---|---|
allocations | loads dimensions, values and existing allocations | analytic (BASE) |
allocationsplit | monthly split (period resolution resolvePeriodYm, monthlyBuckets) | analytic |
allocationlabels | codes of the dimension | analytic |
allocationsave | save: masterdata/allocation::saveSets() | analytic |
allocationnewlabel | new label in an EXISTING dimension, optional parent from the same dimension; no new dimension is created | analyticadd (listed only in the legacy permission table) |
Every endpoint checks the invoice scope (invoiceInScope).
Save checks
- Sign: the allocation must have the same sign as the line (
error_alloc_sign). - The code must belong to the dimension (
error_alloc_label). - Duplicates: the same dimension, code and period only once (
error_alloc_duplicate). - The allocation may not exceed the amount (
error_alloc_over_amount). - For a monthly split the period must span at least two months (
error_alloc_split).
For a new code: error_newlabel_input, error_newlabel_name (32 characters at most), error_newlabel_group, error_newlabel_parent, error_newlabel_failed.
Data model
Table names carry the installation's own prefix in the database: allocation (through masterdata/allocation), label master (masterdata/label).
Permissions
- Layer 2:
analytic(BASE), for a new codeanalyticadd. - Layer 3:
invoiceInScope.