Datev Export
This function exports a Datev CSV file for a given timeframe. The function needs 3 customized SQL scripts to process the data.
As this function calls customized SQL scripts, it will add SQL parameters from the function call to the SQL calls.
@company
@dateFrom
@dateUntil
Those parameters can be used within the SQL statements.
Needed output columns from SQL scripts
sqlDataRead script
Auftragsnummer
Artikelnummer
ArtikelRecordId
Paragraph13b
NettoWert
BruttoWert
Debitorenkonto
Kreditorenkonto
Sachkonto
SteuerID
Buchungsschluessel
Buchungstext
Rechnungsdatum
Rechnungsnummer
Leistungsdatum
AttachementId
BuchungszaehlerTabelle (nvarchar that defines the tabel, where the booking counter is stored)
BuchungszaehlerSpalte (nvarchar that devines the column for the booking counter)
IstAutomatikKonto
IstInnerbetrieblich
BeleginfoInhalt1 (optional)
sqlMainData script
Kundennummer
Konto
Firmenname
Nachname
Vorname
Anrede
Adresstyp
Strasse
Hausnummer
PLZ
Stadt
Zusatzinformation
sqlGetCounter script
This script needs to return the actual booking counter as number.
SQL script examples
sqlDataRead Example
sqlMainData Example
sqlGetCounter Example
Parameters
exportFromDate: Beginning of the period for export.
exportUntilDate: End of the period for export.
consultantNumber: Number of your tax consultant.
clientNumber: Your own number as a client.
company: Id of your company used in Gebra Suite.
Optional:
accountLength: Length of accounts, by default it is set to 4.
startOfBusinessYear: Start of your business year. Format: YYYYMMDD, Example: "20240101".
culture: Settings for the language settings and formatting of numbers. Examples: "de-DE" or "en-EN".
exportFileName: Name of the generated zip file, automatically generated by default.
noPdfExport: If no PDF attachments should be added to the zip file, then this parameter can be passed with "true".
noPdfFolder: If you want to upload the zip file directly to DATEV, it must not contain any subfolders. With this parameter the PDFs are saved without folders. In this case the parameter should be passed with "true".
testMode: Activates the test mode for the export. A maximum of 50 PDF attachments are included and no Datev export numbers are written back to the invoices.
Example Usages
Data from SQL function:
Data from grid:
Last updated
Was this helpful?