fix: Remove duplicate customer filtering code

v1.3.144:
- Removed duplicate filtering logic
- Fixed logic flow: check invoices -> filter -> date filter
- Cleaner logs without duplicates
This commit is contained in:
Christian 2026-01-27 07:22:00 +01:00
parent ffffa8e004
commit bff284f398
2 changed files with 1 additions and 11 deletions

View File

@ -1 +1 @@
1.3.143
1.3.144

View File

@ -517,16 +517,6 @@ class EconomicService:
except Exception as e:
logger.error(f"❌ Error fetching from {endpoint}: {e}")
logger.info(f"✅ Found {len(all_invoices)} total invoices")
# Filter invoices for this customer
customer_invoices = [
inv for inv in all_invoices
if inv.get('customer', {}).get('customerNumber') == customer_number
]
logger.info(f"📊 Filtered to {len(customer_invoices)} invoices for customer {customer_number}")
if not all_invoices:
logger.warning(f"⚠️ No invoices found in e-conomic")
return []