-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Transaction transfers, payments, and matching #883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
zachgoll
merged 11 commits into
main
from
858-allow-users-to-mark-transactions-as-payments-or-transfers-which-are-excluded-from-income-and-expense-calculations
Jun 19, 2024
Merged
Transaction transfers, payments, and matching #883
zachgoll
merged 11 commits into
main
from
858-allow-users-to-mark-transactions-as-payments-or-transfers-which-are-excluded-from-income-and-expense-calculations
Jun 19, 2024
Conversation
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
…users-to-mark-transactions-as-payments-or-transfers-which-are-excluded-from-income-and-expense-calculations # Conflicts: # db/schema.rb # test/fixtures/accounts.yml
…users-to-mark-transactions-as-payments-or-transfers-which-are-excluded-from-income-and-expense-calculations
5 tasks
Bibalkla
approved these changes
Jun 18, 2024
…users-to-mark-transactions-as-payments-or-transfers-which-are-excluded-from-income-and-expense-calculations # Conflicts: # app/views/transactions/show.html.erb # config/locales/views/transactions/en.yml
karankiri
pushed a commit
to karankiri/maybe
that referenced
this pull request
Jun 20, 2024
* Add transfer model and clean up family snapshot fixtures * Ignore transfers in income and expense snapshots * Add transfer validations * Implement basic transfer matching UI * Fix merge conflicts * Add missing translations * Tweak selection states for transfer types * Add missing i18n translation
karankiri
pushed a commit
to karankiri/maybe
that referenced
this pull request
Jun 20, 2024
* Add transfer model and clean up family snapshot fixtures * Ignore transfers in income and expense snapshots * Add transfer validations * Implement basic transfer matching UI * Fix merge conflicts * Add missing translations * Tweak selection states for transfer types * Add missing i18n translation
zachgoll
added a commit
that referenced
this pull request
Jun 21, 2024
* feat: make transaction container fixed height * feat: pagination per page query * fix: linting errors * Changelog page that pulls from Github Release notes (#867) * Changelog page that pulls from Github Release notes * Review changelog page styles * Move changelog page title to i18n translations * Bump to 0.1.0-alpha.6 Signed-off-by: Zach Gollwitzer <zach@maybe.co> * Bump aws-sdk-s3 from 1.152.0 to 1.152.3 (#880) Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.152.0 to 1.152.3. - [Release notes](https://github.com/aws/aws-sdk-ruby/releases) - [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-ruby/commits) --- updated-dependencies: - dependency-name: aws-sdk-s3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump mocha from 2.3.0 to 2.4.0 (#878) Bumps [mocha](https://github.com/freerange/mocha) from 2.3.0 to 2.4.0. - [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md) - [Commits](freerange/mocha@v2.3.0...v2.4.0) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump octokit from 8.1.0 to 9.1.0 (#877) Bumps [octokit](https://github.com/octokit/octokit.rb) from 8.1.0 to 9.1.0. - [Release notes](https://github.com/octokit/octokit.rb/releases) - [Changelog](https://github.com/octokit/octokit.rb/blob/main/RELEASE.md) - [Commits](octokit/octokit.rb@v8.1.0...v9.1.0) --- updated-dependencies: - dependency-name: octokit dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump rails from `f9c847f` to `5d34172` (#879) Bumps [rails](https://github.com/rails/rails) from `f9c847f` to `5d34172`. - [Release notes](https://github.com/rails/rails/releases) - [Commits](rails/rails@f9c847f...5d34172) --- updated-dependencies: - dependency-name: rails dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zach Gollwitzer <zach@maybe.co> * Update issue templates * Add merchant select when editing transaction (#885) * Transaction transfers, payments, and matching (#883) * Add transfer model and clean up family snapshot fixtures * Ignore transfers in income and expense snapshots * Add transfer validations * Implement basic transfer matching UI * Fix merge conflicts * Add missing translations * Tweak selection states for transfer types * Add missing i18n translation * Ensure correct form's hidden input for selectedIds (#891) * feat: make transaction container fixed height * feat: pagination per page query * fix: linting errors * Transaction transfers, payments, and matching (#883) * Add transfer model and clean up family snapshot fixtures * Ignore transfers in income and expense snapshots * Add transfer validations * Implement basic transfer matching UI * Fix merge conflicts * Add missing translations * Tweak selection states for transfer types * Add missing i18n translation * feat: make transaction container fixed height * feat: pagination per page query * fix: linting errors * revert unnecessary changes * revert unnecessary changes * code review changes * code review changes * code review changes * remove unused imports * fix: unit tests * remove border * fix: transaction padding * fix: transaction container height --------- Signed-off-by: Zach Gollwitzer <zach@maybe.co> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Karan Kiri <karankiri.96@gmail.com> Co-authored-by: Mattia <malnis.mattia@gmail.com> Co-authored-by: Zach Gollwitzer <zach@maybe.co> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com> Co-authored-by: Jakub Kottnauer <jk@jakubkottnauer.com> Co-authored-by: ziraq young <ziraqyoung@outlook.com>
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.
CleanShot.2024-06-18.at.14.32.13.mp4
Overview
This PR enables transaction transfers and subsets (payments).
Additionally, I have cleaned up some of the snapshot fixtures to make them easier to modify and more clear to read.
What is a "Transfer"?
A transfer represents a pair of transactions that:
Transaction Matching
In a personal finance app like Maybe, we cannot guarantee the user will have both accounts "connected" to the app. Because of this, a transfer can also be represented by a single outgoing/incoming transaction to/from some external account. Even in these cases, the user generally will not want these transactions to be included in any "budgeting" calculations like income/expense.
Because we cannot guarantee both sides of the transfer can be found within the user's data, transaction "matching" must happen in two separate steps:
marked_as_transfer: true
Transfer
record by asking the user to confirm both transactions for the identified transferThe
marked_as_transfer
is a slightly denormalized convenience field that serves a few purposes: