Fix: Stornierte/Entwurfs-Rechnungen aus Quartalsbericht und Cashflow-Summen ausgeschlossen

This commit is contained in:
rene 2026-05-15 12:49:04 +02:00
parent 5fd86dac4b
commit 8f3d639e34

View file

@ -414,7 +414,7 @@ def get_quarterly(year: int, q: int, admin=Depends(require_admin)):
with db() as conn:
rows = conn.execute(
"SELECT * FROM invoices WHERE created_at >= ? AND created_at <= ? ORDER BY id",
"SELECT * FROM invoices WHERE status IN ('paid','sent') AND created_at >= ? AND created_at <= ? ORDER BY id",
(from_date, to_date + "T23:59:59Z")
).fetchall()