On Mar 13, 7:10 pm, thierry <thierry.dauco...@free.fr> wrote:
> Hello,
>
> I've found that results of 'balance' command are different, depending
> on the syntax of the amount.
> Actually, I was expecting same result, whatever the way the amount is
> spelled.
>
> Thierry
>
> $ ledger -f test8.ledger bal
>                 $270  Assets:Broker
>                  $30  Expense:Broker:Commissions
> --------------------
>                 $300
>
> $ ledger -f test9.ledger bal
>                 $270  Assets:Broker
>                  $30  Expense:Broker:Commissions
>                $-300  Income:Capital Gains
> --------------------
>                    0
>
> $ diff test8.ledger test9.ledger
> 10,11c10,11
> <     [Income:Capital Gains]      $300  ; buy price 10*30
> <     [Income:Capital Gains]     $-600  ; sell price 10*60
> ---
>
> >     [Income:Capital Gains]     -10 AAPL @ $30  ; buy price 10*30
> >     [Income:Capital Gains]      10 AAPL @ $60  ; sell price 10*60
>


Repost of test8.ledger, there is a typo about the signed amount.
This has no impact on the bug, but this has impact on realisticness of
the transaction.


$ cat test8.ledger
1998/05/05 Buy AAPL
    Assets:Broker               10 AAPL @ $30
    Expense:Broker:Commissions   $15
    Assets:Broker

1999/08/16 Sell AAPL
    Assets:Broker              -10 AAPL @ $60
    Expense:Broker:Commissions   $15
    Assets:Broker               $585
    [Income:Capital Gains]     $-300  ; buy price 10*30
    [Income:Capital Gains]      $600  ; sell price 10*60
    [Income:Capital Gains]


>
> $ cat test9.ledger
> 1998/05/05 Buy AAPL
>     Assets:Broker               10 AAPL @ $30
>     Expense:Broker:Commissions   $15
>     Assets:Broker
>
> 1999/08/16 Sell AAPL
>     Assets:Broker              -10 AAPL @ $60
>     Expense:Broker:Commissions   $15
>     Assets:Broker               $585
>     [Income:Capital Gains]     -10 AAPL @ $30  ; buy price 10*30
>     [Income:Capital Gains]      10 AAPL @ $60  ; sell price 10*60
>     [Income:Capital Gains]
>
> $ ledger -v
> Ledger master-0-g5471370, the command-line accounting tool

Reply via email to