mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 20:44:08 +00:00
- Introduced `InvestmentActivityDetector` to mark internal investment activity as excluded from cashflow and assign appropriate labels. - Added `exclude_from_cashflow` flag to `entries` and `investment_activity_label` to `transactions` with migrations. - Implemented rake tasks to backfill and clear investment activity labels. - Updated `PlaidAccount::Investments::TransactionsProcessor` to map Plaid transaction types to labels. - Included comprehensive test coverage for new functionality.
9 lines
388 B
Ruby
9 lines
388 B
Ruby
class AddInvestmentActivityLabelToTransactions < ActiveRecord::Migration[7.2]
|
|
def change
|
|
# Label for investment activity type (Buy, Sell, Sweep In, Dividend, etc.)
|
|
# Provides human-readable context for why a transaction is excluded from cashflow
|
|
add_column :transactions, :investment_activity_label, :string
|
|
add_index :transactions, :investment_activity_label
|
|
end
|
|
end
|