diff --git a/src/ccma/rules/scripts/contribution_claims.py b/src/ccma/rules/scripts/contribution_claims.py index 18590d3..cb4f312 100644 --- a/src/ccma/rules/scripts/contribution_claims.py +++ b/src/ccma/rules/scripts/contribution_claims.py @@ -82,6 +82,8 @@ def _membership_claims(context: RuleContext, started_at: date, accepted_at: date actions = [] monthly_amount = annual_amount / Decimal(12) for suffix, first_month, last_month, regular_due in periods: + # The entry year is intentionally billed from the entry month onward, + # even when retroactive claims create old membership-fee claims. charged_from = max(first_month, period_start.month) months = max(0, last_month - charged_from + 1) if months == 0: