Skip to content

Commit

Permalink
Change credit card to negative amount
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoue authored Nov 6, 2023
1 parent 1983b81 commit f97a7c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion finalynx/fetch/source_finary.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,17 @@ def _process_account(self, dict_account: Dict[str, Any], tree: Tree) -> None:
node = tree.add(account_name)

for item in dict_account["fiats"]:
subtype=dict_account["bank_account_type"]["subtype"]
if subtype == "credit":
amount = -item["display_current_value"]
else:
amount = item["display_current_value"]
self._register_fetchline(
tree_node=node,
name=account_name,
id=item["id"],
account=dict_account["institution"]["name"],
amount=item["display_current_value"],
amount=amount,
currency=item["fiat"]["symbol"],
)

Expand Down

0 comments on commit f97a7c7

Please sign in to comment.