Regarding

47 views
Skip to first unread message

John Wiegley

unread,
May 23, 2013, 5:12:45 AM5/23/13
to ledge...@googlegroups.com
I think test/regress/CAE63F5C-c.test comes from Bradley, which concerns this
incorrect output:

$272.67 Accrued
$-271.54 Assets
$6.45 Equity:Capital Gains
$5.32 Expenses
$-6.45 Income:Currency Conversion
--------------------
$6.46

The issue here is that there is a matter of rounding. This is very hard to
see even from the data file:

2012/08/22 Payment
Accrued €208.00 {=$1.3109} @ $1.2798689
Expenses €4.16 {=$1.2798689} @ $1.2798689
Assets $-271.54
Income:Currency Conversion $-6.45

But you can see if it if you run ledger reg --unround --lots:

...
Equit:Capital Gains $6.4544688 $-271.5355312
€4.16 {=$1.2798689}
€208.00 {=$1.3109}

-271.5355312 + (4.16 * 1.2798689) + (208 * 1.3109) = 6.4559234240, which is
why Ledger reports a rounding adjustment in the register report:

12-Aug-22 Payment Accrued $272.67 $272.67
Expenses $5.32 $277.99
Assets $-271.54 $6.45
..rrency Conversion $-6.45 0
<Adjustment> $0.01 $0.01
Equit:Capital Gains $6.45 $6.46

It _is_ a bug that the balance report does not show this adjustment, leading
to a balance total which does not sum. I do not like this bug. However,
getting this adjustment posting into the balance report will require a major
effort that I cannot consider for 3.0. It has to do with how differently
"revalued" postings are dealt with for the (historically-biased) register
report vs. the (today-biased) balance report.

I hope this resolves any confusion as to the output from this regression test,
and where the real bug lies. I've opened #964 to track this.

John
Reply all
Reply to author
Forward
0 new messages