gnucash maint: Bug 796579 - Cannot go forward with empty duplicates screen

John Ralls jralls at code.gnucash.org
Fri Jul 13 13:41:52 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/983c7ce0 (commit)
	from  https://github.com/Gnucash/gnucash/commit/756f444a (commit)



commit 983c7ce0bcc310f030d39c7735b9ff743f0b0a3a
Author: John Ralls <jralls at ceridwen.us>
Date:   Fri Jul 13 10:41:33 2018 -0700

    Bug 796579 - Cannot go forward with empty duplicates screen
    
    Set the key name to (default-unspec-acct) for the case where both payee
    and memo are blank so that it can be found, then
    look for that key in the right hash, qif-memo-map, instead of looking for
    cat (already known to be "") in the wrong hash, qif-cat-map.

diff --git a/gnucash/import-export/qif-imp/qif-dialog-utils.scm b/gnucash/import-export/qif-imp/qif-dialog-utils.scm
index bdc9d19..78f9373 100644
--- a/gnucash/import-export/qif-imp/qif-dialog-utils.scm
+++ b/gnucash/import-export/qif-imp/qif-dialog-utils.scm
@@ -586,6 +586,8 @@
                                (begin
                                  (set! entry (make-qif-map-entry))
                                  (qif-map-entry:set-qif-name! entry key-string)
+                                 (if (string=? key-string "")
+                                     (set! key-string (default-unspec-acct)))
                                  (qif-map-entry:set-gnc-name!
                                   entry (default-unspec-acct))
                                  (qif-map-entry:set-allowed-types!
diff --git a/gnucash/import-export/qif-imp/qif-to-gnc.scm b/gnucash/import-export/qif-imp/qif-to-gnc.scm
index f5d0794..df74b48 100644
--- a/gnucash/import-export/qif-imp/qif-to-gnc.scm
+++ b/gnucash/import-export/qif-imp/qif-to-gnc.scm
@@ -587,7 +587,9 @@
                                     (not (string=? memo ""))
                                     (hash-ref qif-memo-map memo))))
                      (if (not far-acct-info)
-                         (set! far-acct-info (hash-ref qif-cat-map cat)))))
+                                (set! far-acct-info
+                                      (hash-ref qif-memo-map
+                                                (default-unspec-acct))))))
 
                    (set! far-acct-name (qif-map-entry:gnc-name far-acct-info))
                    (set! far-acct (hash-ref gnc-acct-hash far-acct-name))



Summary of changes:
 gnucash/import-export/qif-imp/qif-dialog-utils.scm | 2 ++
 gnucash/import-export/qif-imp/qif-to-gnc.scm       | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list