From d52f44a8c7055a1c91477abacfae5130de9cf569 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sun, 6 Nov 2016 17:11:30 +0100 Subject: [PATCH] When juggling business splits while scrubbing set both value and amount With only value there were several warnings in the log file during scrubbing --- src/engine/gncOwner.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/engine/gncOwner.c b/src/engine/gncOwner.c index c55dd5c483..e8e62951f6 100644 --- a/src/engine/gncOwner.c +++ b/src/engine/gncOwner.c @@ -971,10 +971,12 @@ gncOwnerReduceSplitTo (Split *split, gnc_numeric target_value) rem_val = gnc_numeric_sub (split_val, target_value, GNC_DENOM_AUTO, GNC_HOW_DENOM_LCD); // note: values are of opposite sign rem_split = xaccMallocSplit (xaccSplitGetBook (split)); xaccSplitCopyOnto (split, rem_split); + xaccSplitSetAmount (rem_split, rem_val); xaccSplitSetValue (rem_split, rem_val); txn = xaccSplitGetParent (split); xaccTransBeginEdit (txn); + xaccSplitSetAmount (split, target_value); xaccSplitSetValue (split, target_value); xaccSplitSetParent (rem_split, txn); xaccTransCommitEdit (txn);