Discounts have to be added first on the discounts page, before i9t can be applied on an invoice.