Skip to main content

Add Fixed Price Discount Support to Discount Schema

Goal: Functional

Developer: Hengsin (talk)

Feature Ticket: IDEMPIERE-5260

Description:

Enhance discount schema to support the setting of fixed unit price for each discount break point.

Changes:

  • Add Fixed Price field to the Discount Break tab. 5260 FixedPrice Field

Fixed Price Field

  • Break Discount % and Fixed Price field are mutually exclusive - if there is a Break Discount % and Fixed Price is entered, the Break Discount % should be reset to 0.  If there is a Fixed Price value, and a Break Discount % is entered, the Fixed Price should be reset to 0.  Only one value can exist on a line.

  • When a new line is added to an order, the Discount Schema is process, and  the criteria for the Line are met, see if there is a value in Fixed Price, if there is, set Price on the Order Line to the Fixed Price.  If not, use Break Discount % as before.

Example:

  • Setup Fixed Price=1 for Break Value=10 and Produce=Mulch. 5260 FixedPrice Example

Fixed Price Discount Configuration Example

  • Order line with Quantity=1. Quantity is less than break value and doesn't apply the fixed price discount. 5260 Price 1

Order line with Quantity=1

  • Order line with Quantity=20. Quantity is greater than break value and unit price takes the fixed price value from discount schema. 5260 Price 20

Order Line with Quantity=20


Source: Wiki