Re: [GNC] QIF format for StkSplit

2023-01-08 Thread Kalpesh Patel
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

Re: [GNC] QIF format for StkSplit

2023-01-06 Thread ml
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

Re: [GNC] QIF format for StkSplit

2023-01-06 Thread ml
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

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread john
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

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread David Reiser via gnucash-user
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)))

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread Ken Farley
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

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread ml
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

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread ml
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

Re: [GNC] QIF format for StkSplit

2023-01-05 Thread David Reiser via gnucash-user
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

[GNC] QIF format for StkSplit

2023-01-05 Thread ml
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