Add user:price as a source and prefer values with lower PriceSource enum
values over higher ones: In other words a price with a lower PriceSource
value (e.g. user:price-editor) will overwrite one with a higher value (e.g.
user:split-register) and not the other way around.
Gnc-fq-helper will flip currency price quotes if the one requested is < 1
or not available, which might mean that it's not representable in 4 digits
to the right of the decimal.
Some currencies quotes are one-directional, so check both directions if
necessary. Quotes with values < 1 often have too few significant digits,
so in that case use the other direction if available.
Currency-currency prices will be priced in the smaller currency so that
the price > 1 and will be rounded to 3 digits after the decimal.
Commodity-currency prices will be priced in the currency and rounded to
the currency's scu * 10000.
This affects only prices stored in the pricedb. Prices in splits will
continue to be computed from value/amount.
For split-register and xfer-dialog generated prices if there's an existing
non-FQ price for the day, change it. If there's an F::Q quote for the day,
do nothing. Only add a price if there isn't one for the from/to
combination.
Add a new piechart report that groups by commodity and not by the
account hierarchy. This also refactors the existing piechart report
file a bit, to reuse code where possible and only abstract-out the
pieces that need to be generalised.
The existing code uses tuples to define the properties of the individual
reports created. Replace that by a function to build one of them which
gets the properties passed as arguments, and use a series of calls to
replace the old loop. This makes the properties much more easier to
read.
Set feature flag if book-currency option selected and initiate registered
callbacks when currency accounting book option changes to book-currency so that registers/reports can update themselves.
The changes made are:
app-utils/gnc-ui-util.c & h - define gnc_book_option_book_currency_selected_cb
core-utils/gnc-features.c & h - define GNC_FEATURE_BOOK_CURRENCY
engine/engine-helpers.c & h - define gnc_book_option_book_currency_selected
to call registered callbacks and set feature
gnome-utils/gnc-main-window.c & h - add checking of book-currency option to
gnc_book_options_dialog_apply_cb function; refactor common code with
assistant-hiearchy.c by creating gnc_book_options_dialog_apply_helper
gnome/assistant-hierarchy.c - use gnc_book_options_dialog_apply_helper