Importing QIF files without payee

Andreas Bogk andreas@andreas.org
11 Apr 2002 11:38:06 +0000


Hi!

When importing a QIF file, the Payee field in QIF becomes the
description of the transaction in Gnucash.

Now the QIF file I've tried to import contained empty Payee fields.
So even though useful information about the transaction was available
in the Memo field, the transaction description ended up empty.

Below is a patch that sets the description using the Memo field if the
Payee is empty.

The place where the transaction description gets set refers to bug
number 105.  Unfortunately the bug tracker interface seems to be
broken, it still refers to gnumatic.org, which is offline, so I
couldn't figure out if I've just fixed #105 or if that was something
totally unrelated.

Andreas

--- src/import-export/qif-import/qif-to-gnc.scm.orig Tue Apr  9 17:19:09 2002
+++ src/import-export/qif-import/qif-to-gnc.scm	     Tue Apr  9 17:53:56 2002
@@ -406,7 +406,11 @@
     (if qif-number
         (gnc:transaction-set-xnum gnc-xtn qif-number))
     (if qif-memo
-        (gnc:split-set-memo gnc-near-split qif-memo))
+	(begin
+	  (gnc:split-set-memo gnc-near-split qif-memo)
+	  (if (or (not qif-payee)
+		  (equal? qif-payee ""))
+	      (gnc:transaction-set-description gnc-xtn qif-memo))))
     
     (if (eq? qif-cleared 'cleared)        
         (gnc:split-set-reconcile gnc-near-split #\c))


-- 
"In my eyes it is never a crime to steal knowledge. It is a good
theft. The pirate of knowledge is a good pirate."
                                                       (Michel Serres)