Properly round values when setting the Base Value. Fixes #337505.

(also fix a string, but the fixed string is already translated so
shouldn't be a problem).



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14317 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2006-06-04 05:15:08 +00:00
parent 9a27b5a625
commit 4abbcdee4e
3 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2006-06-03 Derek Atkins <derek@ihtfp.com>
* src/engine/Split.c:
Properly round values when setting the Base Value. Fixes #337505.
* src/business/dialog-tax-table/tax-tables.glade:
fix a string. It should be "Edit" not "gtk-edit". This string
is already translated, so shouldn't be an issue for the string
freeze.
2006-06-03 Joshua Sled <jsled@asynchronous.org> 2006-06-03 Joshua Sled <jsled@asynchronous.org>
* src/gnome/ui/gnc-plugin-page-register-ui.xml: * src/gnome/ui/gnc-plugin-page-register-ui.xml:
@ -21,6 +30,7 @@
register to change the notebook page, just like from the accounts register to change the notebook page, just like from the accounts
page. Also remove some dead code. page. Also remove some dead code.
>>>>>>> .r14316
2006-06-03 Andreas Köhler <andi5.py@gmx.net> 2006-06-03 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/Makefile.am: * src/gnome-utils/Makefile.am:

View File

@ -308,7 +308,7 @@
<widget class="GtkButton" id="edit_entry_button"> <widget class="GtkButton" id="edit_entry_button">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label">gtk-edit</property> <property name="label">Edit</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property> <property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>

View File

@ -925,15 +925,15 @@ xaccSplitSetBaseValue (Split *s, gnc_numeric value,
if (gnc_commodity_equiv(commodity, base_currency)) { if (gnc_commodity_equiv(commodity, base_currency)) {
s->amount = gnc_numeric_convert(value, s->amount = gnc_numeric_convert(value,
get_commodity_denom(s), get_commodity_denom(s),
GNC_HOW_RND_NEVER); GNC_HOW_RND_ROUND);
} }
s->value = gnc_numeric_convert(value, s->value = gnc_numeric_convert(value,
get_currency_denom(s), get_currency_denom(s),
GNC_HOW_RND_NEVER); GNC_HOW_RND_ROUND);
} }
else if (gnc_commodity_equiv(commodity, base_currency)) { else if (gnc_commodity_equiv(commodity, base_currency)) {
s->amount = gnc_numeric_convert(value, get_commodity_denom(s), s->amount = gnc_numeric_convert(value, get_commodity_denom(s),
GNC_HOW_RND_NEVER); GNC_HOW_RND_ROUND);
} }
else { else {
PERR ("inappropriate base currency %s " PERR ("inappropriate base currency %s "