feat: Grafana-Panel Planung nach Kategorie inkl. Kreditraten (A11-T3)
Neue Tabelle planning_monthly (Monatssummen je Kategorie aus wiederkehrenden Posten, Einmalposten und allen Kreditraten), Service planning_chart mit refresh_planning_chart (Advisory-Lock, komplette Neuschreibung), GUI-Hooks in index/planung_page ueber _safe_refresh, neues Barchart-Panel im Grafana-Dashboard (Panel 5). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -80,3 +80,14 @@ def test_v_projection_ist_serie_und_szenario_ab_heute(pg):
|
||||
assert all(r.day >= today for r in sc)
|
||||
assert [r.balance for r in sc[1:]] == [Decimal("5000.00")] * 5
|
||||
assert not any(r.scenario == "Ohne Punkte" for r in rows)
|
||||
|
||||
|
||||
def test_planning_chart_refresh_auf_postgres(pg):
|
||||
from app.models.tables import PlannedItem, PlanningMonthly
|
||||
from app.services.planning_chart import refresh_planning_chart
|
||||
today = pg.execute(text("SELECT CURRENT_DATE")).scalar()
|
||||
pg.add(PlannedItem(name="t", amount=Decimal("-5.00"), due=today + timedelta(days=2)))
|
||||
pg.commit()
|
||||
assert refresh_planning_chart(pg, today) == 1
|
||||
assert refresh_planning_chart(pg, today) == 1
|
||||
assert pg.query(PlanningMonthly).count() == 1
|
||||
|
||||
Reference in New Issue
Block a user