make save invoice work