removed the discount value bug

check error handling if the discount value is not an integer