Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

On the Quote detail page, there are 2 buttons, which cause quote recalculation. The difference is in how many lines are calculated.

  • Recalculate - all line items are recalculated

  • Recalculate Changes - recalculate only the line items, which have some changes against the previously calculated version. (Note, that the button is on the line item’s panel with input parameters.)

A change of the line is, for example:

  • change of item’s input field

  • change of item’s label

  • change of item’s result override

  • change of header input field

A line item has field dirty, which is set by system to true for each line, which should be recalculated.

  • So for "full" recalculation, all items will be marked dirty.

  • For Recalculate Changes, only lines with some changes

If you want, you can read the value of the item’s dirty field in the header logic’s post-phase, and do only processing of the recalculated items.

quote calculation flow.drawio
  1. The user clicks on Recalculate or Recalculate Changes

  2. The system calls the quote header logic in pre-phase

    1. usually the header logic creates input fields on the header, but can also change the structure of the document

  3. The system sets the dirty flag for line items, either for all or only for the modified ones

  4. for each "dirty" item the system will

    1. call the quote item logic

    2. take the logic’s element results, and store it on the line item

  5. the system executes the header logic in post-phase

    1. usually the header logic calculates some summarized results and creates the result fields

  6. the user can see the recalculated results on the screen

  • No labels