mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2003-01-25 Christian Stimming <stimming@tuhh.de>
* src/engine/Scrub.c (xaccTransScrubImbalance): Fix rounding of the imbalance amount, #104343. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7882 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
389f393d5b
commit
1a5c80e4ed
@ -1,5 +1,8 @@
|
||||
2003-01-25 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/engine/Scrub.c (xaccTransScrubImbalance): Fix rounding of
|
||||
the imbalance amount, #104343.
|
||||
|
||||
* po/en_GB.po: Updated British English translation by Nigel Titley
|
||||
<nigel@titley.com>.
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "TransactionP.h"
|
||||
#include "gnc-engine-util.h"
|
||||
#include "messages.h"
|
||||
#include "gnc-commodity.h"
|
||||
|
||||
static short module = MOD_SCRUB;
|
||||
static Account * GetOrMakeAccount (AccountGroup *root, Transaction *trans,
|
||||
@ -361,8 +362,12 @@ xaccTransScrubImbalance (Transaction *trans, AccountGroup *root,
|
||||
|
||||
new_value = xaccSplitGetValue (balance_split);
|
||||
|
||||
/* Note: We have to round for the commodity's fraction, NOT any
|
||||
* already existing denominator (bug #104343), because either one
|
||||
* of the denominators might already be reduced. */
|
||||
new_value = gnc_numeric_sub (new_value, imbalance,
|
||||
new_value.denom, GNC_RND_ROUND);
|
||||
gnc_commodity_get_fraction(currency),
|
||||
GNC_RND_ROUND);
|
||||
|
||||
xaccSplitSetValue (balance_split, new_value);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user