add filter for duplicate user/amount/date transactions #209
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.
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
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