mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-07-01 03:04:52 +02:00
Document entry-year contribution proration
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user