[insight] Goals and rewards: savings goals, ways to save, challenges and medals; v0.6.0 #8
Reference in New Issue
Block a user
Delete Branch "feature/goals-rewards"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Savings goals with ways to save, challenges, and medals computed from the ledger, for Fiscus Domi's Savings and Rewards screens. Design:
docs/05_goals_rewards.md. Version 0.6.0.What changes
fiscus-ledger::goaland seven events:goal.created,goal.changed,goal.ways_set,goal.saved,goal.closed,challenge.startedandchallenge.abandoned, with their checks inState::apply.fiscus-insight::goals: per goal, the tank's level, what is needed per month to make its date, the pace and the month it gets there, and this month's split between its ways (fixed, round-ups to the haléř, a share of last month's plan leftover, a share of last month's income). The split is capped at what the goal still needs. There are also "where the money could come from" sources: subscriptions not decided "keep", and categories up on their 3-month average.fiscus-insight::rewards:cancel_kit_in(sub, language): the cancellation email in Czech or English.cancel_kitstays English.merchant.rs,money.rsandsubscriptions.rs. They do not change behaviour.Self-review
share.rsstill builds onlypayment.shared, and nothing here touches it.todayis a parameter, and there is no I/O.fiscus-ledger/tests/goals.rs, 6 tests: goals, ways and shares, closing, challenges, and hostile JSON.fiscus-insight/tests/goals.rs, 8 tests:cargo test --workspacepasses, andcargo clippy --workspace --all-targetsis clean.