Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This calculation is mostly triggered by the Rebate Calculation process.

Rebate Record logic — specific actions

Large part of calculation of the RR’s results is the same as for the Line Item. Those logic elements will be shared between the Line Item and rebate record.

In this sections we will describe only things specific for the rebate records.

rebate record logic specifics:

  • code is in logic elements with calculation context "RebateRecord"

  • such code will get access to additional information via:

    • Binding Variables:

      • calculationBase - holds a filter which finds the sales transactions related to this rebate record.

        • This filter will be used later by the Allocation process, but can be also used by the logic which calculates results for the RR.

        • the filter is of type DMDataSlice/DatamartContext.DataSlice

        • the filter is pre-populated by the system automatically when you create the RR, but you can change it

    • Methods

      • api.currentItem() - returns data (as map) of the currently calculated rebate record

Rebate Record logic results mapping

The results calculated by the logic in the context of RebateRecords, are stored in a field "calculationResults", which is a Map with key-value pairs.

...