From 7d5ec89e13f554d4915b11ae9903fa852688f059 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 27 Jan 2026 06:58:39 +0100 Subject: [PATCH] fix: Skip invoice lines with zero amount (text/description fields only) --- app/services/subscription_matrix.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/services/subscription_matrix.py b/app/services/subscription_matrix.py index 9909660..0efebe9 100644 --- a/app/services/subscription_matrix.py +++ b/app/services/subscription_matrix.py @@ -278,6 +278,11 @@ class SubscriptionMatrixService: logger.info(f" 💰 Amount: {amount} kr, Period: {period_from_str} to {period_to_str}") + # Skip lines with no amount (text/description lines only) + if abs(amount) < 0.01: + logger.info(f" ⏭️ SKIPPED: Line with no amount (text field)") + continue + # Determine month key (use first month if multi-month) year_month = period_from.strftime('%Y-%m') logger.info(f" 📅 Month: {year_month}")