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 14 Next »

On the Quote detail page, there are two buttons to recalculate a quote. The difference is in how many lines are calculated.

  • Recalculate – Recalculates all line items.

  • Recalculate Changes – Recalculates only those line items which have changed compared to the previously calculated version. (Note that the button is in the line item’s panel with input parameters.)

A change of a 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 the field dirty which is set by the system to true for each line which should be recalculated.

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

  • For Recalculate Changes, only lines with some changes.

If you want, you can read the value of the item 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 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 it 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 quote 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