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.
This commit is contained in:
John Ralls 2018-07-13 10:41:33 -07:00
parent 756f444ac3
commit 983c7ce0bc
2 changed files with 5 additions and 1 deletions

View File

@ -586,6 +586,8 @@
(begin (begin
(set! entry (make-qif-map-entry)) (set! entry (make-qif-map-entry))
(qif-map-entry:set-qif-name! entry key-string) (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! (qif-map-entry:set-gnc-name!
entry (default-unspec-acct)) entry (default-unspec-acct))
(qif-map-entry:set-allowed-types! (qif-map-entry:set-allowed-types!

View File

@ -587,7 +587,9 @@
(not (string=? memo "")) (not (string=? memo ""))
(hash-ref qif-memo-map memo)))) (hash-ref qif-memo-map memo))))
(if (not far-acct-info) (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-name (qif-map-entry:gnc-name far-acct-info))
(set! far-acct (hash-ref gnc-acct-hash far-acct-name)) (set! far-acct (hash-ref gnc-acct-hash far-acct-name))