Commit Graph
66 Commits
Author SHA1 Message Date
Herculino Trotta 1114a5a1c4 Merge remote-tracking branch 'origin/main' into feat/default-filter-preset 2026-11-20 16:42:50 -03:00
Herculino Trotta c29a6bea8f feat(transactions): add lightweight auto-tagging for unclassified transactions 2026-11-19 20:00:51 -03:00
Asish Kumar b10323b6f5 feat(transactions): open the transaction pages with a default filter preset
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.
2026-11-20 02:28:10 +05:30
Herculino Trotta f5414223ab fix(transactions): drop unpaid recurring occurrences past a shorter end date
Editing a recurring transaction to end earlier kept its unpaid occurrences
after the new end date, counting them in projected balances, and left
last_generated_date past it. Remove them (both sides of a generated transfer;
a partner linked from elsewhere is unlinked and kept) and move the bookmark
back to the last remaining occurrence. Paid occurrences stay.

Also pin ENABLE_SOFT_DELETE=False on the test that asserts hard deletes, so a
.env that turns soft delete on no longer fails it.
2026-11-15 16:36:29 -03:00
Herculino Trotta 262ac3fbb6 Merge remote-tracking branch 'origin/main' into feat/filter-preset-relative-dates
# Conflicts:
#	app/apps/transactions/filters.py
2026-11-14 11:29:15 -03:00
Herculino Trotta ed513a2171 fix(transactions): unlink outside transfers broken by a recurrence edit
An unpaid occurrence linked to a transaction outside its recurrence (e.g. through a DCA entry) could end up as two expenses, or both sides in one account, after the recurrence's type or account changed. The link is now dropped in that case; the partner is left untouched.
2026-11-14 11:02:38 -03:00
Asish Kumar 4532677e49 fix(transactions): move unpaid recurring transactions when the account or type changes
Editing a recurring transaction only refreshed the amount, description,
category, notes, tags and entities of its unpaid transactions. Changing its
account or type left the already generated transactions behind: a monthly
expense moved to another account kept its upcoming months in the old one,
and an expense turned into an income kept pulling projected balances down.
New occurrences followed the new settings, so the recurrence ended up split
across two accounts.

Unpaid transactions now take the recurrence's account and type as well,
keeping their dates, the same way installment plans already update theirs.
For recurring transfers:

- the "to" sides follow the "to" account and amount;
- turning a recurrence into a transfer adds the missing "to" sides;
- turning a transfer into an income or expense removes the unpaid "to"
  sides and leaves the paid transfers linked.

A "to" side is now recognised by its partner belonging to the same
recurrence, so an occurrence the user linked by hand to another
transaction is updated like any other occurrence instead of being treated
as a generated "to" side.
2026-11-14 17:00:17 +05:30
Herculino Trotta ae245fb1d1 feat(transactions): add sub-transactions
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.
2026-11-14 02:13:21 -03:00
Asish Kumar ced7f3826e feat(transactions): keep filter preset dates relative to today
Filter presets save the exact dates they were created with, so a preset
for "from today" or "this month" goes stale the next day or month.

The save dialog now offers "Keep dates relative to today". When ticked,
the preset remembers the day it was saved (`FilterPreset.relative_to`)
and, when applied, moves its dates forward by the time elapsed since:
"Date from"/"Until" by days and the reference months by months. A preset
saved with today as the start date always starts today, and one saved
for the current reference month always shows the current month.

- The option is only stored when the preset has a date filter.
- Presets with relative dates show a clock icon in the presets menu.
- Presets saved before this change, or without the option, keep their
  fixed dates.
2026-11-12 22:59:59 +05:30
Herculino Trotta 00d37d8c81 refactor(currencies): keep the exchanged amounts display rule in one place
Account.displayed_exchange_currency holds the account/currency precedence for transactions, and shown_exchange_currency() expresses the same rule as a query expression for the insights and account totals, replacing the per-module checks.
2026-11-11 10:22:50 -03:00
Asish Kumar d3f29f5ad1 feat(currencies): make displaying exchanged amounts optional
Currencies and accounts get a "Show exchanged amounts" switch, on by
default. Turning it off hides the amounts converted to the exchange
currency without removing the exchange currency, so consolidated totals
on the Net Worth page keep working.

The switch belongs to whichever one provides the exchange currency:

- Transactions (including both legs of combined transfers) use the
  account's switch when the account has its own exchange currency, and
  the currency's switch otherwise, matching how the exchanged amount is
  picked.
- Account cards and Net Worth account rows follow the account.
- Currency cards, the monthly summary and daily allowance, Net Worth
  currency rows and the month-by-month and year-by-year insights follow
  the currency.

Currency totals still convert hidden currencies, because the
consolidated totals are built from those values; the setting only
leaves them out of the displayed data. The API keeps returning
exchanged_amount for transactions, and the account serializer exposes
the new field (currencies already serialize all fields).

