The discount() command creates and applies a discount to the current sale or saleline.
discount(type,where,param,extra)
if(cond)
You can specify multiple if() conditions, and they all must validate
Example
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(%data.workingsaleline.pid% 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) )