fix missing pieces to get invoice to work