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

Quicken QIF splits import incorrectly when transactions in split accounts are incomplete #290

Closed
hsoft opened this Issue Jun 22, 2013 · 4 comments

Comments

Projects
None yet
1 participant
@hsoft
Owner

hsoft commented Jun 22, 2013

I exported my accounts from Quicken. When I import them into moneyGuru some of the split transactions are incomplete, containing only part of the split details. The problem appear to be related to the fact that in the QIF the transaction under the main account shows complete transaction details, but the same transaction under the other accounts only shows the details relevant to those individual accounts. The import code appears to think it has already seen the entire transactions when it actually has only seen and processed part of the transaction.

For example, I have two accounts, Checking and Home, along with a Category called Interest. There is a transaction which transfers $1000 from Checking to Home and Interest ($500 to each). In the QIF, the transactions appears under Checking with the full splits details ($500 to Home and $500 to Interest). But under Home the transaction only shows the $500 from Checking (with no reference to Interest). Similarly, under Interest the transaction only shows the $500 from Checking (with no reference to Home). When this QIf is import, the result is only a single (non-split) $500 transfer from Checking to Home.

I trimmed my qif down to the small test attached. The existing moneyGuru test file transfer_splits.qif is very similar, except the split transaction is fully detailed under each account.

I've looked at the loader/qif.py and loader/base.py code, and I see the code related to seen_account_names. It seems like this may be related, and the code perhaps has to be smarter about figuring out if the transaction it saw was correct (or only partially correct). But I am not sure what that would look like.

@hsoft hsoft closed this Jun 22, 2013

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

That's a tricky one to solve. In QIF files, what we have are entries, not transactions, so when a transaction involves a transfer between two assets/liabilities, we get the same transaction twice. Initially, the problem was that moneyGuru would mistakenly see these as two transactions. I solved this problem by simply saying "if we have a transaction with a transfer to an account that we've already seen, we've therefore already seen this transaction and we can safely skip it".

Now, this problem makes the whole duplicate detection more complicated because instead of ignoring the transaction, it will have to parse it and verify whether it has more splits than the transaction it already parsed and then replace it if it's the case.

Does quicken produce this kind of QIF export consistently for transactions involving splits and asset/liability transfer at the same time?

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

I only have Mac Quicken 2006, so I am not sure if all versions of Quicken are like this. I did do a few tests, exporting only individual accounts and only a couple transactions. They all have the same thing going on. The transactions in the split accounts only contain limited information (even when the main account is not included in the export). It seems like the code for comparing the transactions, and replacing ones that are incomplete, might be relatively straight forward, if you give ma few hints about how to start :)

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

I don't think that it's straightforward to fix. The current "account seen" mechanism is simply inadequate to solve this problem.

I'd replace it with a post-loading duplicate matching mechanism where we'd go over all loaded transaction. Then, for each transaction, if there's a split that goes to another asset or liability, check to see if that asset/liability contains a transaction on the same date for the same amount back to our account. If yes, we delete the transaction that has the smallest number of splits.

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

(from [1941a8dd5d86]) [#290 state:fixed] Fixed bug in QIF import.

Some splits could be ignores in cases where there was duplicate entries but one entry had more splits than the other (Quicken 2006 exports).
https://bitbucket.org/hsoft/moneyguru/changeset/1941a8dd5d86/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment