Add supplier discounts to purchasing data and change some code formatting