mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bill Gribble's qif patch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2486 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4ceb48fe4b
commit
b8f5a6b41f
@ -97,7 +97,8 @@
|
||||
|
||||
;; T : total amount
|
||||
((#\T)
|
||||
(qif-split:set-amount! default-split value))
|
||||
(if default-split
|
||||
(qif-split:set-amount! default-split value)))
|
||||
|
||||
;; P : payee
|
||||
((#\P)
|
||||
@ -129,13 +130,14 @@
|
||||
|
||||
;; M : memo
|
||||
((#\M)
|
||||
(qif-split:set-memo! default-split value))
|
||||
(if default-split
|
||||
(qif-split:set-memo! default-split value)))
|
||||
|
||||
;; I : share price (stock transactions)
|
||||
((#\I)
|
||||
(qif-xtn:set-share-price! current-xtn value))
|
||||
|
||||
;; Q : share price (stock transactions)
|
||||
;; Q : number of shares (stock transactions)
|
||||
((#\Q)
|
||||
(qif-xtn:set-num-shares! current-xtn value))
|
||||
|
||||
@ -149,7 +151,8 @@
|
||||
|
||||
;; L : category
|
||||
((#\L)
|
||||
(qif-split:set-category! default-split value))
|
||||
(if default-split
|
||||
(qif-split:set-category! default-split value)))
|
||||
|
||||
;; S : split category
|
||||
((#\S)
|
||||
@ -261,7 +264,7 @@
|
||||
((#\D)
|
||||
(qif-cat:set-description! current-xtn value))
|
||||
|
||||
;; E : is this a taxable category?
|
||||
;; T : is this a taxable category?
|
||||
((#\T)
|
||||
(qif-cat:set-taxable! current-xtn #t))
|
||||
|
||||
@ -273,8 +276,7 @@
|
||||
((#\I)
|
||||
(qif-cat:set-income-cat! current-xtn #t))
|
||||
|
||||
;; R : what is the tax rate (from some table?
|
||||
;; seems to be an integer)
|
||||
;; R : tax form/line designator
|
||||
((#\R)
|
||||
(qif-cat:set-tax-class! current-xtn value))
|
||||
|
||||
|
@ -400,8 +400,9 @@
|
||||
(gnc-far-split (gnc:split-create)))
|
||||
|
||||
(if (not num-shares) (set! num-shares 0.0))
|
||||
(if (not split-amt) (set! split-amt 0.0))
|
||||
|
||||
(if (not share-price) (set! share-price 0.0))
|
||||
(if (not split-amt) (set! split-amt (* num-shares share-price)))
|
||||
|
||||
;; I don't think this should ever happen, but I want
|
||||
;; to keep this check just in case.
|
||||
(if (> (length splits) 1)
|
||||
@ -442,14 +443,18 @@
|
||||
(gnc:split-set-share-price gnc-near-split share-price)
|
||||
(gnc:split-set-share-price gnc-far-split share-price)
|
||||
(gnc:split-set-share-amount gnc-near-split num-shares)
|
||||
(gnc:split-set-share-amount gnc-far-split (- num-shares)))
|
||||
(gnc:split-set-share-amount gnc-far-split (- num-shares))
|
||||
(gnc:split-set-base-value gnc-near-split split-amt currency)
|
||||
(gnc:split-set-base-value gnc-far-split (- split-amt) currency))
|
||||
|
||||
((sell sellx)
|
||||
(if (not share-price) (set! share-price 0.0))
|
||||
(gnc:split-set-share-price gnc-near-split share-price)
|
||||
(gnc:split-set-share-price gnc-far-split share-price)
|
||||
(gnc:split-set-share-amount gnc-near-split (- num-shares))
|
||||
(gnc:split-set-share-amount gnc-far-split num-shares))
|
||||
(gnc:split-set-share-amount gnc-far-split num-shares)
|
||||
(gnc:split-set-base-value gnc-near-split (- split-amt) currency)
|
||||
(gnc:split-set-base-value gnc-far-split split-amt currency))
|
||||
|
||||
((cgshort cgshortx cglong cglongx intinc intincx div divx
|
||||
miscinc miscincx xin)
|
||||
@ -495,7 +500,9 @@
|
||||
(/ share-price splitratio))
|
||||
(gnc:split-set-share-price gnc-far-split share-price)
|
||||
(gnc:split-set-share-amount gnc-near-split out-shares)
|
||||
(gnc:split-set-share-amount gnc-far-split (- in-shares))))
|
||||
(gnc:split-set-share-amount gnc-far-split (- in-shares))
|
||||
(gnc:split-set-base-value gnc-near-split (- split-amt) currency)
|
||||
(gnc:split-set-base-value gnc-far-split split-amt currency)))
|
||||
(else
|
||||
(display "symbol = " ) (write qif-action) (newline)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user