This will allow us to group our reports in subdirectories and still
easily load them all with one command.
For now it still only loads from a single standard reports directory.
It can easily be extended by adding extra subdirectories to
the report-dirs variable in reports.scm
This required the report-register-hook related stuff to move somewhere else as
it was causing a circular dependency. I've moved it into report-system.scm
which should already be built by the time reports is used.
With this business-reports.scm is now only loading the business reports.
The end goal of this cleanup is to have all reports grouped in
subdirectories of the new 'reports' directory.
This first commit moves the standard reports
which mostly involves renaming several modules and targets.
The unrealized-gain calculator was flawed.
The fixed function is copied from balance-sheet.scm and adapted to
balsheet-pnl.scm vars.
This fixed function matches unrealized-gains amounts from
balance-sheet.scm
This is a usability upgrade.
This balsheet-pnl report does *not* enforce a report currency; it can
print, process and multilevel-total monetary amounts in their original
currency.
But a linked chart needs one. By default it uses global
report_currency which may not match the book's most used currencies.
This commit will scan the accountlist, retrieve the most common
currency used, and set it as the report-currency for the linked
chart.
The book-main-currency function *may* be upgraded to
report-utilities.scm in the future.
Case example:
* set gnc_default_report_currency to USD
* load book.gnucash with majority accounts in EUR, some in GBP
* run balsheet-pnl.scm - shows EUR and GBP amounts and mixed totals.
* click link to barchart - would not succeed because all amounts
converted to USD0.00. this commit will ensure barchart's target
currency is set to EUR thereby showing useful chart.
crash when involving foreign currency stocks.
Scheme's inexact->exact function just converts the floating-point
representation of a number into an exact rational (documented in the
API Reference, Simple Generic Data Types, Numerical data types, Exact
and Inexact Numbers), which isn't what we want.
We want the number converted to exact directly from the string and to do
that we have gnc-fq-helper preface it with #e.
* barchart should inherit the period selected. this requires
redefining the periodlist - we need the exact symbol to set the
barchart's period option.
* balsheet: disable barchart if period is disabled - it makes no sense
to create link to networth barchart for single-date balsheet
* reorder some options for better usability
* note this may affect saved-reports / saved-tabs but only those
running bleeding edge maint. I do not intend to make any further
options changes on this report.
When an account is selected it is checked for being a placeholder and
if it is a warning dialog was created. This was pointed out as being
disruptive so this change controls the sensitivity of the OK button and
displays a warning in the account picker dialog.
The imported_account_tree variable is only set when the 'start import'
button is pressed on assistant page 'QIF import' so only process the
undo from there.
Focus is already on the account entry so enable the use of the enter
key to proceed to the next page when you are finished changing the
account name for a qif file.
Once you have unloaded all files on the above page and go back Gnucash
will crash as it was using an invalid file, check for selected_file in
the ...import_account_prepare function.
On the page 'Qif files you have loaded' it is possible to unload files
and if all files are unloaded it was still possible to proceed so
disable the next button if no files are in the list.
Placeholder accounts do not allow transactions so when the account
picker dialog is presented, add an error dialog for placeholder
selection and a column to display that the account is a placeholder.
This bug has two elements, the first is that when you have a large
number of tradable commodities you get an assistant page for each one
and if too many you loose site of the assistant buttons. To fix this a
notebook was added to the tradable commodities assistant page with the
individual commodities being added to notebook pages.
The second part was that when editing these an intrusive dialogue was
being raised that displayed the same information as the tooltip which
blocked input. These were removed and the assistant next button enabled
when all entries are valid.