Document entry-year contribution proration

This commit is contained in:
Marcel Peterkau
2026-06-27 15:38:10 +02:00
parent 532dc5c638
commit d897dd5f6e
@@ -82,6 +82,8 @@ def _membership_claims(context: RuleContext, started_at: date, accepted_at: date
actions = [] actions = []
monthly_amount = annual_amount / Decimal(12) monthly_amount = annual_amount / Decimal(12)
for suffix, first_month, last_month, regular_due in periods: 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) charged_from = max(first_month, period_start.month)
months = max(0, last_month - charged_from + 1) months = max(0, last_month - charged_from + 1)
if months == 0: if months == 0: