refactored invoice to handle status a little better