-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 support for getting final opening / closing balance on each transaction #19
Add support for getting final opening / closing balance on each transaction #19
Conversation
For some reason the tests appear to be failing but I'm pretty sure that's not related to your changes. I'm a bit busy at the moment but I'll have a look within a few weeks :) |
Hmm, after running another test it does seem to be related to your changes but I'm not entirely sure how yet. |
I actually think it is my code. When ever you have time to look into this, that's great. This change seems to be working for me with an export from Knab and the monkey patch in #18 applied. |
The issue with the current implementation (and the monkey patch) is that the opening balance isn't captured correctly because a new transaction is created with record 61 which comes after record 60F (opening balance). I'm open to other solutions for this when you have time to look at it. Thanks. |
I'm going to use this branch in my project and will update it if I have further changes. I'll try to update the tests as well. |
I forgot to mention that an MT940 block with multiple 61 records will only have the final opening balance on the first transaction, and the final closing balance on the last transaction of the block. This is something that I can document if you want to merge this PR. We could also generate these values if you think that's better for consistency. |
2d03193
to
5e750ed
Compare
Just a quick note to let you know that I'm still working on this so you shouldn't merge it. My other PRs come out of this work. |
1fd178d
to
eb3faf7
Compare
This is ready for review. There will be some merge conflicts with my other PRs so just let me know if you want me to rebase. Some notes about the implementation:
|
Thanks for the patch, I've merged it all and I'm running the tests now. As soon as all tests succeed I'll push out a new release :) |
See #18 for explanation.