`WM`). Hier und nicht als DB-Default, weil er sich aus einer anderen Spalte ableitet. */ protected static function booted(): void { static::creating(static function (self $tenant): void { $tenant->invoice_prefix ??= strtoupper((string) $tenant->slug); }); } public static function getTempDirectory() : string { return currentTenant()->slug . '/temp-data/'; } /** * Bezeichnung des Rechnungsstellers. * * `name` ist ein internes Kürzel ("Wilde Möhre"); auf einer Rechnung steht die vollständige * Bezeichnung mit Rechtsform. Ohne eigene Angabe bleibt es beim Namen des Mandanten. */ public function invoiceSenderName() : string { return Text::nullIfBlank($this->invoice_sender_name) ?? (string) $this->name; } public const PRIMARY_TENANT_NAME = 'LV'; protected $fillable = [ 'slug', 'name', 'invoice_sender_name', 'address_1', 'address_2', 'address_3', 'email', 'email_finance', 'phone', 'url', 'account_name', 'account_iban', 'account_bic', 'city', 'postcode', 'download_exports', 'upload_exports', 'gdpr_text', 'impress_text', 'url_participation_rules', 'is_active_local_group', 'has_active_instance', 'tax_liable', 'vat_rate', 'tax_exemption_reason', 'tax_exemption_note', 'vat_pricing_mode', 'tax_number', 'vat_id', 'invoice_prefix', ]; protected $casts = [ 'tax_liable' => 'boolean', 'vat_rate' => 'integer', ]; }