Skip to content

Commit

Permalink
Changing n26 to support the new file format (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dracks authored Sep 13, 2024
1 parent 80dbdac commit 256500d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions server/finances/importer/importers/n26.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

class Number26(AbstractImporter):
key = "n26/es"
file_regex = "n26-csv-transactions.*\.csv"
file_regex = "Cuenta.*\.csv"

_discard = 1

_mapping = {
'movement_name': 1,
'movement_name': 2,
'date': 0,
'date_value': 0,
'value': 5,
# 'details': 4
'date_value': 1,
'value': 7,
'details': 5
}

def _creator(self, file_name):
Expand All @@ -21,4 +21,4 @@ def _creator(self, file_name):
def build(self, data):
v = super(Number26, self).build(data)
v.value = float(v.value)
return v
return v
8 changes: 4 additions & 4 deletions server/finances/importer/tests/resources/n26_es.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"Fecha","Beneficiario","Número de cuenta","Tipo de transacción","Referencia de pago","Cantidad (EUR)","Cantidad (Divisa extranjera)","Tipo de divisa extranjera","Tipo de cambio"
"2019-01-08","Dr Who","ES9271020570520240752219","Ingreso"," ","10.0","","",""
"2019-01-20","Dr Who","ES9271020570520240752219","Ingreso","RENTAL FLAT","120.0","","",""
"2019-01-28","Dalek","DE717287002202217671300","Transferencia saliente","Dr Who","-140.0","","",""
"Booking Date","Value Date","Partner Name","Partner Iban","Type","PaymentReference","Account Name","Amount (EUR)","Original Amount","Original Currency","Exchange Rate"
"2019-01-08","2019-01-08","Dr Who","ES9271020570520240752219","Ingreso",," ","10.0","","",""
"2019-01-20","2019-01-20","Dr Who","ES9271020570520240752219","Ingreso",,"RENTAL FLAT","120.0","","",""
"2019-01-28","2019-01-28","Dalek","DE717287002202217671300","Transferencia saliente",,"Dr Who","-140.0","","",""

0 comments on commit 256500d

Please sign in to comment.