On the Quote detail page, there are 2 buttons, which cause quote recalculationtwo buttons to recalculate a quote. The difference is in how many lines are calculated.
Recalculate - – Recalculates all line items are recalculated.
Recalculate Changes - recalculate – Recalculates only the those 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.
So for "full" recalculation, all items will be are marked dirty.
For Recalculate Changes, only lines with some changes.
If you want, you can read the value of the item’s item dirty
field in the header logic’s post-phase, and do only processing of the recalculated items.
...
The user clicks on Recalculate or Recalculate Changes.
The system calls the quote header logic in pre-phase.
usually Usually the header logic creates input fields on the header, but it can also change the structure of the document.
The system sets the
dirty
flag for line items, either for all or only for the modified ones.for For each "dirty" item the system will:
call Call the quote item logic.
take Take the logic’s element results, and store it on the line item.
the The system executes the header logic in post-phase.
usually Usually the header logic calculates some summarized results and creates the result fields.
the The user can see the recalculated results on the screen.