On 2017-02-21, at 18:56, o1bigtenor <[email protected]> wrote: > Greetings > > Not sure how to phrase the request so apologies if I'm doing a poor job. > > I'm finding that I often get a receipt with multiple same items (plus others). > To create an amount I need to multiply the cost of each item by the > total number of items and then apply the sales tax to this subtotal. > > To date I've being doing this using a calculator on the screen. Today > tried to use a mathematical expression to achieve the same without > needing to move back and forth on the system. (Ledger is on a VM that > is using 1 monitor and the calculator is on a separate monitor.) > Tried: > > =((2.21*6)*1.08) and > ((2.21*6)*1.08) > > neither of which then display the resultant. > > Is there some way to do this in ledger?
Not really what you want, but a similar thing. I don't like mathematical expressions in my ledger file, so I wrote a simple Emacs Lisp function which takes everything to the left of the point (≈cursor in Emacs-speak) consisting of digits, point, operation signs and parens and having at least 3 characters (I later changed that to two), feeds this into Emacs Calc and replaces with the result (formatted with two digits after point), optionally with the currency symbol added. I use it on a daily basis and I have to say it's /extremely/ useful. Here's the story: http://mbork.pl/2015-06-20_Fast-calc Hth, -- Marcin Borkowski -- --- 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.
