You didn't put the currency unit in your transaction.
This is how I did it:
cat test2.txt
commodity $
format $1,000.00
nomarket
default
2018/01/01 Test
Exp $12.00
Cash
ledger -f test2.txt bal --no-pager --no-color
$-12.00 Cash
$12.00 Exp
--------------------
0
On Sunday, September 9, 2018 at 9:29:41 AM UTC+8, Dmitry Kakurin wrote:
>
> How do I do that?
> Here is an example ledger file:
>
> commodity $
> format $1,000.00
> nomarket
> default
>
> 2018/01/01 Test
> Exp 12.00
> Cash
>
>
> I'd like `ledger bal` to print:
> $-12.00 Cash
> $12.00 Exp
>
> or at least (without $ sign)
> -12.00 Cash
> 12.00 Exp
>
> but instead, it prints (no decimal digits):
> -12 Cash
> 12 Exp
>
> So my 2 Qs are:
> 1. Is there a way to control formatting for amounts that don't specify a
> currency?
> 2. Is there a way to say that no explicit currency means $?
>
> I thought the `commodity` directive at the top would do both, but it does
> not.
>
> My Ledger version is: Ledger 3.1.1-20150915
>
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.