From 315d428f6a3b1965b10d2477cccc71f85548490c Mon Sep 17 00:00:00 2001 From: Hieu Van Date: Fri, 17 Jul 2020 09:37:29 +0700 Subject: docs: improve the example of displaying amount in another commodity The current one doesn't work; also Ledger has got a much neater command-line option to achieve the goal. --- doc/ledger3.texi | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'doc/ledger3.texi') diff --git a/doc/ledger3.texi b/doc/ledger3.texi index aafb079f..0e05ae6f 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -1102,18 +1102,13 @@ wanted to know how many ounces of gold that would buy, in terms of the current price of gold: @smallexample -$ ledger -T "@{1 AU@}*(O/P@{1 AU@})" balance checking +$ ledger -X AU balance checking @end smallexample -Although the total expression appears complex, it is simply saying -that the reported total should be in multiples of AU units, where the -quantity is the account total divided by the price of one AU. Without -the initial multiplication, the reported total would still use the -dollars commodity, since multiplying or dividing amounts always keeps -the left value's commodity. The result of this command might be: +The result of this command might be: @smallexample -14.01 AU Assets:Checking +12.50 AU Assets:Checking @end smallexample @menu -- cgit v1.2.3