Product documentation
In This Topic
    Recalculation of sales price lists, retail price adjustments and discounts
    In This Topic

    With the cost to sales price calculation feature it is possible to calculate a sales price for an existing trade agreement, price adjustment or retail discount line.

    On the form there is a menu item to execute this calculation for all or the selected lines.

    A lot of customer have the wish to automatically recalculate these prices when one of the variables have change. As there a lot of parameters which influence and scenario's when and what to update varies per customer we have build a trigger framework which can easily be extended.

    As an example how this could be implemented two triggers are provided out of the box which can be enabled in the Price and Margin Management parameters form:

    On the sales price list header, the price adjustment and retail discount form the field Trace needs to be enabled.

    When ever one of the trigger event occurs for a product,  a record per price list, price adjustment or retail discount is inserted in a hidden trigger table.

    Only those products in price list that are stored in the trigger table will be recalculated. When product has been recalculated for a sales price list, price adjustment or retail discount it will be removed from the trigger table.

    There are 3 different menu items in which the trigger table can be used in the query criteria by enabling the trigger checkbox in the dialog of: 

    With this function it's possible to setup a recurring batch job which automatically will recalculate only those products that needs to be recalculated and there is no need to recalculate all products.

    The Cost price recalculation triggers which are not processed yet, can be viewed from the Price and Margin Management > Inquiry menu, the released products form (Manage cost menu item button tab), from the sales price list and retail price adjustment and discounts.

    The trigger table contains the following fields:

    Field Description Remark
    Item number

    The item that will be recalculated

    Source

    From sales price list, price adjustment or discount the trigger originates

    This record will be recalculated

    Trigger for

    Purchase date*

    Purchase date for finding agreements

    Sales price from date*

    From date for new sales price trade agreement

    When batch job Recalculate existing and close sales price list lines is executed and is using triggers, the SalesPriceFromDate will be used as From date in the new sales price trade agreement. When the date is empty on the trigger, the system will use today's date + number of days from the dialog

    Sales price to date*

    To date for new sales price trade agreement

    When batch job Recalculate existing and close sales price list lines is executed and is using triggers, the SalesPriceToDate will be used as To date in the new sales price trade agreement. When the date is empty on the trigger, the date will be left empty.

     Note

    * To prevent breaking changes a temporary Price and management parameter Cost price recalculation v2  has been implemented which needs to be turned on. If this parameter is turned off, the information of the new date fields will not be used in the recalculation.

    For existing implementations:
    Please check whether existing batch jobs have been setup which periodically recalculate sales price list, price adjustments or discounts. If so note down the setup of the queries before enabling V2. After enabling setup remove existing batch jobs and setup new jobs.

    Also we have marked the old code as obsolete, this means within a future version V2 will be the default behavior and the parameter will be removed.
       

    When determining the records to recalculate the following conditions are taken into consideration: