We need to compare the magnitudes of the remainder and the denominator
in order to round negative numbers correctly. Note that while gnc_numeric
is constrained to a positive denominator the C++ rounding functions cannot
assume that constraint in all cases.
Combined with the previous commit, this fixes
Bug 796949 - Incorrect conversion of 0,01 USD to EUR
So that the returned price tuple has the two commodities of interest
converted to a common currency. Before the first pair that that shared
any random currency would be returned, perhaps creating an absurd result.
When the csv preview page is first loaded the header combo will not
work till refreshed which can be done by selecting another separator.
By adding a g_idle_add to the preview_page_prepare to rebuild the table
the combos become active.
The assistant file page is made up of an embedded GtkFileChooser widget
and associated OK button which seems out of place. Remove the OK button
and use the selection-changed signal to control the 'Forward' button.
This function complements gnc_time64_get_day_begin/end. There was
time64CanonicalDayTime but this returned noon of the given day, where we
want 10:59am in most cases. I haven't changed time64CanonicalDayTime
directly as that may break assumptions in other parts of the code.
Instead I have created a new function that can be gradually introduced.
Use a variant of xaccParseAmount that allows to ignore the locale's positive_sign character
or the + sign if locale doesn't define a positive_sign character.
In a future redesign it would probably be better to replace use
of xaccParseAmount with some variant of the gnc-expression-parser
but that would require more that a few tweaks to get right.
The text option widget used for report options has only about 3 lines
visible currently and will not use any available space in the dialogue.
Change the packing for this widget to expand and fill the remaining
dialogue space. If there are more than one text option widget on a page
then the available space will be shared equally.
The Reconcile date column was being sorted by string instead of date
value. Added a sort function for ReconciledLastDate and use that for
the tree view column.
The date column was being sorted by string as opposed to date value.
Added an INT64 value to the model store to hold the time64 value and
use that for sorting the tree view date column.
The account tree view background colour does not update straight away
with the preference option so add gnc_tree_view_account_refilter to the
colour change call back to force a refresh.
With a register in journal mode and you use the
'move to blank transaction' button which puts the cursor in the
'blank split' and then immediately click on another transaction you
loose the ability to add any more transactions using the blank
transaction as there is no 'blank split'.
Test for the old_split being the 'blank split' before destroying.
When using the new hierarchy assistant, when you cancel or finish an
error is recorded in the trace file for invalid cast from GtkWindow to
GtkDialog. The cause is when removing the added book options which are
from a window and not a dialog so use 'gnc_options_dialog_destroy'
instead. This also fixes when after saving the file and you go straight
to File->Properties you get a blank book options dialogue.
date-posted to not be saved.
Check the stored GDate for being in the GncDateTime range as well
as the GDate range before returning it and check trans->date-posted
against INT64_MAX instead of 0 before changing it.
The first fix for this bug handled structs tm with ambiguous times.
This one fixes the GncDate constructor when the time is ambiguous
because it's in the DST-change hour, using the same add 3 hours,
construct the LDT, and subtract the 3 hours from the result.
The string constructor handles only simple-offset HH:MM timezones and so
is immune to the bug.