Make categories global (#1160)

* Make categories global

This solves us A LOT of cash flow and budgeting problems.

* Update schema.rb

* Update auto_categorizer.rb

* Update income_statement.rb

* FIX budget sub-categories

* FIX sub-categories and tests

* Add 2 step migration
This commit is contained in:
soky srm
2026-03-11 15:54:01 +01:00
committed by GitHub
parent 7ae9077935
commit e1ff6d46ee
54 changed files with 393 additions and 313 deletions

View File

@@ -31,8 +31,8 @@ class PagesControllerTest < ActionDispatch::IntegrationTest
test "dashboard renders sankey chart with subcategories" do
# Create parent category with subcategory
parent_category = @family.categories.create!(name: "Shopping", classification: "expense", color: "#FF5733")
subcategory = @family.categories.create!(name: "Groceries", classification: "expense", parent: parent_category, color: "#33FF57")
parent_category = @family.categories.create!(name: "Shopping", color: "#FF5733")
subcategory = @family.categories.create!(name: "Groceries", parent: parent_category, color: "#33FF57")
# Create transactions using helper
create_transaction(account: @family.accounts.first, name: "General shopping", amount: 100, category: parent_category)