Group currency list by requisition

This commit is contained in:
2023-03-14 14:06:54 +00:00
parent a855e7e5b5
commit 4211d3c10a
8 changed files with 49 additions and 10 deletions

View File

@@ -44,10 +44,11 @@ class BanksCurrencies(LoginRequiredMixin, OTPRequiredMixin, ObjectList):
account_info = {}
for agg in aggregators:
for bank, accounts in agg.account_info.items():
if bank not in account_info:
account_info[bank] = []
for account in accounts:
account_info[bank].append(account)
ident = (bank, account["requisition_id"])
if ident not in account_info:
account_info[ident] = []
account_info[ident].append(account)
return account_info