fix: label personal accounts with user names

This commit is contained in:
2026-04-21 21:49:54 +02:00
parent e0dadc4b20
commit 5b752ab7c4
4 changed files with 18 additions and 4 deletions
+7
View File
@@ -26,6 +26,7 @@ main_bp = Blueprint("main", __name__)
def _community_account_cards(month, previous_month):
personal_label_map = personal_account_names()
community_accounts = CommunityAccount.query.filter_by(is_active=True).order_by(
CommunityAccount.sort_order.asc(), CommunityAccount.name.asc()
).all()
@@ -73,9 +74,15 @@ def _community_account_cards(month, previous_month):
)
assigned_budget_names = [category.name for category in assigned_categories]
delta = current_total - previous_total
display_name = (
f"Auszahlung {personal_label_map.get(community_account.linked_account_slug, community_account.name)}"
if community_account.account_type == "personal" and community_account.linked_account_slug
else community_account.name
)
cards.append(
{
"community_account": community_account,
"display_name": display_name,
"current_total": current_total,
"previous_total": previous_total,
"delta": delta,