Skip to content
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

add filter for duplicate user/amount/date transactions #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tolland
Copy link
Contributor

@tolland tolland commented Oct 26, 2021

reconcile.rb relies on the OFX transaction data field FITID to determine the uniqueness of a user payment (for payments/transactions imported from bank statements, i.e. not gocardless) across multiple imports.

It would be useful to be able to support multiple ways of importing bank transaction data, e.g. open banking API transactions data. In that case the FITID wouldn't be available to match on, and so payments would be registered multiple times if both types of payment processing were run redundantly.

This change adds a filter so reconcile only adds the first payment it sees for a user, of a specific amount, on a particular day, regardless of the FITID associated with the payment.

Pros

  • can run both reconcile and nordigen_import at the same time for redundancy
  • users don't generally make more than one payment of the same amount per day, so this is an edge case
  • even if they did, it wouldn't have any affect on their memberships subs status as long as at least one was sufficient on its own

Cons

If a user for example pays £5 into LHS bank with their hackspace id as a reference say 3 times. Only the first payment would be registered against their membership

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant