Commit 1c425cc4 authored by Louis Debeve's avatar Louis Debeve Committed by Romain Bignon

[yomoni] parse amount with comma and replace with dot

parent b1bbf767
......@@ -147,7 +147,7 @@ class YomoniBrowser(APIBrowser):'/user/%s/project/%s/activity' % (self.users['userId'], account.number), method="OPTIONS")
for activity in [acc for acc in self.request('/user/%s/project/%s/activity' % (self.users['userId'], account.number), headers=self.request_headers)['activities'] \
if acc['details'] is not None]:
m ='([\d\.]+)(?=[\s]+€|[\s]+euro)', activity['details'])
m ='([\d\,]+)(?=[\s]+€|[\s]+euro)', activity['details'])
if "Souscription" not in activity['title'] and not m:
......@@ -156,7 +156,7 @@ class YomoniBrowser(APIBrowser): = Date().filter(activity['date'])
t.type = Transaction.TYPE_BANK
amount = account._startbalance if not m else "-%s" % if "FRAIS" in activity['type'] else
t.amount = CleanDecimal().filter(amount)
t.amount = CleanDecimal(replace_dots=True).filter(amount)
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