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

Added fixes for QIF files with different date order and syntax #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jmcameron
Copy link

I ran into difficulties with QIF files exported by an old version of Quicken. Some of the numbers had embeded commas (for thousands separators) and the date as in DD/MM'YY format instead of MM/DD'YY format the code expects. I added a couple of class-level flags for this. Normal use should not change, but By giving extra (optional) arguments to the .parse() command, it handles my odd formats too.

I changed the Decimal(str) use to use a special function that removes the embedded thousands separators (commas by default, but overrideable) before doing the conversion to a flow. I only did it where I had difficulties (processing transactions); you may want to change the rest correspondingly.

@jmcameron
Copy link
Author

Converted more Decimal() calls to convertFloat() calls for values that should be floats.
Fixed issue to get test_parser regtests working (by converting transaction amounts back to strings with xxx.nn format. My guess is this has been broken since adding float() conversions (and stayed broken with Decimal() changes). The regtests pass for me. It would not hurt to add more tests with different flavors of QIF files.

@jmcameron
Copy link
Author

Regtests now pass on Travis CI!

@jmcameron
Copy link
Author

In the last update to this pull request, I added support the 'U' field (seems like another amount for transactions) and named it 'amount_U' since I could not find any documentation on it.

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