joonis Logo

Dokumentation fintech.datev

DATEV module of the Python FinTech package.

This module defines functions and classes to create DATEV data exchange files.

Index
class fintech.datev.DatevCSV(adviser_id, client_id, account_length=4, currency='EUR', initials=None)

DatevCSV format class

Initializes the DatevCSV instance.

Parameters:
  • adviser_id – DATEV number of the accountant (Beraternummer). A numeric value up to 7 digits.
  • client_id – DATEV number of the client (Mandantennummer). A numeric value up to 5 digits.
  • account_length – Length of G/L account numbers (Sachkonten). Therefore subledger account numbers (Personenkonten) are one digit longer. It must be a value between 4 (default) and 8.
  • currency – Currency code (Währungskennzeichen)
  • initials – Initials of the creator (Namenskürzel)
account_length

Length of G/L account numbers (read-only)

add_accounting(debitaccount, creditaccount, amount, date, reference=None, postingtext=None, vat_id=None, tag=None, other=None)

Adds a new accounting record.

Each record is added to a DATEV data file, grouped by a combination of tag name and the year of booking date.

There are a huge number of possible fields to set. Only the most important fields can be set directly by the available parameters. Additional fields must be set by using the parameter other.

Fields that can be set directly (targeted DATEV field names in square brackets):

Parameters:
  • debitaccount – The debit account [Konto]
  • creditaccount – The credit account [Gegenkonto (ohne BU-Schlüssel)]
  • amount – The posting amount [Umsatz (ohne Soll/Haben-Kz)]+[Soll/Haben-Kennzeichen]
  • date – The booking date. Must be a date object or an ISO8601 formatted string [Belegdatum]
  • reference – Usually the invoice number [Belegfeld 1]
  • postingtext – The posting text [Buchungstext]
  • vat_id – The VAT-ID [EU-Land u. USt-IdNr.]
  • tag – Short description of the dataset. Also used in the final file name. Defaults to “Bewegungsdaten”.
  • other – An optional dictionary with extra fields. Note that the method arguments take precedence over the field values in this dictionary. For possible field names and type declarations see DATEV documentation.
add_entity(account, name, street=None, postcode=None, city=None, country=None, vat_id=None, customer_id=None, tag=None, other=None)

Adds a new debtor or creditor entity.

There are a huge number of possible fields to set. Only the most important fields can be set directly by the available parameters. Additional fields must be set by using the parameter other.

Fields that can be set directly (targeted DATEV field names in square brackets):

Parameters:
  • account – Account number [Konto]
  • name – Name [Name (Adressatentyp keine Angabe)]
  • street – Street [Straße]
  • postcode – Postal code [Postleitzahl]
  • city – City [Ort]
  • country – Country code, ISO-3166 [Land]
  • vat_id – VAT-ID [EU-Land]+[EU-USt-IdNr.]
  • customer_id – Customer ID [Kundennummer]
  • tag – Short description of the dataset. Also used in the final file name. Defaults to “Stammdaten”.
  • other

    An optional dictionary with extra fields. Note that the method arguments take precedence over the field values in this dictionary. For possible field names and type declarations see DATEV documentation.

adviser_id

DATEV adviser number (read-only)

as_dict()

Generates the DATEV files and returns them as a dictionary.

The keys represent the file names and the values the corresponding file data as bytes.

client_id

DATEV client number (read-only)

currency

Base currency (read-only)

initials

Initials of the creator (read-only)

save(path)

Generates and saves all DATEV files.

Parameters:path – If path ends with the extension .zip, all files are stored in this archive. Otherwise the files are saved in a folder.
class fintech.datev.DatevKNE(adviserid, advisername, clientid, dfv='', kne=4, mediumid=1, password='')

The DatevKNE class (Postversanddateien)

This format is depreciated and not longer accepted by DATEV.

Initializes the DatevKNE instance.

Parameters:
  • adviserid – DATEV number of the accountant (Beraternummer). A numeric value up to 7 digits.
  • advisername – DATEV name of the accountant (Beratername). An alpha-numeric value up to 9 characters.
  • clientid – DATEV number of the client (Mandantennummer). A numeric value up to 5 digits.
  • dfv – The DFV label (DFV-Kennzeichen). Usually the initials of the client name (2 characters).
  • kne – Length of G/L account numbers (Sachkonten). Therefore subledger account numbers (Personenkonten) are one digit longer. It must be a value between 4 (default) and 8.
  • mediumid – The medium id up to 3 digits.
  • password – The password registered at DATEV, usually unused.
