method to get next invoice