adding generate method for invoice