Why is the final invoice total not calculating accurately?