Fixes a generic bug in gnc_module_init_backend_dbi() when HAVE_LIBDBI_R is defined. Specifically, when the initial dbi_initialize_r() returns no drivers, the dbi_instance variable is still set.
g_build_filename claims that on Windows is uses the separator that last previously occurred
in the parameters, but it looks only at the first character of each parameter to see if it's
a separator. On Windows the leading character is a letter even on absolute paths so
g_build_filename(sysconfdir, PROJECT_NAME, NULL) finds no separator and uses the Windows
default "\\", but in the test function gnc_file_path_relative_part returns "/etc" so
g_build_filename uses "/" for the project name separator. By explicitly inserting
G_DIR_SEPARATOR_S before PROJECT_NAME we force the same separator and the test passes on
Windows.
To mitigate potential impact, the Imbalance split is only removed when the split transitions to zero value during the commit of the transaction and the split's memo and action have no value.
Bug 799652 - Invoice price decimal places
The "+ 2 places" should only be applied when force decimal is enabled.
Update gnc-ui-util.cpp
Update test-balsheet-pnl.scm
Update test-ifrs-cost-basis.scm
Update test-invoice.scm
foreign-currency transaction into a trading account transaction.
Disable scrubbing while committing the new trading split, otherwise
the recursed scrub will delete it causing a crash when GnuCash tries
to populate it.
Instead of setlocale(LC_ALL, NULL). The uses for the string either create
an ICU locale or sort between German and US TXF reports. On some OSes
where the user has different locales set for one or more categories LC_ALL
produces a dump of all of the LC_FOO variables and their values. That's
not useful for comparing to de_DE and it's too long for ICU, which
crashes.
Meanwhile in dialog-print-checks the RV of setlocale was ignored,
rendering the call a no-op.
The first-line cause of the bug was that the safe save was failing on
SQLite3 because the backup tables weren't visible inside the
transaction and that prevented them from being dropped. Commit the
transaction before trying to drop the backup tables.
https://bugs.gnucash.org/show_bug.cgi?id=799623 identified a problem
with int64_t storage in SQLite3 by setting a date after 2038-01-23
whose time64 overflowed int32_t. But dates shouldn't be stored as
time64s, they should be stored as ISO 8601 date-time strings. So fix
the test to store the date correctly and to store the big int as an
int64_t.
instead of strcmp. strcmp does a byte-by-byte numerical
comparison, not an alphabetical one (e.g. A > e).
Also fix the transposed args in the strstr call in
gnc_unicode_has_substring_identical.
zeros when entering stocks.
Preserve the decimal point when printing numbers with no decimal
places to stop the auto-decimal code from triggering when exiting the
field.
And as a side benefit don't leak signal handlers for the repGncFreq
changed signal.
The crash occured because gnc_frequency_setup_recurrence first calls
gnc_date_edit_set_gdate which emits a changed signal that, if it
wasn't the first call to loan_rep_prep would call
update_repayment_formula_cb and that would generate a new recurrences
list. But the still running gnc_frequency_setup_recurrence still had a
pointer to the old list and when it tried to manipulate it it would
crash.
This change disconnects the previous signal handler preventing the
list from being replaced.
Boost Process 1.88 defaults to the new V2 API introduced in Boost
1.81. https://repology.org/project/boost/versions shows that distro
support for boost 1.81 and later is spotty at best so we won't be able
to migrate to v2 until that improves.
Leverages the FakePrefsBackend from the previous commit to change the
fiscal year for testing.
Makes now_t a defaulted parameter of gnc_relative_date_to_time64 so
that we can inject different reference dates for testing.
This restores the expected precondition for the quarter tests of the
Accounting Period being the current calendar year, replacing the
today-relative quarter begin and end dates.
Only the quarter's start month in reports is adjusted when Absolute is selected in the Start Date on the Accounting Period preferences. This branch adjusts both the quarter's start day and month when Absolute is selected or when Relative and Today, Start of this month, or Start of previous month are selected.
Chris Lam pointed out that the original algo would crash if a
transaction had more than one split in the account being deleted.
Deduplicate the transaction vector first to protect against that.
Also suspend qof events for a 4x speedup.
New function xaccAccountDeleteAllTransactions.
Delete all transactions before deleting the account; simply deleting the
splits during account destruction isn't safe. In the particular case of an
imbalance account the transaction commit after deleting a split just makes
a new one.
Make the behaviour when the "Jump" operation encounters a transaction with
more than two splits configurable.
This can be configured as:
* Do nothing (this is the default)
* Use the split with the largest value
* Use the split with the smallest value
This makes it much easier to jump between accounts for stock transactions
that include splits for fees and taxes, or dividend transactions that have
a zero value split for the stock account.
The "=" in the widget name will separate the pref name from the enum
string value that is used when the radio button is activated. When the
radio button is deactivated, its preference update is ignored because
another button must have been made active.
clear lock on the origin SQL book.
GncDbiSqlConnection::unlock_database function errored out if the last
dbi interaction resulted in an error, even if it was a harmless index
out of range. Ignore index out of range errors.