fix: Skip invoice lines with zero amount (text/description fields only)

This commit is contained in:
Christian 2026-01-27 06:58:39 +01:00
parent ea062e10ae
commit 7d5ec89e13

View File

@ -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}")