This is done with minimal interpretation, to be able to easily
compare with the original scheme code.
It will most likely be optimized in future commits
Add a function to allow setting of the hexpand property of widget
GNCAccountSel and the combobox it is comprised off along with using
the function in various source files to set the hexpand property.
Currently the label is destroyed if not required but the grid column is
still present and as such uses the grid column spacing setting which
causes the date format to be offset, this can be seen in the print
cheque dialogue so instead remove the first column which has the label.
Change the dialog options to use a two column grid and setup to be the
same as other dialogs. In the first column there is the 'name' of the
option and the right column the 'option widget'. Also add the radio
button option to the examples report for testing.
* use fold, more efficient, removes the need for intermediate list
(map cdr (filter filter-fn accounts-balances)): filter will create 1
intermediate list, which is passed as an argument to map which
creates the final list. using fold will remove the need for
intermediate list.
* list->vector for O(1) access
* If currencies are not converted, Unrealized Gains are
meaningless. Hide them.
* If there are no income/expense accounts, retained earnings will be
nil. Remove row.
AQBanking6 uses a separate method for retrieving account numbers
for account info and transactions, where the transactions method can
have additional characters, most often the ISO4217 currency code. That
results in match failures when importing.
As a work-around, compare only the length of the account-info-generated
online id when comparing it to the transaction-generated one.
Note that this is only a partial solution: At least one German bank
also appends characters to the transaction-generated bank id and that
will still cause the match to fail.
Previous code would call gnc:account-get-comm-value-at-date for each
report-date; this function generates qof-query, retrieves account
splits, scans them to accumulate split->transaction->currency and
split->value into a commodity collector.
This commit will hook into the existing gnc:account-accumulate
function, accumulating the same split->transaction->currency and
split->value into a collector.
Note we must make a copy of the accumulator at each report-date
via (gnc:collector+ val-coll) otherwise the same val-coll will be
mutated through subsequent splits.
For a multicolumn balsheet, for every account with N old splits, and
reporting on M report dates, it would run in O(N*M) time. This
algorithm will hook into existing accumulator, i.e. I think O(1).
The majority speed-up however comes from avoiding M qof-queries per
report.
This commit adds tests for multicolumn balance-sheet and
income-statement. It mainly tests:
* multiple periods
* unrealized gains calculators
* amounts/balances are predictable
srfi-9 records can contain complex objects eg lists/vectors also
gnc:monetary or gnc:html-table objects. previously gnc:strify would
use the default printer; this commit modifies so that they are
prettified.
example output; a :col-datum record from balsheet-pnl. the record's
split-balance contains a $0 monetary object.
Rec::col-datum{last-split=#f, split-balance=[$0.00]}
this last pretty-printer must be the last one before object->string,
because we want previous printers which may be records too
eg. monetary->str etc to use their own printer.
When an account is selected for matching the incoming source, at the
moment any account can be selected apart from a place holder account.
If the required commodity is passed in, display a warning if the
selected account is a different commodity and disable the OK button.
On first load the Description and Memo columns are set to the width of
the longest piece of text which can force the Info column out of site
so add the 'ellipsize end' to the memo column which will help keep the
info column in view.
The Info column has a cell_render_pixbuf and a cell_render_text aligned
to the left. If the info column is made larger, the text does not keep
to the left so split them into there own columns.
When change a row to skipping it, a pixbuf is created with just a
vertical black line and looks odd. There is no reason to create a
pixbuf so change the value in the store to NULL. Do the same when
the 'match missing' is displayed.