mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/gnome-utils/dialog-transfer.c: don't round the exchange
rate when returning it to callers... Compute it from the from_amount and to_amount. * src/register/ledger-core/split-register.c: change the rate-cell to a shares_print_info so we don't lose accuracy due to rounding errors. Fixes bug #106332 git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8003 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
07f29eae51
commit
a3234ee702
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2003-02-17 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* src/gnome-utils/dialog-transfer.c: don't round the exchange
|
||||
rate when returning it to callers... Compute it from the
|
||||
from_amount and to_amount.
|
||||
* src/register/ledger-core/split-register.c: change the rate-cell
|
||||
to a shares_print_info so we don't lose accuracy due to rounding
|
||||
errors.
|
||||
Fixes bug #106332
|
||||
|
||||
2003-02-16 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/quotes: List HTML::TableExtract as an explicit requirement,
|
||||
|
@ -1398,15 +1398,14 @@ gnc_xfer_dialog_ok_cb(GtkWidget * widget, gpointer data)
|
||||
|
||||
if (xferData->exch_rate)
|
||||
{
|
||||
/* If the to_amount is active, then call the callback, just in case the
|
||||
* user hit "return" -- because the exit-focus signal handler was probably
|
||||
* not executed.
|
||||
*/
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (xferData->amount_radio)))
|
||||
gnc_xfer_to_amount_update_cb(xferData->to_amount_edit, NULL, xferData);
|
||||
gnc_numeric to_amt, from_amt;
|
||||
|
||||
from_amt = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT(xferData->amount_edit));
|
||||
to_amt = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT(xferData->to_amount_edit));
|
||||
|
||||
*(xferData->exch_rate) =
|
||||
gnc_numeric_abs(gnc_amount_edit_get_amount(GNC_AMOUNT_EDIT(xferData->price_edit)));
|
||||
gnc_numeric_abs (gnc_numeric_div (to_amount, amount, GNC_DENOM_AUTO,
|
||||
GNC_DENOM_REDUCE));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2101,14 +2101,12 @@ gnc_split_register_config_cells (SplitRegister *reg)
|
||||
((PriceCell *) gnc_table_layout_get_cell (reg->table->layout, TSHRS_CELL),
|
||||
gnc_default_share_print_info ());
|
||||
|
||||
/* Initialize the rate cells */
|
||||
gnc_price_cell_set_fraction
|
||||
((PriceCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, RATE_CELL), 1000000);
|
||||
|
||||
/* Initialize the rate cell
|
||||
* use a share_print_info to make sure we don't have rounding errors
|
||||
*/
|
||||
gnc_price_cell_set_print_info
|
||||
((PriceCell *) gnc_table_layout_get_cell (reg->table->layout, RATE_CELL),
|
||||
gnc_default_price_print_info());
|
||||
gnc_default_share_print_info());
|
||||
|
||||
/* The action cell should accept strings not in the list */
|
||||
gnc_combo_cell_set_strict
|
||||
|
Loading…
Reference in New Issue
Block a user