From 983c7ce0bcc310f030d39c7735b9ff743f0b0a3a Mon Sep 17 00:00:00 2001 From: John Ralls Date: Fri, 13 Jul 2018 10:41:33 -0700 Subject: [PATCH] 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. --- 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(-) diff --git a/gnucash/import-export/qif-imp/qif-dialog-utils.scm b/gnucash/import-export/qif-imp/qif-dialog-utils.scm index bdc9d19907..78f9373da2 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 f5d079495f..df74b48dc7 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))