Fix bug adding discount to invoice