GNOME Bugzilla – Bug 491581
Import 'Cash' Action (in Investment Accounts)
Last modified: 2018-06-29 21:53:26 UTC
Please describe the problem: Quicken 2006 (possibly others too) records interest income in an investment account as Action=Cash (i.e. there is a "NCash" record in the QFX). Importing such a transaction produces the message "The file contains an unknown Action 'Cash'. Some transactions may be discarded." (Note that the error references QFX, even though the file is a QIF.) Steps to reproduce: 1. Create a QIF file containing an "NCash" record for an investment account. 2. File/Import the QIF Here is an example NCash transaction: D12/31' 3 NCash CR U0.01 T0.01 MINT - E*TRADE FINANCIAL * - SWEEP DEPOSIT ACCOUNT L_IntInc ^ Actual results: Error message: "The file contains an unknown Action 'Cash'. Some transactions may be discarded." Expected results: Successful import of the transaction. Does this happen every time? Yes Other information: Deleting the NCash records from the QIF file give a QIF that imports correctly. i.e. If you add code to ignore NCash records in an investment account, I *think* you'll get the correct behavior.
I have also seen this error message for Cash transactions in 2.2.1. I was able to import these transactions by modifying qif-parse.scm to treat Cash transactions as MiscInc transactions. (Note: MiscExp seemed more appropriate at first, but it turned out that MiscExp transactions use a positive amount, whereas Cash uses a negative amount.) The QIF importer also doesn't support two other transaction types: ContribX and WithdrwX. These are identical to Xin and Xout transactions, respectively, but their use is particular to tax-advantaged accounts (e.g. IRA). I was able to import these transactions by modifying qif-parse.scm. I see that this error has not been confirmed or assigned yet, but I will attach my modified version of src/import-export/qif-import/qif-parse.scm as a proposed patch for the assignee's consideration. I will also attach a small test file soon (so far I have only tested with large ones containing many irrelevant transactions.)
Created attachment 99952 [details] [review] Proposed patch to qif-parse.scm
Whoops, my bad... this is already assigned to Derek. Derek, my comments and the proposed patch are the same as we communicated about earlier on the mailing list. I'll attach a test file here soon.
Created attachment 99962 [details] QIF test file for Cash, ContribX, WithdrwX transactions
Charles, could you please attach a PATCH, not the whole file?
Created attachment 100026 [details] [review] Proposed patch (using diff -u this time) Here is a diff -u. Sorry about the earlier one. I hope this is what you are looking for.
Committed as r16601 together with added mappings in qif-parse.c. It seems that they are not strictly necessary, but I still hope that they do not break stuff :-) Awaiting backport to branches/2.2.
branches/2.2@r16644. Thanks a lot!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=491581. Please update any external references or bookmarks.