With ledger v3, I have the following error when using -J option (while
ok with ledger v2)
I inlined comment below starting with '#' character
Thierry
$ cat test3.ledger
D 1000,00 €
1994/1/1 Company
Assets:Checking 10000 F
Income:Salary
1998/1/1 Transfer
Assets:US account 200 $
Assets:Checking -1000 F
P 1998/12/31 $ 6 F
1999/1/1 Books
Expenses:Books 200 $
Assets:US account
P 2002/1/1 F 0,15244901723741037903399155737342539221320909754755 €
2002/1/1 Company
Assets:Checking 2000 €
Income:Salary
$ ledger -v
Ledger 2.6.2, the command-line accounting tool
$ ledger3 -v
Ledger master-0-ge3c8b91, the command-line accounting tool
$ ledger3 -f test3.ledger -J reg Assets
While evaluating value expression:
quantity(scrub(display_total))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Cannot convert a balance with multiple commodities to an amount
1994-01-01 10000
$ ledger3 -f test3.ledger -V -J reg Assets
While evaluating value expression:
quantity(scrub(display_total))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Cannot convert a balance with multiple commodities to an amount
1994-01-01 10000
1998-01-01 11000
1998-01-01 10000
1999-01-01 10200
1999-01-01 9000
# above, I get error with ledger v3
# below, output from ledger 2.6.2
$ ledger -f test3.ledger -J reg Assets
1994/01/01 10000
1998/01/01 10200
1998/01/01 9200
1999/01/01 9000
2002/01/01 11000
$ ledger -f test3.ledger -V -J reg Assets
1994/01/01 10000
1998/01/01 11000
1998/01/01 10000
1999/01/01 9000
2002/01/01 3372.04
# I do not know it this is the expected result for "ledger -J reg
Assets", but acutally amount are added whatever the currency : 9000 F
+ 2000 € becomes 11000
I have digged further on this one.
I have moved to the beginning of the file the "P" directives, and I
have set them a date that is prior to the dates of the transactions.
But I still do not get the expected results.
Is there a way to obtain the expected resuts?
Thierry
| | ledger v2 | ledger v3 | expected
resuts |
|------------+-----------+-----------
+-----------------------------------|
| 1994-01-01 | 1524,49 | 1524,49 | 1524,49 =
10000*0,152449 |
| 1998-01-01 | 1724,49 | 1724,49 | 1554,98 = 1524,49 +
200*0,152449 |
| 1998-01-01 | 1524,49 | 1524,49 | 1524,49 = 1554,98 -
200*0,152449 |
| 1999-01-01 | 1324,49 | 1324,49 | 1494 = 1524,49 -
200*0,152449 |
| 2002-01-01 | 3324,49 | 3324,49 | 3494 = 1494 +
2000 |
$ cat test3euro.ledger
D 1000,00 €
P 1993/12/31 $ 1 €
P 1993/01/01 F 0,152449 €
1994/1/1 Company
Assets:Checking 10000 F
Income:Salary
1998/1/1 Transfer
Assets:US account 200 $
Assets:Checking
1999/1/1 Books
Expenses:Books 200 $
Assets:US account
2002/1/1 Company
Assets:Checking 2000 €
Income:Salary
$ ledger3 -f test3euro.ledger -J reg Assets
While evaluating value expression:
quantity(scrub(display_total))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Cannot convert a balance with multiple commodities to an amount
1994-01-01 10000
$ ledger3 -f test3euro.ledger -J -V reg Assets
1994-01-01 1524,49
1998-01-01 1724,49
1998-01-01 1524,49
1999-01-01 1324,49
2002-01-01 3324,49
$ ledger -f test3euro.ledger -J reg Assets
1994/01/01 10000
1998/01/01 10200
1998/01/01 10000
1999/01/01 9800
2002/01/01 11800
$ ledger -f test3euro.ledger -J -V reg Assets
1994/01/01 1524.49
1998/01/01 1724.49
1998/01/01 1524.49
1999/01/01 1324.49
2002/01/01 3324.49
$ ledger -v
Ledger 2.6.2, the command-line accounting tool
$ ledger3 -v
Ledger master-0-g5471370, the command-line accounting tool