qif patch

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2467 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-06-14 04:08:38 +00:00
parent 765f8ea987
commit a293c1bf94
2 changed files with 16 additions and 11 deletions

View File

@ -154,6 +154,7 @@
;; S : split category ;; S : split category
((#\S) ((#\S)
(set! current-split (make-qif-split)) (set! current-split (make-qif-split))
(set! default-split #f)
(qif-split:set-category! current-split value) (qif-split:set-category! current-split value)
(qif-xtn:set-splits! (qif-xtn:set-splits!
current-xtn current-xtn
@ -192,6 +193,7 @@
(if (qif-xtn:date current-xtn) (if (qif-xtn:date current-xtn)
(qif-file:add-xtn! self current-xtn)) (qif-file:add-xtn! self current-xtn))
(set! current-xtn (make-qif-xtn)) (set! current-xtn (make-qif-xtn))
(set! current-split #f)
(set! default-split (make-qif-split))))) (set! default-split (make-qif-split)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -317,7 +319,6 @@
(qif-file:set-xtns! self (reverse (qif-file:xtns self))) (qif-file:set-xtns! self (reverse (qif-file:xtns self)))
return-val)) return-val))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; qif-file:process-opening-balance-xtn self xtn ;; qif-file:process-opening-balance-xtn self xtn
;; ;;
@ -395,6 +396,7 @@
(display elt)) (display elt))
lst)))))) lst))))))
(set! start-time (gettimeofday)) (set! start-time (gettimeofday))
(and (and
;; fields of categories. ;; fields of categories.
(check-and-parse-field (check-and-parse-field

View File

@ -579,11 +579,9 @@
(done #f)) (done #f))
(if bank-xtn? (if bank-xtn?
(let ((near (qif-xtn:from-acct xtn))) (begin
(set! far-acct-name (qif-split:category split)) (set! near-acct-name (qif-xtn:from-acct xtn))
(if near (set! far-acct-name (qif-split:category split)))
(set! near-acct-name near)
(set! near-acct-name (qif-file:default-account qif-file))))
(let ((qif-accts (let ((qif-accts
(qif-split:accounts-affected split xtn)) (qif-split:accounts-affected split xtn))
@ -596,11 +594,14 @@
;; transactions to match up. Quicken thinks the near ;; transactions to match up. Quicken thinks the near
;; and far accounts are different than we do. ;; and far accounts are different than we do.
(case action (case action
((intincx divx cglongx cgshortx miscincx miscexpx) ((intincx divx cglongx cgshortx miscincx miscexpx sellx)
(set! amount (- amount)) (set! amount (- amount))
(set! near-acct-name (qif-xtn:from-acct xtn)) (set! near-acct-name (qif-xtn:from-acct xtn))
(set! far-acct-name (qif-split:category split))) (set! far-acct-name (qif-split:category split)))
((xout sellx) ((buyx)
(set! near-acct-name (qif-xtn:from-acct xtn))
(set! far-acct-name (qif-split:category split)))
((xout)
(set! amount (- amount))))) (set! amount (- amount)))))
(set! amount (- amount commission)))) (set! amount (- amount commission))))
@ -775,6 +776,8 @@
(qif-xtn:mark-split xtn split) (qif-xtn:mark-split xtn split)
(qif-xtn:mark-split other-xtn other-split)))))) (qif-xtn:mark-split other-xtn other-split))))))
(define (qif-xtn:mark-split xtn split) (define (qif-xtn:mark-split xtn split)
(qif-split:set-mark! split #t) (qif-split:set-mark! split #t)
(let ((all-marked #t)) (let ((all-marked #t))