Commit 19400826 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by hydrargyrum
Browse files

[degiro] add new foreign languages

parent cfd32a7b
......@@ -167,12 +167,18 @@ def obj__action(self):
label = Field('raw')(self).split()[0]
return {
'Buy': 'B',
'Sell': 'S',
'Achat': 'B',
'Compra': 'B',
'Sell': 'S',
'Vente': 'S',
'Venta': 'S',
'Venda': 'S',
'Taxe': None,
'Frais': None,
'Intérêts': None,
'Comisión': None,
'Custo': None,
'DEGIRO': None,
# make sure we don't miss transactions labels specifying an ISIN
}[label]
......@@ -209,9 +215,9 @@ def obj_amount(self):
]
amount = quantity * unitprice
raw = select_raw(self).lower()
if 'vente' in raw:
if any(i for i in ('vente', 'venta', 'venda', 'sell') if i in raw):
return amount
elif 'achat' in raw:
if any(i for i in ('achat', 'compra', 'buy') if i in raw):
return -amount
@method
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment