switch from Text to Flags for invoices fixes #111