Remove the transfer flag

A transfer was a second verdict carried alongside the tag: a boolean set by
transfer = true in a rule or by x in the TUI, kept in its own pair of rule_
and manual_ columns, whose one real effect was to hold the row out of the
report. The rest of it was display -- a T column in the transaction list, in
the rules screen and in money ls.

Money moved between your own accounts is now tagged like anything else and
counts like anything else. The leg leaving checking is an outflow and the leg
arriving in savings is an inflow, so a report over the whole data root roughly
nets out while one scoped to a single account or month does not. That is the
price of one verdict per transaction instead of two.

A rule now needs a tag, and one that set only transfer = true is refused by
number on load. A leftover transfer key beside a tag is ignored, as unknown
TOML keys always were, and an index built by an older binary drops both
columns when it is opened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 23:07:47 +02:00
co-authored by Claude Opus 5
parent 16c2585637
commit 5ca6cff87b
13 changed files with 114 additions and 277 deletions
+20 -23
View File
@@ -3,15 +3,14 @@
A personal finance tracker built around bank statements rather than manual entry.
You keep a **data directory with one folder per account**, drop statement exports
into those folders, and run `money import`. Transactions are extracted, tagged by
glob rules you write, and movements between your own accounts are marked as
transfers so they never count as spending.
into those folders, and run `money import`. Transactions are extracted and
tagged by glob rules you write.
## Layout
```
~/money/ # the data root (see "Where the data root lives")
rules.toml # tag + transfer rules, in order
rules.toml # tag rules, in order
index.db # SQLite index (rebuildable; safe to delete*)
checking/
account.toml # currency + how to parse this bank's exports
@@ -22,8 +21,8 @@ transfers so they never count as spending.
2026-01.csv
```
\* Deleting the index loses manual tags and manual transfer marks, which live
only there. Everything else is re-derived from the statements.
\* Deleting the index loses the tags you set by hand, which live only there.
Everything else is re-derived from the statements.
## Where the data root lives
@@ -82,8 +81,7 @@ imported — creating an `account.toml` is not enough on its own. Run
| `1` `2` `3` `4` `5` / `tab` | accounts · transactions · report · rule builder · rules |
| `enter` | open the selected account (accounts view) |
| `t` | set the tag on the selected transaction |
| `x` | toggle transfer on the selected transaction |
| `c` | clear manual overrides, falling back to the rules |
| `c` | clear a tag set by hand, falling back to the rules |
| `/` | filter by description |
| `u` | show only untagged transactions |
| `a` | clear the account filter |
@@ -171,8 +169,8 @@ section heading and left alone.
## rules.toml
Rules are evaluated in file order and the **first match wins**, so put transfer
rules above general tag rules. Patterns are globs (`*` and `?`) matched
Rules are evaluated in file order and the **first match wins**, so put specific
rules above general ones. Patterns are globs (`*` and `?`) matched
case-insensitively, with whitespace collapsed.
A rule matches on `match` (the description) and `type` (the bank's own
@@ -194,24 +192,23 @@ tag = "salary"
match = "*ACME PAYROLL*"
note = "paid on the 4th; the December one lands early"
# Money moved between your own accounts. Both legs need a rule.
# Money moved between your own accounts is tagged like anything else. Both
# legs need a rule, and both count in the report -- one as an outflow, the
# other as an inflow.
[[rule]]
match = "*TO SAVINGS*"
transfer = true
tag = "transfer"
match = "*TO SAVINGS*"
tag = "transfer"
[[rule]]
match = "*FROM CHECKING*"
transfer = true
tag = "transfer"
match = "*FROM CHECKING*"
tag = "transfer"
# Transfers are often only identifiable by the other side's account number,
# whatever the rest of the description happens to say. Every bank parser keeps
# that number in the description, so an ordinary glob finds it.
# Such movements are often only identifiable by the other side's account
# number, whatever the rest of the description happens to say. Every bank
# parser keeps that number in the description, so an ordinary glob finds it.
[[rule]]
match = "*SI56*"
transfer = true
tag = "transfer"
match = "*SI56*"
tag = "transfer"
# A rule can be limited to one account, and can require several patterns.
[[rule]]