1:28 -0600
From: m...@tgr66.me
To: gnucash-user@gnucash.org
Subject: [GNC] QIF format for StkSplit
Message-ID: <7a1892d0-5538-4140-8fd7-e18904494...@tgr66.me>
Content-Type: text/plain; charset=utf-8
I?ve searched considerably, but if I missed it, I apologize.
Docs for QIF say the Q fi
Yes. In my GnuCash the original shares are removed in one transaction, and the
newly calculated amount (based on the split) is added in a second transaction.
In my Quicken, when I recorded a split, the additional shares (in this case, a
4 for 1 of APPL) were recorded.
But my original question
I appreciate the analysis of the code, and the confirmation of what I found
through experimentation. I had tried searching the code for the answer, but I
do not know C/C++ and I would not have been able to figure it out.
I’d be happy to write a paragraph documenting how a QIF entry for a
gnc_numeric_create is a C function implemented in
libgnucash/engine/gnc-numeric.cpp and made available to Scheme by SWIG which
changes its name to gnc-numeric-create. It takes two int64_t arguments,
numerator and denominator.
There's a general convention that public functions defined in Scheme
bug, maybe?
import-export/qif-imp/qif-to-gnc.scm says:
((stksplit)
(let* ((splitratio (n/ num-shares (gnc-numeric-create 10 1)))
(in-shares
(xaccAccountGetBalance near-acct))
(out-shares (n* in-shares splitratio)))
When I was doing a bunch of Quicken conversions using QIF files, what
happened was pretty much what you described here, I think. My original
shares were removed in one transaction, while the split amount was added
back. For example, 200 shares that needed at 2 for 1 resulted in a 200
share
So, the ratio * 10 does seem to be working. :man_shrugging:
For example, if it is a 4 for 1 split, 40
If it is a 1 for 10 split, 1
> On Jan 5, 2023, at 14:17, m...@tgr66.me wrote:
>
> Yes. I missed adding that to the list I’ve tried.
>
> In the full work minimal example below, the share
Yes. I missed adding that to the list I’ve tried.
In the full work minimal example below, the share balance ends up at 1.2
!Account
NAssets:Investments:Brokerage Account:Joint Brokerage
TInvst
^
!Type:Bank
D01/11/2020
NPayment/Deposit
PTrf My Bank
CX
T1,000.00
MDeposit
LAssets:Current Assets:My
I’ve never used QIF for stock splits, but the obvious question is “Have you
tried Q4?” After all, 4/1 is numerically equal to 4 (a ratio reduced to a
single number).
--
Dave Reiser
dbrei...@icloud.com
> On Jan 5, 2023, at 2:51 PM, m...@tgr66.me wrote:
>
> I’ve searched considerably, but if
I’ve searched considerably, but if I missed it, I apologize.
Docs for QIF say the Q field should contain the split ratio. I’ve tried various
options, but I’m not getting the expected results after import.
!Type:Invst
D8/31/2020
NStkSplit
PAPPLE INC
YAAPL
CR
M4 for 1 split;
Q36 // Have also
10 matches
Mail list logo