Re: How to view both number of items and their price in balance report.

2015-02-08 Thread Ivanov Dmitry
I tried a currency, different from $, and it stopped working:

2015/01/04 * Shell
  Expenses:Gasoline2 @ 30  RUB
  Assets:Checking

 ledger -f test1.txt \
  --exchange RUB \
  --format \
  '%(strip(amount)) %(display_amount) %(ansify_if(account, blue))\n' \
  bal expenses 

Gives: 2 2 Expenses:Gasoline

How to fix?

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to view both number of items and their price in balance report.

2015-01-16 Thread Alexis

Hello Ivanov Dmitry on Wed, Jan 14, 2015 at 09:55:30PM CET, you wrote:
 Is it possible to get the sum of money, spent on that:
 22 GAL $44 Expenses:Gasoline

Yes, that's possible by changing the balance format using the
--balance-format option (see the manual¹ for details), here's an example:

% ledger -f test1.txt \
  --exchange $ \
  --format \
  '%(strip(amount)) %(display_amount) %(ansify_if(account, blue))\n' \
  bal expenses
22 GAL $44 Expenses:Gasoline


Cheers,
Alexis

¹ 
http://ledger-cli.org/3.0/doc/ledger3.html#index-_002d_002dbalance_002dformat-FORMAT_005fSTRING-1

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to view both number of items and their price in balance report.

2015-01-14 Thread Ivanov Dmitry
Suppose, we have the following ledger file:

2009/01/01 Shell
Expenses:Gasoline 11 GAL {$2}
Assets:Checking

2009/01/02 Shell
Expenses:Gasoline 11 GAL @ $2
Assets:Checking

When I run

$~/opt/ledger/ledger -f test1.txt bal Expenses

I get:

22 GAL  Expenses:Gasoline

Is it possible to get the sum of money, spent on that:

22 GAL $44 Expenses:Gasoline

?

-- 

--- 
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 ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.