Fixed some code. Added models: rulesmodel, previouspricemodel, discountmodel
fixed percent type