ready to test

This commit is contained in:
2025-08-01 13:24:42 +00:00
parent 7f1ec6a16b
commit acb3622ef1
3 changed files with 29 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ class MyCSVImporter(importer.ImporterProtocol):
return file.name.endswith('.csv')
def file_account(self, file):
return "Assets:Bank:POSTBANK"
return "Assets:Bank:PostbankGiro"
def file_date(self, file):
"""Returns the unique date of the file, if any."""
@@ -44,17 +44,18 @@ class MyCSVImporter(importer.ImporterProtocol):
# Bedrag = index 11
# Valuta = index 17
datum_str = row[0]
ontvanter = row[3]
ontvanger = row[3]
omschrijving_str = row[4]
bedrag_str = row[11]
valuta = row [17]
valuta = row[17]
dag, maand, jaar = datum_str.split('.')
transactie_datum = data.D(int(jaar)), int(maand), int(dag))
payee = ontvanter
payee = ontvanger
narration = omschrijving_str
bedrag = D(bedrag_str).replace(',','.')
currency = valuta
meta = data.new_metadata(file.name, index)
@@ -93,7 +94,7 @@ class MyCSVImporter(importer.ImporterProtocol):
def _map_payee_to_account(self, payee):
mapping = {
"Lohn": "Income:Salary",
"Lohn": "Income:Salaris",
"Miete": "Expenses:Rent",
"Sachsen":"Expenses:Electricity",
}