mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-12 18:46:40 +07:00
fix: учитывать инвестсчета как наличные в расчёте капитала
Тип счёта investment не входил в CASH_ACCOUNT_TYPES, из-за чего деньги на инвестсчёте не попадали ни в блок "Наличные", ни в класс "Инвестиции" раздела Капитал — просто выпадали из расчёта net worth (issue #14).
This commit is contained in:
@@ -7,7 +7,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
|
|||||||
# title, /api/health (which the frontend reads to show it in Settings), and
|
# title, /api/health (which the frontend reads to show it in Settings), and
|
||||||
# embedded in exported backups so an old file can be told apart from a
|
# embedded in exported backups so an old file can be told apart from a
|
||||||
# current one.
|
# current one.
|
||||||
APP_VERSION = "1.1.0"
|
APP_VERSION = "1.1.1"
|
||||||
|
|
||||||
|
|
||||||
class Settings(BaseSettings):
|
class Settings(BaseSettings):
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
asset class.
|
asset class.
|
||||||
|
|
||||||
Design note: "Cash" is not stored anywhere — it's derived live from
|
Design note: "Cash" is not stored anywhere — it's derived live from
|
||||||
Account/Transaction data (checking/savings/cash accounts only) so the
|
Account/Transaction data (checking/savings/cash/investment accounts) so the
|
||||||
Transactions feature stays the single source of truth for liquid money.
|
Transactions feature stays the single source of truth for liquid money.
|
||||||
Every other class (investments, crypto, real estate, vehicles, precious
|
Investment accounts count here too: their balance is uninvested/unallocated
|
||||||
metals, other) is tracked manually via Asset/AssetValuation rows. Both are
|
money sitting on the account, not the market value of what's actually
|
||||||
collapsed into one
|
invested — that value is still tracked manually via Asset/AssetValuation,
|
||||||
|
same as every other class (investments, crypto, real estate, vehicles,
|
||||||
|
precious metals, other). Without this, money deposited into an investment
|
||||||
|
account but not yet turned into a valued Asset silently disappeared from
|
||||||
|
net worth. Both halves are collapsed into one
|
||||||
daily, forward-filled series so the chart reads as one continuous line even
|
daily, forward-filled series so the chart reads as one continuous line even
|
||||||
though the two halves are updated at very different cadences.
|
though the two halves are updated at very different cadences.
|
||||||
"""
|
"""
|
||||||
@@ -32,7 +36,7 @@ from app.schemas.net_worth import (
|
|||||||
RiskLevelSummary,
|
RiskLevelSummary,
|
||||||
)
|
)
|
||||||
|
|
||||||
CASH_ACCOUNT_TYPES = {AccountType.CHECKING, AccountType.SAVINGS, AccountType.CASH}
|
CASH_ACCOUNT_TYPES = {AccountType.CHECKING, AccountType.SAVINGS, AccountType.CASH, AccountType.INVESTMENT}
|
||||||
|
|
||||||
RANGE_DAYS = {"30d": 30, "90d": 90, "1y": 365, "5y": 365 * 5}
|
RANGE_DAYS = {"30d": 30, "90d": 90, "1y": 365, "5y": 365 * 5}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "aurum-frontend",
|
"name": "aurum-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Reference in New Issue
Block a user