Fieldpine Logo Documentation Home  
POS Commands Home

The discount() command creates and applies a discount to the current sale or saleline.



26 Oct 2016, P1965 Allows one or more conditions to be checked when the sale is attempted to be applied to the saleline. This permits the discount itself to block on certain salelines.

You can specify multiple if() conditions, and they all must validate


Apply a salewide discount, but only apply to items that do not already have a pricecause of 7 (pricemaps used). Salewide discounts are stored against the sale and applied to each saleline as it is created. This means that the if() will be evaluated for each saleline.

	discount(uniform,-2,1.00, if(%data.workingsaleline.pricecause% ne 7) )

Apply line discount, only in store 413 and not pid 22

	discount(uniform,-1,1.00, if(%setting.current_location% = 413) if( ne 22) )

This command is especially useful for providing opening specials for new stores. Place the definition in fpos.ctl for the store

	force: to(28-oct-2016) SaleDefaultPosCommand=discount(percent,-2,20, if(%data.workingsaleline.pricecause% ne 7) )