[insight] Plans and statistics: category plans, categories of your own, one definition of spending, the month in numbers; v0.5.0

- category.planned (carries forward, zero removes it; spending categories only) and category.created
- fiscus-insight: spending (outflows, inflow, largest-remainder thousandths that add up to 1000), plan (the
  month against its plan with the pace, a suggested plan from the last three months), stats (pie slices, in,
  out, net, six months, same day last month, top merchants, subscriptions' share)
- docs/04_plans_stats.md; 11 new tests
This commit is contained in:
2026-11-06 13:02:39 +01:00
parent 4e8e80efb4
commit 03dc2061f9
13 changed files with 811 additions and 11 deletions
+7
View File
@@ -158,4 +158,11 @@ pub enum EventBody {
/// Money taken out of the tax reserve (the tax or insurance paid from it).
#[serde(rename = "reserve.withdrawn")]
ReserveWithdrawn { withdrawal: String, amount: Haler, on: Date, note: String },
/// The most you mean to spend on one category in a month, from the month of `from` (its 1st) on, until a
/// later plan for that category replaces it. Zero removes the plan. Personal log only.
#[serde(rename = "category.planned")]
CategoryPlanned { category: Category, amount: Haler, from: Date },
/// A category of your own (an id as [`crate::categories::is_valid`]) and the name the app shows for it.
#[serde(rename = "category.created")]
CategoryCreated { category: Category, label: String },
}