Calculation instead of amount

35 views
Skip to first unread message

Fredrik

unread,
Aug 20, 2019, 11:50:52 AM8/20/19
to Ledger
Can I use an equation instead of a number entry for an amount?

Example:
2018/08/01 Calc transaction
Destination 4-1.23
Source

Or can I do something similar with ledger-mode in Emacs?

Martin Michlmayr

unread,
Aug 20, 2019, 11:54:28 AM8/20/19
to ledge...@googlegroups.com
* Fredrik <fredrik....@gmail.com> [2019-08-20 08:50]:
> Example:
> 2018/08/01 Calc transaction
> Destination 4-1.23
> Source

You can do:

2018/08/01 Calc transaction
Destination (4 EUR - 1.23 EUR)
Source

--
Martin Michlmayr
https://www.cyrius.com/

Fredrik

unread,
Aug 20, 2019, 12:07:33 PM8/20/19
to Ledger
You can do:

2018/08/01 Calc transaction
  Destination     (4 EUR - 1.23 EUR)
  Source

--


Thanks! I see... it only works if you have paranthesis and a currency. My example will not work even if I add the paranthesis. 

Craig Earls

unread,
Aug 20, 2019, 12:13:05 PM8/20/19
to ledge...@googlegroups.com
Ledger-mode will also bring up the calculator C-c C-b

--

---
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/42c0b693-4716-44d7-9f6f-81718398e6b6%40googlegroups.com.
--
Craig, Corona De Tucson, AZ
missile_flyout
enderw88.wordpress.com

Martin Michlmayr

unread,
Aug 20, 2019, 12:15:39 PM8/20/19
to ledge...@googlegroups.com
* Fredrik <fredrik....@gmail.com> [2019-08-20 09:07]:
> > 2018/08/01 Calc transaction
> > Destination (4 EUR - 1.23 EUR)
> > Source
> Thanks! I see... it only works if you have paranthesis and a currency. My
> example will not work even if I add the paranthesis.

It works for me:

2018/08/01 Calc transaction
Destination (4 - 1.23)
Source

2.77 Destination
-2.77 Source
--------------------
0

But you should never use amounts without commodity.
Reply all
Reply to author
Forward
0 new messages