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.
abort:
1. if too many splits lead to >1,000,000 reachable amounts
2. if the end_balance is the same as cleared_balance
also:
- g_free lists properly
- move knapsack algorithm to gnc-ui-balances.c
- show newly cleared splits in a new register: "Cleared Transactions"
- remove unneeded #includes
If a report is loaded with default settings and the 'Reset button' is
pressed the 'OK/Apply' buttons will be enabled which should not happen
as there are no changes to be made.
Fixed by resetting the changed flag on options load and then comparing
the current value to the default one when the 'Reset button' pressed.
If using the Check&Repair option from the Chart of Accounts on 'Account
Receivable or Payable' add has a voided transaction will cause an
infinite loop.
This occurs from checking the transaction split amount is zero in
gncScrubBusinessSplit and trying to delete it. As the transaction is
read only as a result of being voided this fails so add a further
condition for the 'else if' statement to include !is_void.
Add a callback for a keypress event when on the Accounts page that
checks for the Escape key and presents a dialog to confirm whether to
abort the Check&Repair. A similar dialog is used if you decide to quit
Gnucash while the Check&Repair is still running.
Price Database dropping user:price-editor entries.
A wider problem: QofInstance was unmarking itself dirty as long as the
backend raised an error and unconditionally marking itself non-infant.
This matters because the SQL backend depends on infant status to decide
whether to do an insert or update query; either will fail if the infant
status is wrong.
The price editor dialog clones a price having only its commodity set and
GncSqlPriceBackend declines to save if the currency isn't set. Since the
instance marked itself non-infant even though it wasn't saved subsequent
commits tried to use an update query and since the price wasn't in the
table that inevitably failed.
Requiring that QofBackend::commit should doing the marking-clean
required implementing it in the backends where it wasn't already.