A "Feature" of MYSQL is that it allows C-style backslash escapes
in string constants and replaces them with the actual character
(e.g. \n is converted to 0x0a). This causes round trip problems
if the escape is one of the allowed ones and a MYSQL error if it
isn't.
Disable the feature so that MYSQL follows the SQL standard.
With the explicit prototypes not marked as static unit test builds on Debian
Buster (using buster-backports) fail with
error: testing::internal::ParamGenerator<TestCase*> gtest_InstantiationAutoClearTestAutoClearTest_EvalGenerator_() was declared extern and later static [-fpermissive]
According to the comment preceding the declaration the only intent of the
explicit prototype (in newer versions of googletest implicitly defined by the
GTEST macros) seems to be to silence a warning which would cause a build
failure on Ubuntu 18.04 when using -Werror.
Builds on Debian unstable seem to build just fine without this explicit
declaration, hence I consider it safe to just drop it. However, builds on
Ubuntu 18.04 then fail (see above).
Making the prototypes as static should make both build environments happy.
the trading account was created breaks GnuCash.
Introduces a new function, gnc_account_lookup_by_type_and_commodity
that does that, though it also looks at name for the one special case
of finding/creating the Namespace placeholder account. Adds a parameter
checkname to xaccScrubUtilityGetOrMakeAccount to flag whether to look
for the name.
Namespaces aside this makes it possible for the user to rename trading
accounts or securities independent of each other.
I've did a small bash script that retrieve the sources from gnc-fq-dump and try to find one source that has the specific stock. At that point I've noticed that the sources returned by Finance::Quote have always a different order. Just wondering if it is done in that way intentionally (?)
An internal (define) cannot be after a statement such
as (issue-deprecation-warning). This rule was strict in guile-2.2 but
relaxed in guile-3.0, hence, the mixed results in CI.
error is caused by pricedb containing an invalid gnc_numeric
price. multiplication of (invalid) price with amount causes a report
crash.
Fix: if invalid price, return zero for amount converted to report
currency.
When the above function is activated, the slot 'equity type' is used and
set in relation to opening balances and the checkbox for marking the
opening balance in the accounts dialog can be changed.
Up to now, opening balance accounts have been identified by means of
fixed names and their translations, which in some cases is not
appropriate.
With this commit, therefore, opening balance accounts can now be
identified by a special slot, which should solve the above problem.
in gnc_find_or_create_equity_account(), when querying the
EQUITY_OPENING_BALANCE type, the system now first searches for an
account with an existing 'equity-type' slot having the value
'opening-balance' and returns it as an opening balance account if
one exists. If no corresponding account is found, the search is
continued as before. An account found in the process is automatically
given the status of an opening balance account (it is given an
'equity-type' slot with value 'opening-balance') to simplify the
future search.
The opening balance status of an account is visualized in the account
settings dialog with a check box. If a Gnucash file does not yet contain
an opening balance account, one can be selected in the account settings
dialog.
https://bugs.gnucash.org/show_bug.cgi?id=797836
This is responsible for test failures on DST transition days.
See the comments in gnc-timezone.cpp for an explanation of why this is
correct. The rubric was tested on macOS, Arch Linux, Debian Unstable,
Fedora 33, and Ubuntu 18.04 to confirm universal applicability.