mirror of
https://git.hiabuto.net/C3MA/CCMA.git
synced 2026-08-25 15:05:18 +02:00
feat: add itemized claims and payments
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from datetime import date
|
||||
|
||||
from ccma.domain.contributions import claim_status
|
||||
from ccma.rules.api import RuleContext, task
|
||||
|
||||
RULE_ID = "claim-status"
|
||||
@@ -9,7 +10,11 @@ ORDER = 50
|
||||
def evaluate(context: RuleContext):
|
||||
actions = []
|
||||
for claim in context.contributions.claims:
|
||||
if str(claim.get("status", "open")) not in {"open", "partially_paid"}:
|
||||
if claim_status(context.contributions, claim, today=context.today) not in {
|
||||
"open",
|
||||
"partially_paid",
|
||||
"overdue",
|
||||
}:
|
||||
continue
|
||||
try:
|
||||
due = date.fromisoformat(str(claim.get("due_date", "")))
|
||||
|
||||
Reference in New Issue
Block a user