add(inputinfo='', accountingno=None, **data)

Adds a new accounting entry.

Each entry is added to a DATEV data file, grouped by a combination of inputinfo, accountingno, year of booking date and entry type.

Parameters:
  • inputinfo – Some information string about the passed entry. For each different value of inputinfo a new file is generated. It can be an alpha-numeric value up to 16 characters (optional).
  • accountingno – The accounting number (Abrechnungsnummer) this entry is assigned to. For accounting records it can be an integer between 1 and 69 (default is 1), for debtor and creditor core data it is set to 189.

Fields for accounting entries:

Parameters:
  • debitaccount – The debit account (Sollkonto) mandatory
  • creditaccount – The credit account (Gegen-/Habenkonto) mandatory
  • amount – The posting amount mandatory
  • date – The booking date. Must be a date object or an ISO8601 formatted string. mandatory
  • voucherfield1 – Usually the invoice number (Belegfeld1) [12]
  • voucherfield2 – The due date in form of DDMMYY or the payment term id, mostly unused (Belegfeld2) [12]
  • postingtext – The posting text. Usually the debtor/creditor name (Buchungstext) [30]
  • accountingkey

    DATEV accounting key consisting of adjustment key and tax key.

    Adjustment keys (Berichtigungsschlüssel):

    • 1: Steuerschlüssel bei Buchungen mit EU-Tatbestand
    • 2: Generalumkehr
    • 3: Generalumkehr bei aufzuteilender Vorsteuer
    • 4: Aufhebung der Automatik
    • 5: Individueller Umsatzsteuerschlüssel
    • 6: Generalumkehr bei Buchungen mit EU-Tatbestand
    • 7: Generalumkehr bei individuellem Umsatzsteuerschlüssel
    • 8: Generalumkehr bei Aufhebung der Automatik
    • 9: Aufzuteilende Vorsteuer

    Tax keys (Steuerschlüssel):

    • 1: Umsatzsteuerfrei (mit Vorsteuerabzug)
    • 2: Umsatzsteuer 7%
    • 3: Umsatzsteuer 19%
    • 4: n/a
    • 5: Umsatzsteuer 16%
    • 6: n/a
    • 7: Vorsteuer 16%
    • 8: Vorsteuer 7%
    • 9: Vorsteuer 19%
  • discount – Discount for early payment (Skonto)
  • costcenter1 – Cost center 1 (Kostenstelle 1) [8]
  • costcenter2 – Cost center 2 (Kostenstelle 2) [8]
  • vatid – The VAT-ID (USt-ID) [15]
  • eutaxrate – The EU tax rate (EU-Steuersatz)
  • currency – Currency, default is EUR (Währung) [4]
  • exchangerate – Currency exchange rate (Währungskurs)

Fields for debtor and creditor core data:

Parameters:
  • account – Account number mandatory
  • name1 – Name1 [20] mandatory
  • name2 – Name2 [20]
  • customerid – The customer id [15]
  • title

    Title [1]

    • 1: Herrn/Frau/Frl./Firma
    • 2: Herrn
    • 3: Frau
    • 4: Frl.
    • 5: Firma
    • 6: Eheleute
    • 7: Herrn und Frau
  • street – Street [36]
  • postbox – Post office box [10]
  • postcode – Postal code [10]
  • city – City [30]
  • country – Country code, ISO-3166 [2]
  • phone – Phone [20]
  • fax – Fax [20]
  • email – Email [60]
  • vatid – VAT-ID [15]
  • bankname – Bank name [27]
  • bankaccount – Bank account number [10]
  • bankcode – Bank code [8]
  • iban – IBAN [34]
  • bic – BIC [11]
adviserid

Datev adviser number (read-only)

advisername

Datev adviser name (read-only)

as_dict()

Generates the DATEV files and returns them as a dictionary.

The keys represent the file names and the values the corresponding file data as bytes.

clientid

Datev client number (read-only)

dfv

Datev DFV label (read-only)

kne

Length of accounting numbers (read-only)

mediumid

Data medium id (read-only)

password

Datev password (read-only)

save(path)

Generates and saves all DATEV files.

Parameters:path – If path ends with the extension .zip, all files are stored in this archive. Otherwise the files are saved in a folder.

Kann ich
  Ihnen helfen?


Schreiben Sie mir
doch einfach unter
giraffe@joonis.de