'Kleinunternehmer (§ 19 UStG)', self::Education => 'Bildungs-/Kursleistung (§ 4 Nr. 22a UStG)', self::YouthWelfare => 'Kinder- und Jugendhilfe (§ 4 Nr. 25 UStG)', self::Custom => 'Sonstiger Grund (Freitext)', }; } /** * Pflichthinweis für die Rechnung. Bei einem individuellen Grund (Custom) wird der hinterlegte * Freitext des Tenants verwendet. */ public function invoiceText(?string $customNote = null): string { return match ($this) { self::SmallBusiness => 'Gemäß § 19 UStG wird keine Umsatzsteuer berechnet.', self::Education => 'Die Leistung ist gemäß § 4 Nr. 22 Buchst. a UStG von der Umsatzsteuer befreit.', self::YouthWelfare => 'Die Leistung ist gemäß § 4 Nr. 25 UStG von der Umsatzsteuer befreit.', self::Custom => trim((string)$customNote), }; } /** * Ob dieser Grund einen zusätzlichen Freitext des Tenants erfordert. */ public function requiresNote(): bool { return $this === self::Custom; } /** * Optionen für das Frontend inkl. Vorschau-Text. Bei Custom ist `text` leer, da der Text erst aus * dem Freitext des Tenants entsteht. * * @return array */ public static function options(): array { return array_map( static fn(self $reason): array => [ 'value' => $reason->value, 'label' => $reason->label(), 'text' => $reason->requiresNote() ? '' : $reason->invoiceText(), ], self::cases(), ); } }