This function exports a Datev CSV file for a given timeframe. The fuction 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.
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
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.
sqlDataRead Example
sqlMainData Example
sqlGetCounter Example
This is the main script, which is responsible for collection all the data, which needs to be exported.
Example for a getDatevData script
This is the main script, which is responible for collection all the data, which needs to be exported.
@company - If you work with multiple companies, you have to export each company by it's own.
@dateFrom - Start date for the export
@dateUntil - End date for the export
This is the script, which is responsible for collection all the address data, which needs to be exported.