update invoice calculation