* improve documentation
* reuse (create-test-data) for various regular transactions
* run (create-test-invoice-data) for business invoices
* fix max arguments which would crash for reports without options
* if report has start-date and end-date, insert valid dates to ensure
report runs on non-null book data.
* enable testing of previously disabled reports
* also dump book and invoices generated in populated book
* modify output to show full backtrace on error: In case of test
failure, previous would show a shortened exception name. Change to
display full backtrace, similar to crashing in live code. Uses
gnc:apply-with-error-handling existing API call.
Also clean up code.
previously price-conversion with overall-period would fail when
considering the pricing date for the overall-period column. Use the
last date for the overall-period.
restore the analyze-splits function. previously it would run on an
empty splitlist (obtained via empty accounts for example) and crash
with div/0. this commit will break loop back to analyze-splits
function, and only call it if the splitlist is not null.
this function creates some business data. moved from test-invoice.scm
without the invoice-specific tests. verified all invoices/bills are
created correctly.
it returns a vector-list of the 8 invoices generated.
Changed MRO smallest-fraction to 100 based on information provided
by the reporter. ISO4217 has moved the MRO to the "Historical Currencies"
list that doesn't include CcyMnrUnits.
this can be used instead of delete-duplicates when the list must also
be sorted.
the main reason for this function will be for the upcoming aging.scm
report which will use it heavily to slice APAR splits into owner list.
This function helps to establish UI link from register split to an
owner's split. It should not be used anywhere else. Its use in reports
will be removed.
It is also unnecessarily complex -- it is called from an AP/AR account
register split, it should have all necessary information via split
metadata. e.g. this function *can* return a split owner if originating
from an Asset/Liability account which settles an invoice, but this
functionality is not used because there is no asset/liability register
hook to call it.
Try monetary-collector and value-collector printers earlier; output is
fixed and will be "coll<([$200.00])>" for commodity-collectors or
"coll<23>" for value-collectors
merges ideas from Phil Longstaff's ytd-budget.scm report. differences
from non-envelope budget:
* envelope budgeting accumulates bgt/act/diff amounts from period=0
e.g. selecting periods 2 to 4 means amounts must accumulate from
period 0 to 1 (not shown) and accumulated amounts 2 to 4 (shown).
* total column must encompass all periods from 0 to maxperiod
scm_c_string_length() returns the wrong answer when the C string is
UTF8: It returns the number of codepoints because the SCM string is in
UTF32, but we need the number of bytes for gtk_text_buffer_set_text.
Fortunately scm_to_utf8_string returns a null-terminated string so
we can just tell gtk_text_buffer_set_text to figure it out on its own.
Guile doesn't use g_malloc so don't use g_free, and gpointer* is a
void** so change the cast to void* for free.
this option is useless; it does not enforce currency conversion, it
was merely used for "Amount Due, XXX" currency-mnemonic. Remove this
option, and modify code to use invoice currency instead.