Fixed the  discount value bug

@chrisndodge I have added the functionality of [Ex-40]. Kindly review the changes.

Thanks
This can throw an exception if the field is not an integer: e.g. a user puts '25%'. Can you do a check to make sure its an integer by doing a try/except and return a error message to the user