Closes #486
2026-11-11 15:26:04 +05:30
Jay Hemnani 6a289327b6 fix(transactions): keep a recurrence on its day after a short month
A monthly recurrence on the 31st clamped to Feb 28 and stayed on the
28th for every later month.
2026-11-10 03:51:15 +05:30
Herculino Trotta 2cd9238b18 feat(transactions): link an existing expense and income as a transfer
Adds Transaction.link_transfer() and transfer_link_error(). Only the link changes: dates, amounts and rules are left alone.
2026-11-05 00:14:41 -03:00
Herculino Trotta 3716b9b0e3 feat(transactions): link transfer sides and show them as a single item
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.
2026-11-02 01:14:46 -03:00
Herculino Trotta 35ef1dd716 fix(transactions): apply the form amount to a paid transaction converted into a recurring transaction 2026-10-12 02:41:14 -03:00
Herculino Trotta cd6069f857 feat(transactions): let new recurring transactions and installment plans adopt an existing transaction 2026-10-09 23:25:19 -03:00
Herculino Trotta 9e135560fe feat(transactions): add filter preset model 2026-08-16 01:40:03 -03:00
obervinov 11a6b3faa6 fix(transactions): recurring tags and entities dropped when generated for another user 2026-08-12 22:33:01 +04:00
Herculino Trotta 6a19381672 feat(transactions): add attachments 2026-06-06 04:33:06 -03:00
Herculino Trotta dd6a390e6b fix(transactions): empty internal_id raises duplicate error when editing via django admin 2026-01-09 23:25:13 -03:00
Herculino Trotta edcad37926 fix: recurring transactions not adding entities or tags to created transactions 2025-12-19 23:55:30 -03:00
Herculino Trotta 49f28834e9 fix: unable to create transactions with an empty reference date when importing
fixes #410
2025-11-26 16:39:51 -03:00
Herculino Trotta a63367a772 feat: first batch of work 2025-11-01 03:15:44 -03:00
Herculino Trotta 637c62319b feat(transactions): Try to convert amount to the expected Decimal if it is a str, int or float 2025-09-14 01:23:49 -03:00
Herculino Trotta 2235bdeabb changes 2025-09-02 23:17:04 -03:00
Herculino Trotta d724300513 changes 2025-09-02 15:54:45 -03:00
Herculino Trotta c738f5ee29 changes 2025-09-02 09:47:27 -03:00
Herculino Trotta 4f6903e8e4 feat(transactions:recurring): Allow to set how many future instances of a recurring transaction to create in advance 2025-08-06 13:13:59 -03:00
Herculino Trotta 5b6c123fa1 refactor: properly name shareable objects generic fields 2025-07-27 23:19:39 -03:00
Herculino Trotta ef5f3580a0 feat: allow single transactions to be hidden from summaries
Control is done via the dropdown menu on a transaction item
Transfers are hidden by default

fix #274
2025-07-19 16:19:11 -03:00
Herculino Trotta d3b354e2b8 feat: add quick transactions 2025-06-20 02:01:09 -03:00
Herculino Trotta 59ce50299a fix(transactions): duplicate totals when account is shared with owner or owner-less and shared
#247
2025-04-27 15:57:55 -03:00
Herculino Trotta 86f0c4365e feat(transactions): add transaction owner to recurring and installments 2025-04-13 12:48:18 -03:00
Herculino Trotta aea149bd13 fix(transactions): recurring transactions not getting created 2025-04-13 12:47:01 -03:00
Herculino Trotta 73e8fdbf04 feat: alphabetically order most models by default
#207
2025-03-09 18:55:29 -03:00
Herculino Trotta 3809f82b60 feat(transactions): add option for removing Recurring/Installment descriptions and notes from generated transactions
#209
2025-03-09 17:50:27 -03:00
Herculino Trotta f6f06f4d65 feat(rules): trigger transaction rules on delete 2025-03-09 01:54:03 -03:00
Herculino Trotta 020dd74f80 feat: multi tenancy support 2025-03-08 12:03:17 -03:00
Herculino Trotta 865618e054 feat(dca): link transactions to DCA 2025-02-15 00:41:06 -03:00
Herculino Trotta f3bcef534e feat(internal): trigger rules on bulk actions 2025-02-14 00:34:51 -03:00
Herculino Trotta 80edf557cb fix(transactions): transaction convert value doesn't take into account currency's exchange currency
account takes precedence
2025-02-03 00:30:26 -03:00
Herculino Trotta 0a3e47819a feat: add trash can to see deleted transactions 2025-02-01 11:12:43 -03:00
Herculino Trotta f1bc04756f fix: cleanup_deleted_transactions task couldn't trigger 2025-01-27 21:33:46 -03:00
Herculino Trotta e3d3a7cf91 feat: add new envs 2025-01-23 14:30:59 -03:00
Herculino Trotta 00b8727664 feat(transactions): add internal_id field to transactions 2025-01-22 10:43:18 -03:00
Herculino Trotta a52f682c4f feat(transactions): soft delete 2025-01-22 10:43:17 -03:00
Herculino Trotta 493bf268bb feat: rename app, some work on schema 2025-01-22 10:43:17 -03:00
Herculino Trotta 2b6a73af18 feat(transactions): make description optional 2025-01-14 10:04:46 -03:00
Herculino Trotta afe366c359 feat(installment-plan): don't update paid transactions amount 2025-01-11 13:35:52 -03:00
Herculino Trotta b951e5f069 feat(recurring-transaction): update unpaid transactions info when recurring transaction is updated 2025-01-11 13:34:49 -03:00