pricealist is a long list generated once, yet is dumped via gnc:debug
for every call to gnc:exchange-by-pricealist-nearest. This change
moves gnc:debug to the initial pricealist generation, ensuring that
gnc:exchange-by-pricealist-nearest is much faster.
This function converted to purely functional approach.
Note that commodity-collectors always round amounts to the currency
SCU therefore we replicate the behaviour here.
this test had confused 2 functions:
(exchange-fn monetary currency) --> monetary
and
(to-report-currency currency amount date) --> amount
this flaw surfaces with the shortened gnc:sum-collector-commodity definition.
When asset/liability/income/expense accounts are either missing or
deselected, the report would crash. This commit will ensure the
date-specific balance calculators do not crash.
The reason for crash is the form (apply map gnc:monetaries-add lists)
where lists is usually a list-of-list-of-monetaries, e.g.
(list (list $1.00 $2.00 $3.00)
(list $2.35 $3.44 $4.45))
and (apply map gnc:monetaries-add lists) will return a list of the
matched sums, i.e. commodity-collectors (list (list <$3.35> <$5.44>
<$7.45>)), whereby each commodity-collector is denoted by <...>
When there are missing account-types (or deselected) the lists are
empty-lists, therefore mapping will fail. This change ensures that
null-lists are handled by returning (list (list <> <> <>)), with null
commodity-collectors.
code sets date-option to today. it fails to set the default-value. the
date will reset when user click 'reset options', and this commit
ensures the 'today' date remains the default date.
Previous 9ed0174cb would place any entry with customername == "No
Customer" last, including genuine customers with this particular
name. This commit modifies to test on presence of owner-report-url to
detect owner/no-owner entries. This is reliable for this report.
The widget with the log messages didn't fill the space
in the dialog anymore. Probably a side-effect of 58465432,
but fixed now anyway.
Also, one label whose "translatable" attribute was removed
had to get it again.
view_selection_function added to only allow adding a row to the selection if GNCImport_Add is set for the transaction.
Explicit selection clearing
try explicitly clearing the row in the add, update and clear toggle callbacks - before refresh row and add debugging info which showed that the selection is called after exiting the above callbacks and as the view_selection_function has no knowledge that the add checkbox has just been toggled it allows the row to be selected. Requires a flag to be set in the add_toggle_cb which prevents selection in the view_selection_function and is cleared there.
Fix row being selected after A(dd)toggled
When the A is toggled on from U+R or R the row is automatically selected and if the row is toggled back to U+R or R selected, it cannot be unselected. Add a global add-toggled flag set in the gnc_gen_trans_add-toggled_cb and used in the treeview multiple selection function to prevent a row being selected immediately after the A has been toggled.
Fix to Multiple selection to ensure the match dialog comes up on double click on a reconciled or update row and implement a view_selection_function so that only rows flagged for addition can be added to a selection
Fixes requested by Bob-IT
removed global add_toggled variable and added it to _main_matcher_info structure. modified gnc_gen_trans_add_toggled_cb and view_selection_function to use the _main_matcher_info member.
* profit/sales/expense are sorted within currency groups. each group
is prepended by currency-mnemonic header. header is rendered only
if num(currencies) > 1.
* markup/customername have no currency grouping.
* customername sorting ensures 'No Customer' entries are last.
and all-accounts which will never be null? because it's made of
income-accounts and expense-accounts, and (null? income-accounts) has
already been handled by previous cond
* this is an optional upgrade -- (find-first-account type) will find
the first account of appropriate type; (find-first-account type
#:currency curr) will filter to appropriate currency too
If you have some blank lines, just newlines at the end of file and you
have an account column and do not remove them you will get an error
advising that there is no account column selected or account specified
so this change removes them from being parsed.
If the transactions are read only or voided and selected for editing a
blank split is added that allows you to change the transaction so in
these cases make the blank split read only.
Currently when you paste a split you can not cancel the changes as they
are already committed. By opening the transaction for editing before
the split paste the cancel option is now available.
Add some test for when cutting splits from transactions that prevent
the cutting of the anchor split and warn when the split is a reconciled
one or when cutting the transaction that it contains reconciled splits.