Bill Gribble's qif import patch.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2539 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-07-06 20:06:26 +00:00
parent 1b95eb61ea
commit d3b836ce6e

View File

@ -828,7 +828,8 @@
;; merge transaction fields
(let ((action (qif-xtn:action xtn))
(o-action (qif-xtn:action other-xtn))
(security (qif-xtn:security-name other-xtn))
(security (qif-xtn:security-name xtn))
(o-security (qif-xtn:security-name other-xtn))
(split (car splits))
(match-type (car how))
(match-splits (cdr how)))
@ -860,16 +861,22 @@
(cond
;; this is a transfer involving a security xtn. Let the
;; security xtn dominate the way it's handled.
((and (not action) o-action security)
((and (not action) o-action o-security)
(qif-xtn:mark-split xtn split)
(qif-import:merge-xtn-info xtn other-xtn)
(qif-split:set-matching-cleared!
(car match-splits) (qif-xtn:cleared xtn)))
((and action (not o-action) security)
(qif-xtn:mark-split other-xtn (car match-splits))
(qif-import:merge-xtn-info other-xtn xtn)
(qif-split:set-matching-cleared!
split (qif-xtn:cleared other-xtn)))
;; this is a security transaction from one brokerage to another
;; or within a brokerage. The "foox" xtn has the most
;; information about what went on, so use it.
((and action o-action security)
((and action o-action o-security)
(case o-action
((buyx sellx cgshortx cglongx intincx divx)
(qif-xtn:mark-split xtn split)