Discount amount not properly calculated

Discount amount not properly calculated

The discount percentage doesn't get recalculated after adding/removing items from the invoice/quote.

Pl. review this.

Thanks.