Handle template transactions that don't have any splits with empty credit
and debit strings and those having no set transaction account.
Set the concrete transaction commodity to the first found of:
The template transaction's commodity
The commodity of the first split with a credit or debit string
The commodity of the first split.
Test these scheduled transactions:
* 2 splits with fixed amounts "123"
* 2 splits with fixed amounts "0"
* 2 splits with empty amounts ""
Verify that automatically created scheduled transactions exist.
Enables full functionality for complex-boolean and multichoice-callback
options.
Note that setter-function callback isn't used in any GnuCash code so it
is not implemented and is not present in the register-callback functions.
The root cause of which is that on recent releases of GLib (recent
meaning 2.66 in the current Debian stable!) g_type_instance_get_private
looks in the wrong place for the private data. When running the script
in question it returned NULL and since the code didn't check for a valid
pointer, it crashed.
So this change replaces all calls to g_type_instance_get_private with
the function [type_prefix]_get_instance_private() added in glib-2.36
except for two register2 files that have been removed from master; those
are ignored to avoid unnecessary merge conflicts.
This scrubbing function calls xaccTransRollbackEdit which is
leaky. Instead of trying to fix xaccTransRollbackEdit which requires
superhuman skills, it's easiest to track the changes separately in a
GList, and use xaccTransBeginEdit/xaccTransCommitEdit only if
necessary.
tests TXN_TYPE_NONE in utest-Transaction.c
testing TXN_TYPE_INVOICE, TXN_TYPE_PAYMENT, and TXN_TYPE_LINK will
require valid posted invoices, so, are best tested in utest-Invoice.c
When a top level bayesian entry is deleted, the book is not marked
dirty and so the save button is not highlighted. Deleting individual
entries did mark book dirty.
Fixed in gnc_account_delete_all_bayes_maps by wrapping the deletion
with xaccAccountBeginEdit/CommitEdit block.
These functions depend on both libgnc-app-utils and libgnucash-guile,
creating a circular dependency when the app-utils bindings are added to
libgnucash-guile.