After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342716 - Stock Split creates "funds In" & "Funds Out" entries in Reconcile
Stock Split creates "funds In" & "Funds Out" entries in Reconcile
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: General
git-master
Other Linux
: Normal normal
: ---
Assigned To: Chris Lyttle
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2006-05-23 16:31 UTC by dvherman
Modified: 2018-06-29 21:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description dvherman 2006-05-23 16:31:50 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.
Comment 1 Andrew Sackville-West 2007-12-14 18:14:07 UTC
I've seen this. I'm not sure what it really means or what needs to happen, but it's confirmed.
Comment 2 Derek Atkins 2008-01-23 15:27:15 UTC
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.
Comment 3 Andrew Sackville-West 2008-08-15 00:33:42 UTC
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!)

Comment 4 Bob 2012-08-18 11:39:00 UTC
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.
Comment 5 Derek Atkins 2012-08-20 13:39:08 UTC
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. :)
Comment 6 John Ralls 2018-06-29 21:05:07 UTC
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.