fix: Skip invoice lines with zero amount (text/description fields only)
This commit is contained in:
parent
ea062e10ae
commit
7d5ec89e13
@ -278,6 +278,11 @@ class SubscriptionMatrixService:
|
|||||||
|
|
||||||
logger.info(f" 💰 Amount: {amount} kr, Period: {period_from_str} to {period_to_str}")
|
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)
|
# Determine month key (use first month if multi-month)
|
||||||
year_month = period_from.strftime('%Y-%m')
|
year_month = period_from.strftime('%Y-%m')
|
||||||
logger.info(f" 📅 Month: {year_month}")
|
logger.info(f" 📅 Month: {year_month}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user