If the user wants to add a discount after saving the invoice, the discount code addition can be performed via button [Open items]. Fields "Discount" and "Discount basis" will be hidden and the discountable basis will be equal to the tax incl total.