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
This commit is contained in:
Christian 2026-01-27 07:20:01 +01:00
parent 404e81a7a8
commit b764224eff
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
1.3.141
1.3.142

View File

@ -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: