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()