Migrate journal entries to double-entry mutations model#156
Open
eirvandelden wants to merge 15 commits into
Open
Migrate journal entries to double-entry mutations model#156eirvandelden wants to merge 15 commits into
eirvandelden wants to merge 15 commits into
Conversation
33c1578 to
a3f05c3
Compare
Add named scopes (own/external) to Account model and update the index view to display two separate paginated tables: one for family accounts (with owner set) and one for external accounts (owner nil). External table omits the owner column since it's always nil. Changes: - Add :own and :external scopes to Account model - Split controller queries with independent pagination (own_page/external_page params) - Update view with two sections and h2 headings for each account type - Add i18n keys: own_accounts/external_accounts in all locales (en/nl/it) - Add scope tests to account_test.rb Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ion skip handling
…r? predicate After rebasing onto main (which had STI-based transfer linking), the double-entry branch was missing the type column. Replace all type == "Transfer" checks with a transfer? predicate based on category name, fix invalid fixture columns, and update fixture references renamed during the double-entry semantic alignment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2e23b93 to
697cb23
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR migrates transaction storage from STI debit/credit/transfer rows to a double-entry bookkeeping model with mutation rows, including schema and data migrations. It updates import, categorization, dashboard aggregation, and transaction CRUD paths to use mutation-based amounts and ownership logic. It adds regression tests for duplicate import handling, invalid row parsing, mutation integrity rules, concrete dashboard totals, and the new Mutation model while removing legacy accountable/STI tests and classes. It also hardens rollout behavior by running with-data DB preparation and preserving a legacy transactions backup table during migration.