feat: Warnfenster und Planungs-Hinweis bei möglicher Doppelzählung (A12-T4)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-29 07:35:16 +02:00
co-authored by Claude Opus 5.5
parent 9e856ec655
commit e665180b1f
8 changed files with 264 additions and 2 deletions
+8
View File
@@ -27,6 +27,7 @@ from app.routers.planning import recurring_suggestions as _recurring_suggestions
from app.routers.scenarios import list_scenarios as _list_scenarios
from app.routers.transactions import count_transactions, list_transactions, normalize_sort
from app.services.balances import account_balance, total_balance
from app.services.double_count import all_conflicts
from app.services.planning_chart import refresh_planning_chart
from app.services.projection_service import refresh_stale_projections
from app.version import get_version
@@ -337,6 +338,11 @@ def planung_page(request: Request, session: Session = Depends(get_session)):
recurring = _list_recurring(session=session)
planned = _list_planned(session=session)
loans = _list_loans(session=session)
doppelt_posten: dict[int, list[str]] = {}
doppelt_kredit: dict[int, list[str]] = {}
for k in all_conflicts(session):
doppelt_posten.setdefault(k.posten_id, []).append(k.kredit_name)
doppelt_kredit.setdefault(k.kredit_id, []).append(k.posten_name)
return templates.TemplateResponse(request, "planning.html", {
"categories": categories,
"category_names": {c.id: c.name for c in categories},
@@ -347,6 +353,8 @@ def planung_page(request: Request, session: Session = Depends(get_session)):
"loans": loans,
"rhythms": ["monthly", "quarterly", "yearly"],
"repayment_types": ["annuity", "bullet"],
"doppelt_posten": doppelt_posten,
"doppelt_kredit": doppelt_kredit,
})