From c2f59c8773ee883b9e2d335964e519a601f3c6c6 Mon Sep 17 00:00:00 2001 From: ZProger Date: Thu, 3 Sep 2026 23:29:27 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=83=D1=87=D0=B8=D1=82=D1=8B=D0=B2?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=B8=D0=BD=D0=B2=D0=B5=D1=81=D1=82=D1=81?= =?UTF-8?q?=D1=87=D0=B5=D1=82=D0=B0=20=D0=BA=D0=B0=D0=BA=20=D0=BD=D0=B0?= =?UTF-8?q?=D0=BB=D0=B8=D1=87=D0=BD=D1=8B=D0=B5=20=D0=B2=20=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D1=87=D1=91=D1=82=D0=B5=20=D0=BA=D0=B0=D0=BF=D0=B8=D1=82?= =?UTF-8?q?=D0=B0=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Тип счёта investment не входил в CASH_ACCOUNT_TYPES, из-за чего деньги на инвестсчёте не попадали ни в блок "Наличные", ни в класс "Инвестиции" раздела Капитал — просто выпадали из расчёта net worth (issue #14). --- backend/app/core/config.py | 2 +- backend/app/services/net_worth_service.py | 14 +++++++++----- frontend/package.json | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/backend/app/core/config.py b/backend/app/core/config.py index 0e183e1..05ff433 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -7,7 +7,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict # 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 # current one. -APP_VERSION = "1.1.0" +APP_VERSION = "1.1.1" class Settings(BaseSettings): diff --git a/backend/app/services/net_worth_service.py b/backend/app/services/net_worth_service.py index 8b5b932..617cc22 100644 --- a/backend/app/services/net_worth_service.py +++ b/backend/app/services/net_worth_service.py @@ -2,11 +2,15 @@ asset class. 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. -Every other class (investments, crypto, real estate, vehicles, precious -metals, other) is tracked manually via Asset/AssetValuation rows. Both are -collapsed into one +Investment accounts count here too: their balance is uninvested/unallocated +money sitting on the account, not the market value of what's actually +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 though the two halves are updated at very different cadences. """ @@ -32,7 +36,7 @@ from app.schemas.net_worth import ( 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} diff --git a/frontend/package.json b/frontend/package.json index ed56531..c45bd32 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "aurum-frontend", "private": true, - "version": "1.1.0", + "version": "1.1.1", "type": "module", "scripts": { "dev": "vite",