>>>>> Robert Lehmann <[email protected]> writes:
> The automatic transaction (1%) should generate a post of $0.04 and one of
> $0.03 (which it does!). Then, when adding those posts for balance/
> registers, it instead seems to sum up $0.044 and $0.033 (which is $0.077 and
> rounds up, instead of rounding down two times):
This is expected behavior. Ledger never rounds internally, as all values are
kept as rational numbers. It only converts them to decimal floating point --
and performs rounding -- to *display* figures; but never to perform math on
them.
If you want the kind of rounding you're describing, you can use this:
= /Expenses:Bug Fixes/
Liabilites:Refactoring (truncated(amount) * 0.01)
Be aware that doing so converts the amount to a floating point, performs the
truncation based on the visual characteristics of that commodity *as known at
the relevant point in the input stream*, and then converts the floating point
back to a rational.
I.e., such an automated transaction will be slow, although it's just O(N)
slow added to whatever time it takes now.
John