gnucash/libgnucash/doc/prices.txt
Geert Janssens 4b3db97ba1 Merge branch 'maint'
Resolved conflicts:
	gnucash/report/report-system/html-document.scm
2017-08-21 21:53:27 +02:00

38 lines
1.4 KiB
Plaintext

/** \page pricedocs Price Overview
The Prices and the Price DB overview is in src/doc/design/engine.texinfo
API: \ref Price
Below, a few meta-notes about how prices and the GUI (should) interact:
\section pricecompute Computing Prices
When a price is computed from the (value/amt) that a user entered
in a register, and this price is stored in the priceDB, then
both the register entry and the price must have links to each other
(via the KVP trees) so that each can be found from the other.
This is needed because if the user enters an incorrect amt or value
or date in the transaction register, and then corrects it later,
possibly weeks or months later, the corresponding price in the
priceDB must be fixed as well.
Similarly, if a user deletes a transaction (possibly because it
contains an error in date/amt/value), then it is advisable that
the corresponding priceDB entry must be deleted as well (since
it is not safe to assume that the price is 'correct').
\section Rounding errors
When doing price math in the register, one must be careful, because
round-off errors can make 'obvious' math inaccurate. Note that if
we define price as (value/amt), then we will find that
value != price * amt due to roundoff handling. One must be careful
and consistent in handling this in the register, as otherwise
users will be driven crazy by inconsistent behaviour.
(Linas Vepstas April 2003)
*/