mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix xaccSplitGetOtherSplit which was broken by 028bf9826
, don't
count splits that aren't really in the transaction. The rewrite left out one test. This was most obvious in the dummy transaction used to enter a new transaction into an account. xaccSplitGetOtherSplit never returned an "other split" for this transaction. It turns out the old code was broken too, but it worked for this case by coincidence.
This commit is contained in:
parent
4afe5d83cf
commit
068a5d2fa8
@ -2107,6 +2107,7 @@ xaccSplitGetOtherSplit (const Split *split)
|
||||
{
|
||||
Split *s = n->data;
|
||||
if ((s == split) ||
|
||||
(!xaccTransStillHasSplit(trans, s)) ||
|
||||
(xaccAccountGetType (xaccSplitGetAccount (s)) == ACCT_TYPE_TRADING) ||
|
||||
(qof_instance_has_slot (QOF_INSTANCE (s), "lot-split")))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user