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:
parent
404e81a7a8
commit
b764224eff
@ -458,11 +458,11 @@ class EconomicService:
|
|||||||
logger.info(f"📅 Will filter invoices from {start_date} onwards (13 months for yearly billed items)")
|
logger.info(f"📅 Will filter invoices from {start_date} onwards (13 months for yearly billed items)")
|
||||||
|
|
||||||
async with aiohttp.ClientSession() as session:
|
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
|
# Then filter by customer in code
|
||||||
all_invoices = []
|
all_invoices = []
|
||||||
|
|
||||||
endpoint = f"{self.api_url}/invoices/sent"
|
endpoint = f"{self.api_url}/invoices/drafts"
|
||||||
logger.info(f"📋 Fetching invoices from {endpoint}")
|
logger.info(f"📋 Fetching invoices from {endpoint}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user