Look for orphan Splits even when there is no Transaction imbalance.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13466 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Chris Shoemaker 2006-03-04 02:42:49 +00:00
parent 10138bb1d3
commit 7921695276

View File

@ -407,14 +407,15 @@ xaccTransScrubImbalance (Transaction *trans, AccountGroup *root,
ENTER ("()");
/* If the transaction is balanced, nothing more to do */
imbalance = xaccTransGetImbalance (trans);
if (gnc_numeric_zero_p (imbalance)) return;
/* Must look or orphan splits even if there is no imbalance. */
xaccTransBeginEdit(trans);
xaccTransScrubSplits (trans);
xaccTransCommitEdit(trans);
/* If the transaction is balanced, nothing more to do */
imbalance = xaccTransGetImbalance (trans);
if (gnc_numeric_zero_p (imbalance)) return;
if (!account)
{
if (!root)