Add tax treatment classification for investment accounts with international support (#693)

* Add tax treatment support for accounts, investments, and cryptos

* Replace hardcoded region labels with I18n translations

* Add I18n support for subtype labels with fallback to hardcoded values

* fixed schema

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
This commit is contained in:
LPW
2026-01-18 11:29:02 -05:00
committed by GitHub
parent 6ec03e93f4
commit 64dc5c2fb8
14 changed files with 488 additions and 23 deletions

View File

@@ -0,0 +1,5 @@
class AddTaxTreatmentToCryptos < ActiveRecord::Migration[7.2]
def change
add_column :cryptos, :tax_treatment, :string, default: "taxable", null: false
end
end

3
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2026_01_16_090336) do
ActiveRecord::Schema[7.2].define(version: 2026_01_17_200000) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@ -256,6 +256,7 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_16_090336) do
t.datetime "updated_at", null: false
t.jsonb "locked_attributes", default: {}
t.string "subtype"
t.string "tax_treatment", default: "taxable", null: false
end
create_table "data_enrichments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|