- Count broker withdrawals from explicit positive transfers to family accounts, linked by the broker account number in the operation description.
## [Backend 0.15.5] - 2026-08-28
### Fixed
- Trust a matched family-account transfer even when the broker uses an unexpected operation description.
## [Backend 0.15.4] - 2026-08-28
### Fixed
- Reconcile split broker withdrawals with one aggregated transfer to a family account.
## [Backend 0.15.3] - 2026-08-28
### Fixed
- Recognize confirmed broker withdrawals even when the broker description does not contain the word «вывод».
## [Backend 0.15.2] - 2026-08-28
### Fixed
- Count broker deposits and withdrawals only when matched to a transfer on another family account, while retaining real explicit top-ups and withdrawals.
## [Backend 0.15.1] - 2026-08-28
### Fixed
- Excluded internal transfers for pending securities purchases from broker contributions.
pool.query<PerformanceCashRow>(`SELECT a.id AS account_id, a.alias, a.bank, a.account_number, t.amount_signed, t.description FROM accounts a JOIN transactions t ON t.account_id = a.id WHERE a.account_type IN ('brokerage', 'iis') ORDER BY a.id, t.operation_at, t.id`),
pool.query<PerformanceCashRow>(`SELECT t.id, a.id AS account_id, a.alias, a.bank, a.account_number, a.account_type, t.operation_at, t.amount_signed, t.description FROM accounts a JOIN transactions t ON t.account_id = a.id ORDER BY a.id, t.operation_at, t.id`),
pool.query<PerformanceTradeRow>(`SELECT account_id, side, quantity, settlement_amount, settlement_commission, trade_commission, isin, instrument FROM portfolio_trades ORDER BY account_id, concluded_at, id`),
pool.query<PerformanceTradeRow>(`SELECT account_id, side, quantity, settlement_amount, settlement_commission, trade_commission, isin, instrument FROM portfolio_trades ORDER BY account_id, concluded_at, id`),
pool.query<PerformancePositionRow>(`SELECT r.account_id, p.quantity, p.valuation, p.isin, p.instrument FROM portfolio_reports r JOIN portfolio_positions p ON p.report_id = r.id JOIN LATERAL (SELECT id FROM portfolio_reports WHERE account_id = r.account_id ORDER BY report_period_to DESC, imported_at DESC, id DESC LIMIT 1) latest ON latest.id = r.id`),
pool.query<PerformancePositionRow>(`SELECT r.account_id, p.quantity, p.valuation, p.isin, p.instrument FROM portfolio_reports r JOIN portfolio_positions p ON p.report_id = r.id JOIN LATERAL (SELECT id FROM portfolio_reports WHERE account_id = r.account_id ORDER BY report_period_to DESC, imported_at DESC, id DESC LIMIT 1) latest ON latest.id = r.id`),
assert.equal(classifyPortfolioCash(-129000,'Вывод ДС под нерассчитанные сделки',true),'withdrawal');
assert.equal(classifyPortfolioCash(-129000,'Сальдо расчетов по сделкам с ценными бумагами',true),'withdrawal');
assert.equal(extractBrokerWithdrawalAccount('Перевод между своими счетами. Вывод денежных средств с брокерского счета 30601 по распоряжению от 2026-05-12.'),'30601');
assert.equal(extractBrokerWithdrawalAccount('Вывод денежных средств с брокерского счёта 30601'),'30601');
{id: 1,account_id: 1,alias: null,bank:'VTB',account_number:'broker',account_type:'brokerage',operation_at:'2026-05-12T00:00:00+03:00',amount_signed:'-5102321',description:'Нестандартное описание операции'},
{id: 2,account_id: 1,alias: null,bank:'VTB',account_number:'broker',account_type:'brokerage',operation_at:'2026-05-13T00:00:00+03:00',amount_signed:'-4885479',description:'Вывод ДС под нерассчитанные сделки'},
{id: 3,account_id: 2,alias: null,bank:'VTB',account_number:'current',account_type:'current',operation_at:'2026-05-12T00:00:00+03:00',amount_signed:'9987800',description:'Вывод денежных средств с брокерского счета'},
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.