Hi,

Using 3.0.0-20100623 I'm confused about the proper way to deal with
rounding differences that occur due to the decimal precision provided
by a brokerage balance sheet.

This example:

$ cat test.dat
2010/01/01 Random Account
    Assets:Random:Account                           $1.00
    Equity:Opening Balances

2010/01/01 Brokerage
    Assets:Brokerage:Personal                       8490.490 A @ $1.00
    Assets:Brokerage:Personal                       1998.084 B @
$13.07
    Assets:Brokerage:Personal                        408.384 C @
$113.98
    Assets:Brokerage:Personal                        524.454 D @
$31.06
    Assets:Brokerage:Personal                        389.915 E @
$75.86
    Equity:Opening Balances

2010/02/01 Brokerage
    Assets:Brokerage:Personal                          3.270 C @
$114.67
    Assets:Brokerage:Personal                          4.895 E @
$76.61
    Assets:Brokerage:Personal                         11.992 D @
$31.27
    Assets:Brokerage:Personal                         28.824 B @
$13.01
    Assets:Brokerage:Personal                     -1,500.000 A @
$1.00

Generates a balance error warning:

$ ledger -f test.dat balance assets
While parsing file "test.dat", line 18:
While balancing transaction from "test.dat", lines 13-18:
> 2010/02/01 Brokerage
>     Assets:Brokerage:Personal                          3.270 C @ $114.67
>     Assets:Brokerage:Personal                          4.895 E @  $76.61
>     Assets:Brokerage:Personal                         11.992 D @  $31.27
>     Assets:Brokerage:Personal                         28.824 B @  $13.01
>     Assets:Brokerage:Personal                     -1,500.000 A @   $1.00
Unbalanced remainder is:
              $-0.03
Amount to balance against:
         $1499.96693
Error: Transaction does not balance

Is there something I should be doing to adjust the rounding?
Is there a way to specify "-1,500.00 A @ $fill.in.the.amount"
where ledger fills in the decimal points it needs?

An oddity I'll note is that if I remove the first transaction of the
three listed ("Random Account"), the error goes away.

Jim

Reply via email to