Fixed a bug in the calculation, also fixed the formatting on the invoice page