Avoids allocating/g_free temporary strings when DOM text
exists. Replaces dom_tree_to_text() with dom_node_to_text() fast-path
for Account, Transaction, and Split string setters.
dom_tree_to_commodity_ref() is called for every transaction or
price. It created and destroyed a commodity only to read its namespace
and mnemonic when loading books. Rewrite to avoid creating temporary
commodity.
dom_tree_to_commodity_ref_no_engine () is called when creating
commodities.
Introduce get_commodity_ns_mnemonic() to parse namespace/mnemonic
directly, and use it in both code paths.
Instead of capitalized versions of the variables in gnc-filepath-utils.
The environment variables are documented in the wiki and are what the user
can change.
this optimisation will greatly reduce the search size. first, sort
splits by reverse absolute amount. then precompute the positive and
negative sum(amounts) of remaining splits. when exploring any branch,
if the target is falls outside the range remaining negative to
positive sums, then any combination of subsequent splits will not
reach target. bail early.
https://lists.gnucash.org/pipermail/gnucash-user/2025-November/118103.html
reported that GnuCash crashes when he runs it with GNC_HOME=<somewhere
random>. We use GNC_HOME to set XDG_DATA_DIR in the environment file to
accommodate relocating GnuCash on macOS and Windows and GnuCash crashes
when the schemas aren't found.
This commit prevents the user from setting the 6 special environment
variables either from the environment or by editing the environment file.
instead of vice-versa.
- avoids malloc/free in gnc_gdate_set_today
- avoids unnecessary dmy->julian->dmy(*) conversion
(*) the GDate is typically used by gdate_to_time64 which performs a
julian->dmy conversion, and this is now avoided
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