After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 491581 - Import 'Cash' Action (in Investment Accounts)
Import 'Cash' Action (in Investment Accounts)
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Import - QIF
2.2.x
Other All
: Normal enhancement
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: backport
 
 
Reported: 2007-10-30 01:22 UTC by Kevin Kleinfelter
Modified: 2018-06-29 21:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch to qif-parse.scm (23.55 KB, patch)
2007-12-01 05:52 UTC, Charles Day
rejected Details | Review
QIF test file for Cash, ContribX, WithdrwX transactions (734 bytes, application/octet-stream)
2007-12-01 11:31 UTC, Charles Day
  Details
Proposed patch (using diff -u this time) (612 bytes, patch)
2007-12-02 02:30 UTC, Charles Day
committed Details | Review

Description Kevin Kleinfelter 2007-10-30 01:22:06 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.
Comment 1 Charles Day 2007-12-01 05:49:16 UTC
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.)
Comment 2 Charles Day 2007-12-01 05:52:29 UTC
Created attachment 99952 [details] [review]
Proposed patch to qif-parse.scm
Comment 3 Charles Day 2007-12-01 05:56:55 UTC
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.
Comment 4 Charles Day 2007-12-01 11:31:25 UTC
Created attachment 99962 [details]
QIF test file for Cash, ContribX, WithdrwX transactions
Comment 5 Derek Atkins 2007-12-02 00:58:35 UTC
Charles, could you please attach a PATCH, not the whole file?
Comment 6 Charles Day 2007-12-02 02:30:44 UTC
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.
Comment 7 Andreas Köhler 2007-12-02 10:38:23 UTC
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.
Comment 8 Andreas Köhler 2007-12-14 22:02:40 UTC
branches/2.2@r16644.

Thanks a lot!
Comment 9 John Ralls 2018-06-29 21:53:26 UTC
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.