Files
WYGIWYH/app/apps/accounts/migrations/0022_account_show_exchanged_amounts.py
T
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

23 lines
634 B
Python

# Generated by Django 5.2.17 on 2026-11-11 09:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("accounts", "0021_alter_account_income_categories_help"),
]
operations = [
migrations.AddField(
model_name="account",
name="show_exchanged_amounts",
field=models.BooleanField(
default=True,
help_text="Show amounts converted to this account's exchange currency next to its transactions and totals.",
verbose_name="Show exchanged amounts",
),
),
]