Installation
Requirements
- Craft CMS 5.3 or later
- Craft Commerce 5.0 or later
- PHP 8.2 or later
Install
composer require justinholtweb/craft-datevz
php craft plugin/install datevz
Before the first export
Open Settings → Plugins → Datevz. Five things have to be right; everything else has a working default.
1. The practice numbers
The Beraternummer and Mandantennummer come from your Steuerberater — they identify the practice and this client inside DATEV. Without them DATEV will not read the file at all, and Datevz refuses to write one.
Both fields accept an environment variable, so the numbers can live in .env rather than in
project config:
DATEV_BERATER=1234567
DATEV_MANDANT=54321
2. Sachkontenlänge
How many digits the general ledger accounts have — usually 4. Get this wrong and the import is refused with a message about the account master, because debtor accounts are always one digit longer than the Sachkonten. With 4-digit accounts, debtor numbers are 5-digit.
3. Chart of accounts
Choose SKR03 or SKR04 and press the matching Fill from… button. It writes the account numbers below only where you have left them empty — it will never overwrite a number your practice has given you.
The presets are a starting point, not advice. Two shops on the same SKR can legitimately book to different accounts, and only your Steuerberater knows which yours should use.
4. The debtor account
In collective mode every receivable books to one account — 1400 on SKR03, 1200 on SKR04. That is right for a shop with thousands of one-off buyers.
Switch to a personal account per customer if your practice chases individual receivables. Datevz then allocates a number from the range you set, keyed to the customer and falling back to their email address, so someone who ordered as a guest and later registered keeps one number.
5. Fiscal year
If the client's Wirtschaftsjahr is not the calendar year, set the month and day it starts on. The
Belegdatum column carries only a day and a month — the year comes from the header — so this is
what decides which year the postings land in.
The first export
Datevz → Export, pick last month, and press Preview before you press anything else. You will see every posting the batch would contain, and every problem it found, without a file existing.
When the preview is clean, Create the batch and hand the download to your Steuerberater. Ask them to run one test import before you rely on the monthly rhythm — a chart of accounts is client-specific, and one round trip settles it.