Fix discounted amount and check before adding a new line item