Saved filter presets have to be picked from the menu every time a page
opens, so a view someone always wants, like hiding projected
transactions (#521), takes a few clicks on every visit or a bookmarked
URL.
A preset can now be set as the default from the presets menu, with the
star next to its name. All transactions and the Monthly overview then
open with it applied, relative dates moved to today, whenever their
URL has no filters of its own:
- `FilterPreset.is_default`, with a constraint allowing one default per
user. Starring another preset moves the default to it, and starring
the default again turns it off.
- Filters in the URL, like `/transactions/?is_paid=1`, take precedence
over the default, and Clear still empties the filter for the visit.
- The star stays visible on the default preset and shows on hover for
the others, like the delete button.
- Building a filter from a preset moves into
`TransactionsFilter.from_preset`, shared by applying a preset and
opening a page with the default one.
Splits a transaction into named parts whose amounts add up to its amount,
e.g. the items of a big purchase or the fees inside an investment
contribution. Parts can be set on transactions, installment plans,
recurring and quick transactions, and are copied to the transactions they
generate. Transfers can't have parts.
Transactions show their parts under a tab on the card and in the
investment detail. The content filter matches part names, and bulk edits
leave the amount of split transactions alone.
Transfers are still two transactions, now linked to each other:
- shown as one item in lists, with each side's amount, account,
category and tags ("Combine transfers" user setting, on by default)
- date, reference date, paid and mute stay in sync between sides
- edit opens the transfer form; delete, restore, duplicate and bulk
actions act on both sides
- transfers made by the transfer form now trigger rules for each side
Recurring and quick transactions gain a Transfer type, with a "To
account" and optional "To amount", generating linked transfers. A
transfer can be converted into either.
Existing transfers are left as they are, since there is no reliable
way to pair them.
This commit extends the "Untrack Account" feature by applying a special style to transaction items that belong to an untracked account.
- The transaction item template is modified to apply a "dimmed" style to transactions from untracked accounts.
- The styling follows the precedence: Account (untracked) > Category (muted) > Transaction (hidden).
- The dropdown menu for transaction items now shows "Controlled by account" if the transaction's account is untracked.