feat(domain): allocation rules become a dated series
Post.standingRule becomes Post.rules: RuleVersion[], resolved by ruleAt() as the last version effective at or before a month. Per-month overrides still win outright; a post with no applicable version allocates zero rather than applying its earliest rule backwards. allocationFor keeps its signature, so the fold, the views and the ODS export are untouched. Settings gets a read-only rule summary for now; the history editor follows.
This commit is contained in:
1 parent
c74a66aea9
commit
68712e72a3
11 files changed
+252
-151
No files matched your search
@@ -9,7 +9,7 @@ function post(id: string, order: number, percent: number, archived = false): Pos
|
||||
order,
|
||||
archived,
|
||||
currency: "DKK",
|
||||
standingRule: { kind: "percentOfIncome", percent },
|
||||
rules: [{ from: "2026-01", rule: { kind: "percentOfIncome", percent } }],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user