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:
parent
ffffa8e004
commit
bff284f398
@ -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 []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user