From b764224eff820b41fbf1cac4f46756f08a283aac Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 27 Jan 2026 07:20:01 +0100 Subject: [PATCH] fix: Use /invoices/drafts endpoint instead of /sent v1.3.142: - Changed from /invoices/sent to /invoices/drafts - /drafts contains most active invoices (29 vs 0 in /sent) - Still applies pagination and 13-month filter --- VERSION | 2 +- app/services/economic_service.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 71600e9..07faf6b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.141 \ No newline at end of file +1.3.142 \ No newline at end of file diff --git a/app/services/economic_service.py b/app/services/economic_service.py index 711bc02..67a81b5 100644 --- a/app/services/economic_service.py +++ b/app/services/economic_service.py @@ -458,11 +458,11 @@ class EconomicService: logger.info(f"📅 Will filter invoices from {start_date} onwards (13 months for yearly billed items)") async with aiohttp.ClientSession() as session: - # Fetch from /invoices/sent endpoint (covers most active invoices) + # Fetch from /invoices/drafts endpoint (covers active invoices) # Then filter by customer in code all_invoices = [] - endpoint = f"{self.api_url}/invoices/sent" + endpoint = f"{self.api_url}/invoices/drafts" logger.info(f"📋 Fetching invoices from {endpoint}") try: