From 8f3d639e340763bd66601c638c2ed4772f385bdc Mon Sep 17 00:00:00 2001 From: rene Date: Fri, 15 May 2026 12:49:04 +0200 Subject: [PATCH] Fix: Stornierte/Entwurfs-Rechnungen aus Quartalsbericht und Cashflow-Summen ausgeschlossen --- backend/routes/invoices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/routes/invoices.py b/backend/routes/invoices.py index de23157..28dcb21 100644 --- a/backend/routes/invoices.py +++ b/backend/routes/invoices.py @@ -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()