GNOME Bugzilla – Bug 342716
Stock Split creates "funds In" & "Funds Out" entries in Reconcile
Last modified: 2018-06-29 21:05:07 UTC
If you run Reconcile on an account (Stock) that contains a stock split, without any "cash in-leu", there is an entry in both reconcile columns. You can ignore the funds out for the reconcile, however this may also be related to the "Advanced Portfolio" also report funds out on the same account.
I've seen this. I'm not sure what it really means or what needs to happen, but it's confirmed.
It happens on any account where there's either a 0 amount or 0 value (I'm not sure which). It's not just stock accounts. Most likely it's because the code probably look like: for (iterate over splits) { if (gnc_numeric_negative_p(..)) contnue; process; } for (iterate over splits) { if (gnc_numeric_positive_p(..)) continue; } Which pulls the '0' amounts into both sets.
hmm... so what is the correct behavior here? 1. arbitrarily pick one column or the other for 0 amount/value txns? 2. ignore 0 amount/value txns? (resulting in them never being reconciled) 3. write documents explaining that this is what happens with 0 amount/value txns and let the user deal with it? 4. ??? (5. profit!)
I am not sure how to get these 0 based txns but the problem may lie with this bit of code from reconcile-view.c..... /* limit the matches to CREDITs and DEBITs only, depending on the type */ if (type == RECLIST_CREDIT) xaccQueryAddValueMatch(query, gnc_numeric_zero (), QOF_NUMERIC_MATCH_CREDIT, QOF_COMPARE_GTE, QOF_QUERY_AND); else xaccQueryAddValueMatch(query, gnc_numeric_zero (), QOF_NUMERIC_MATCH_DEBIT, QOF_COMPARE_GTE, QOF_QUERY_AND); If I am reading this right, the values are tested for being greater than or equal to zero and hence would appear in both lists.
True, we could just choose one to make GT instead of GTE so that 0-value only shows up on one side. This has bugged me in the past but never enough to do anything about it. :)
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=342716. Please continue processing the bug there and please update any external references or bookmarks.