...
On the Compensation Plan detail page, there are 2 buttons, which cause document recalculationtwo buttons to recalculate the document. The difference is in how many lines are calculated.
Recalculate - – Recalculates all line items are recalculated.
Recalculate Changes - recalculate – Recalculates only the line items , which have some changes against changed compared to the previously calculated version. (Note , that the button is on in the line item’s panel with input parameters.)
A change of the a line is, for example:
change Change of item’s input field
change Change of item’s label
change Change of item’s result override
change Change of header input field
A line item has the field dirty
, which is set by the system to true for each line , which should be recalculated.
...
The process involves the following actions:
the The system executes the header logic in pre-phase mode - . Such code can create input fields on the header and modify the structure of the document (e.g. create/delete/update the line items and folder).
for For every item,:
the The system executes the compensation logic (only elements from the group compensation) in normal the standard mode - . This logic will calculate and provide the results.
The system will store those results to the line item.
the The system executes the header logic again, but in the post-phase mode - such . Such code can calculate summarized results of the whole document and store the results to the header (or to line items).