This change made it impossible to turn debug output on or off on the
fly by calling qof-log-set-level from Scheme code. The optimization
achieved isn't all that great either since the arguements to
gnc:debug are still evaluated when debugging is off and this is
where a lot of the overhead is. Even without this change the call to
strify is avoided.
Also fixed the parameters of qof-log-check:
"gmc" => "gnc.scm"
G-LOG-LEVEL-DEBUG => QOF-LOG-DEBUG
This reverts commit b3a4cd6277.
In get_first_pass_probabilities() function
qof_instance_foreach_slot_prefix() is called with a prefix path
including closing slash after token now. This avoids, that also entries
with token as a substring are included in token info, where key only
starts with token.
Finally function build_token_info() checks, if the key suffix after the
token consists only of the GUID. This avoids, that also entries with the
same prefix and slashes are included in token info.
Provided function func is now called with key suffix only instead of
full key (prefix is omitted). This is neccessary for fixing function
build_token_info() in the next commit.
Update on this bug. Before doing the binreloc dance on various
paths check if the calculated dynamic prefix is still the same
as the compile time PREFIX. If so, just stick with the compile
time path names as this means the application wasn't relocated
anyway. Only if the dynamic prefix is different, try to
recalculate the requested paths relative to the dynamic
prefix.
Together with the configure time fix to detect /etc/opt is
outside of the /opt prefix, this eliminates the need for further
special case handling of the sysconfig directory so that
special case handling is removed.
This starts by setting the gnucash version number in the 'project' call.
This will result in a number of variables set by cmake. The remainder
of this commit is to reuse the auto-generated
PROJECT_NAME, PROJECT_VERSION, PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH and PROJECT_VERSION_TWEAK
instead of all the various instances of PACKAGE, GNUCASH_MAJOR_VERSION
and so on.
One parameter is worth mentioning - GETTEXT_PACKAGE
GnuCash is not using this directly (any more) but it has to be set before
including gi18n-lib.h.
On recommendation of the Translation Project's Benno Schulenberg.
Required re-annotating some comments. Also removed several comments
about leaving a line break to prevent inserting it into gnucash.pot.
That didn't actually work: they were inserted anyway.
Change of algorithm to display invoice->payments.
Previously: invoice->lot->splitlist; filtered to payments; retrieve
splits->parent->xaccPaymentAcctSplitList This would find payment
splits in originating currency.
But this fails for lot-link txns whose PaymentAcctSplitList is null.
New algorithm:
- invoice->lot->split-list, each lot-split analysed
- TXN-TYPE-PAYMENT lot-splits will query TransferAcct and each will be
rendered in the originating currency, if they haven't been encountered
before in this invoice.
- TXN-TYPE-LINK lot-splits are rendered as a generic 'Offset
Documents' link to lot-link splits. This helps link invoice to the
link transaction to locate the corresponding credit-note. It is not
possible to link to the corresponding credit-note because a
link-transaction can group many invoices to many credit-notes.
Also:
Increase right-hand-side links from 3 to 4 columns. I think it's quite
useful to add 'Credit Note' 'Invoice' 'Payment' as a separate
column.
In the budget view there is no option to add the account code column
which some uses use for sorting their accounts. This commit introduces
a feature flag to be used in version 4.0 but if set in 3.8 will hide
the new account code column so the view is not disrupted.
introduce new API
* gnc_using_unreversed_budgets - queries book's unreversed feature
* gnc_reverse_budget_balance - check if book unreversal status matches
2nd argument. if so, return account's reversal status. else, return
FALSE.
* gnome-budget-view can now show both natural and reversed budgets
* gnome-plugin-page-budget will now read&write both natural and
reversed budgets.
because:
* list? is O(N), because it needs to test for an improper
list. improper lists are lists whose last pair's cdr cell is not
'(). null? and pair? are both O(1).
* avoids reverse which is also O(N): guile has unlimited stack
therefore we can do non-tail-call loop first to pass as parameter to
the tail-call loop. this removes the need for prepend-and-reverse.