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

EndpointPurposeRight
allocationsloads dimensions, values and existing allocationsanalytic (BASE)
allocationsplitmonthly split (period resolution resolvePeriodYm, monthlyBuckets)analytic
allocationlabelscodes of the dimensionanalytic
allocationsavesave: masterdata/allocation::saveSets()analytic
allocationnewlabelnew label in an EXISTING dimension, optional parent from the same dimension; no new dimension is createdanalyticadd (listed only in the legacy permission table)

Every endpoint checks the invoice scope (invoiceInScope).

Save checks

  1. Sign: the allocation must have the same sign as the line (error_alloc_sign).
  2. The code must belong to the dimension (error_alloc_label).
  3. Duplicates: the same dimension, code and period only once (error_alloc_duplicate).
  4. The allocation may not exceed the amount (error_alloc_over_amount).
  5. 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 code analyticadd.
  • Layer 3: invoiceInScope.