env('DATEV_BERATER_NR', ''), 'mandant_nr' => env('DATEV_MANDANT_NR', ''), 'format_version' => 700, 'format_category' => 21, // 21 = Buchungsstapel 'format_name' => 'Buchungsstapel', 'currency' => 'EUR', // Datenquelle (wird im Header geschrieben) 'source' => 'ERP', 'source_name' => env('DATEV_SOURCE_NAME', 'MIVITA'), // Sachkontenlänge (DATEV-Standard: 4) 'sachkontenlaenge' => 4, /* |-------------------------------------------------------------------------- | Sammelkonten (Phase 1) |-------------------------------------------------------------------------- */ 'sammeldebitor' => env('DATEV_SAMMELDEBITOR', '10000'), 'sammelkreditor' => env('DATEV_SAMMELKREDITOR', '70000'), /* |-------------------------------------------------------------------------- | Umsatzerlöse: Steuerfall -> [konto, bu_schluessel] |-------------------------------------------------------------------------- | | Mapping basierend auf Steuersatz und Lieferland-Typ: | - domestic_19: Inland 19% USt | - domestic_7: Inland 7% USt | - eu_exempt: Steuerfreie innergemeinschaftliche Lieferung §4 Nr. 1b UStG | - third_country_exempt: Steuerfreie Drittland-Lieferung §4 Nr. 1a UStG | */ 'revenue_accounts' => [ 'domestic_19' => ['konto' => 8400, 'bu' => 9], 'domestic_7' => ['konto' => 8300, 'bu' => 8], 'eu_exempt' => ['konto' => 8125, 'bu' => 1], 'third_country_exempt' => ['konto' => 8120, 'bu' => 11], ], /* |-------------------------------------------------------------------------- | Provisionen: Typ -> Sachkonto |-------------------------------------------------------------------------- | | Mapping basierend auf UserCreditItem.status: | - 1 (commission_shop) + 5 (commission_growth_bonus) -> 4760 Verkaufsprovision | - 2 (commission_payline) -> 4764 Payline-Provision | */ 'commission_accounts' => [ 'shop' => 4760, // commission_shop (status=1) 'growth_bonus' => 4760, // commission_growth_bonus (status=5) 'payline' => 4764, // commission_payline (status=2) ], // Mapping: UserCreditItem.status -> commission_type key 'credit_item_status_map' => [ 1 => 'shop', // commission_shop 2 => 'payline', // commission_payline 5 => 'growth_bonus', // commission_growth_bonus ], /* |-------------------------------------------------------------------------- | Provisions-Steuerschlüssel |-------------------------------------------------------------------------- | | Basierend auf dem Steuerstatus des Beraters (UserAccount): | - normal: USt-pflichtig (taxable_sales=1) -> BU 9 | - kleinunternehmer: Nicht USt-pflichtig DE (taxable_sales=2) -> BU 50 | - reverse_charge: Reverse Charge Verfahren (reverse_charge=true) -> BU 94 | */ 'commission_tax_keys' => [ 'normal' => 9, // 19% USt 'kleinunternehmer' => 50, // Kleinunternehmer 'reverse_charge' => 94, // Reverse Charge ], /* |-------------------------------------------------------------------------- | Gegenkonto-Mapping nach Zahlungsart |-------------------------------------------------------------------------- | | Bestimmt das Gegenkonto (Debitor) basierend auf der Zahlungsart | (ShoppingPayment.clearingtype + wallettype). | Format: "{clearingtype}_{wallettype}" => Gegenkonto | Fallback: Sammeldebitor | */ 'counteraccount_map' => [ 'wlt_PPE' => 1230, // PayPal // Alle anderen Zahlungsarten -> Sammeldebitor (Fallback) ], /* |-------------------------------------------------------------------------- | Deutschland Country-ID |-------------------------------------------------------------------------- | | Die ID von Deutschland in der countries-Tabelle. | Wird verwendet um Inland vs. Ausland zu unterscheiden. | */ 'germany_country_id' => 1, /* |-------------------------------------------------------------------------- | Storage-Einstellungen |-------------------------------------------------------------------------- */ 'storage_disk' => 'local', 'storage_path' => 'datev', /* |-------------------------------------------------------------------------- | CSV-Format-Einstellungen |-------------------------------------------------------------------------- */ 'delimiter' => ';', 'encoding' => 'UTF-8', // UTF-8 mit BOM für neuere DATEV-Versionen 'line_ending' => "\r\n", // CRLF ];