figure in commodity name

102 views
Skip to first unread message

thierry

unread,
Dec 20, 2009, 11:58:19 AM12/20/09
to Ledger
Hi,

Are figures in commodity name allowed ? Ledger mess things by
reporting (Commodity1 or Commodity2) as the same one named Commodity
(without the figure).

Thierry

$ cat toto.ledger
1999/06/09 ! Achat
Actif:SG PEE STK 49.957 ArcanciaEquilibre454
Actif:SG PEE STK -234.90 €

2000/12/08 ! Achat
Actif:SG PEE STK 215.796 ArcanciaEquilibre455
Actif:SG PEE STK -10742.54 €

$ ledger -v
Ledger 2.6.2, the command-line accounting tool

Copyright (c) 2003-2009, John Wiegley. All rights reserved.

This program is made available under the terms of the BSD Public
License.
See LICENSE file included with the distribution for details and
disclaimer.

(modules: gmp, pcre, xml)

$ ledger -f toto.ledger bal
265.753 ArcanciaEquilibre
-10977.44 € Actif
--------------------
265.753 ArcanciaEquilibre
-10977.44 €

$ ~/Bureau/ledger/ledger -v
0ms [INFO] Ledger starting
Ledger master-0-ge3c8b91, the command-line accounting tool

Copyright (c) 2003-2009, John Wiegley. All rights reserved.

This program is made available under the terms of the BSD Public
License.
See LICENSE file included with the distribution for details and
disclaimer.
Error: No journal file was specified (please use -f)
14ms [INFO] Ledger ended

$ ~/Bureau/ledger/ledger -f toto.ledger bal
While parsing file "toto.ledger", line 19:
While parsing posting:
Actif:SG PEE STK 49.957 ArcanciaEquilibre454
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unexpected char '4' (Note: inline math requires parentheses)
While parsing file "toto.ledger", line 23:
While parsing posting:
Actif:SG PEE STK 215.796 ArcanciaEquilibre455
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unexpected char '4' (Note: inline math requires parentheses)

John Wiegley

unread,
Dec 20, 2009, 4:23:20 PM12/20/09
to ledge...@googlegroups.com
On Dec 20, 2009, at 11:58 AM, thierry wrote:

> Are figures in commodity name allowed ? Ledger mess things by
> reporting (Commodity1 or Commodity2) as the same one named Commodity
> (without the figure).

Yes, they are allowed, but you must enclose the commodity name in double-quotes:

10 "Commodity1"

John

Reply all
Reply to author
Forward
0 new messages