I have narrowed this one, but I still do not understand what's going on.
The below test31.ledger and test32.ledger are different of only one line
    $ diff test31.ledger test32.ledger
    11c11
    <   Assets:Checking
    ---
    >   Assets:Checking  -1000 F

What I can not understand is why ledger -V output of test32.ledger is in
FRF, even if I put directive "D 1000,00 EUR".
Is there a way to force the output in EUR, my currency ?

Thanks

Thierry



$ cat test31.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


$ cat test32.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  -1000 F

1999/1/1 Books
  Expenses:Books  200 $
  Assets:US account

2002/1/1 Company
  Assets:Checking  2000 €
  Income:Salary


$ ledger3 --european -f test31.ledger -V reg Assets
94-Jan-01 Company    Assets:Checking       1524,49 €    1524,49 €
98-Jan-01 Transfer   Assets:US account      200,00 €    1724,49 €
                      Assets:Checking       -200,00 €    1524,49 €
99-Jan-01 Books      Assets:US account     -200,00 €    1324,49 €
02-Jan-01 Company    Assets:Checking       2000,00 €    3324,49 €

$ ledger3 --european -f test32.ledger -V reg Assets
94-Jan-01 Company    Assets:Checking         10000 F      10000 F
98-Jan-01 Transfer   Assets:US account        1000 F      11000 F
                      Assets:Checking         -1000 F      10000 F
99-Jan-01 Books      Assets:US account       -1000 F       9000 F
02-Jan-01 Company    Assets:Checking       2000,00 €       9000 F
                                                        2000,00 €



On Sat, Feb 27, 2010 at 11:35 PM, thierry <[email protected]> wrote:

> Hello, I have digged further on this one.
>
> Previous to 01-Jan-2002, European union countries were using national
> currencies. French Franc for me.
> Since 01-Jan-2002, (most of) European union countries are using Euro
> currency.
>
> I have created a ledger file with transaction using French Franc
> currency, and Euro currency.
> I used the "D 1000,00 €" directive in my ledger file to tell that
> default currency is Euro.
> But either ledger v2 or ledger v3 are reporting using old French Franc
> currency.
>
> Does that means that "D AMOUNT" directive does not "Specifies the
> default commodity to use" as described in documentation ?
>
> Also, ledger v2 and ledger v3 are reporting different results.
>
> Thierry
>
>
> $ cat test4euro.ledger
> D 1000,00 €
> P 1993/1/1 F 0,15244901723741037903399155737342539221320909754755 €
> P 1993/1/1 $ 0,9 €
>
> 1994/1/1 Company
>  Assets:Checking  10000 F
>  Income:Salary
>
> 1998/1/1 Transfer
>  Assets:US account  200 $
>  Assets:Checking  -1000 F
>
> 1999/1/1 Books
>  Expenses:Books  200 $
>  Assets:US account
>
> 2002/1/1 Company
>  Assets:Checking  2000 €
>  Income:Salary
>
>
> $ ledger -f test4euro.ledger -V reg Assets
> 1994/01/01 Company     Assets:Checking       1524,49 €  1524,49 €
> 1998/01/01 Transfer    Assets:US account          1000 F       1000 F
>                                                          1524,49 €
>                       Assets:Checking       -152,45 €       1000 F
>                                                          1372,04 €
> 1999/01/01 Books       Assets:US account         -1000 F  1372,04 €
> 2002/01/01 Company     Assets:Checking       2000,00 €  3372,04 €
>
>
> $ ledger3 --european -f test4euro.ledger -V reg Assets
> 94-Jan-01 Company      Assets:Checking        10000 F      10000 F
> 98-Jan-01 Transfer     Assets:US account       1000 F      11000 F
>                       Assets:Checking        -1000 F      10000 F
> 99-Jan-01 Books        Assets:US account      -1000 F       9000 F
> 02-Jan-01 Company      Assets:Checking      2000,00 €       9000 F
>                                                         2000,00 €
>
>
> $ ledger -v
> Ledger 2.6.2, the command-line accounting tool
> $ ledger3 -v
> Ledger master-0-g5471370, the command-line accounting tool
>
>
>
> On Jan 7, 12:15 am, thierry <[email protected]> wrote:
> > Hello, I am providing below a test file test4.ledger, and I inlined
> > comments with #
> > I do not get what I would expect. Is this intentional behaviour ?
> > ThanksThierry
> >
> > # below is test file
> > # what is noticeable is that
> > #     I put € as my default currency
> > #     $ is converted to F, and then F is converted to €
> >
> > $ cat test4.ledger
> > D 1000,00 €
> > P 1993/1/1 F 0,15244901723741037903399155737342539221320909754755 €
> > P 1993/1/1 $ 6 F
> >
> > 1994/1/1 Company
> >   Assets:Checking  10000 F
> >   Income:Salary
> >
> > 1998/1/1 Transfer
> >   Assets:US account  200 $
> >   Assets:Checking  -1000 F
> >
> > 1999/1/1 Books
> >   Expenses:Books  200 $
> >   Assets:US account
> >
> > 2002/1/1 Company
> >   Assets:Checking  2000 €
> >   Income:Salary
> >
> > # below is output of ledger v2.6.2
> > # what surprise me is that $ in converted to F only, I would have
> > expected $ to F then F to €
> >
> > thie...@rialto:~/VirtualBoxShare$ ledger -f test4.ledger -V reg Assets
> > 1994/01/01 Company              Assets:Checking         1524,49 €
> > 1524,49 €
> > 1998/01/01 Transfer             Assets:US account            1000
> > F       1000 F
> >
> > 1524,49 €
> >                                 Assets:Checking         -152,45
> > €       1000 F
> >
> > 1372,04 €
> > 1999/01/01 Books                Assets:US account           -1000 F
> > 1372,04 €
> > 2002/01/01 Company              Assets:Checking         2000,00 €
> > 3372,04 €
> >
> > # below is output of ledger v3
> > # what surprise me is that I put € as my default currency, but this is
> > not valued to € (actually the valuation from $ to F is done, but not
> > the F to €)
> > # also, on the last line, the result is not collapsed, as it is in
> > output of v2.6.2
> >
> > thie...@rialto:~/VirtualBoxShare$ ledger3 -f test4.ledger -V reg
> > Assets
> > 94-Jan-01 Company               Assets:Checking             10000
> > F      10000 F
> > 98-Jan-01 Transfer              Assets:US account            1000
> > F      11000 F
> >                                 Assets:Checking             -1000
> > F      10000 F
> > 99-Jan-01 Books                 Assets:US account           -1000
> > F       9000 F
> > 02-Jan-01 Company               Assets:Checking           2000,00
> > €       9000 F
> >
> > 2000,00 €
>
>

Reply via email to