mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
When juggling business splits while scrubbing set both value and amount
With only value there were several warnings in the log file during scrubbing
This commit is contained in:
parent
0bcd30301e
commit
d52f44a8c7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user