diff --git a/api/additional_methods.py b/api/additional_methods.py index a2ca323..1c2c262 100644 --- a/api/additional_methods.py +++ b/api/additional_methods.py @@ -36,10 +36,10 @@ def get_account_saldo(user, token_info, accountId=None): def get_tenant_with_saldo(user, token_info): return dbGetMany(user, token_info, { "statement": """ - SELECT t.firstname, t.lastname, t.address1, sum(a.amount) AS saldo + SELECT t.id, t.firstname, t.lastname, t.address1, sum(a.amount) AS saldo FROM tenant_t t, account_entry_t a WHERE a.account = t.account - GROUP BY t.firstname, t.lastname, t.address1 + GROUP BY t.id, t.firstname, t.lastname, t.address1 """, "params": () }