Hello,
Can someone please tell me if it's possible to reset an account balance in
a periodic transaction ?
For example:
~ yearly from 04/06
CumulativeMiles = 0
I get an error:
While parsing file "/home/john/Documents/miles_test.ldg", line 2:
While parsing posting:
CumulativeMiles = 0
Error: Unexpected char '=' (Note: inline math requires parentheses)
Why do I want to do this ?
In the UK we have car business mileage rates at 45 pence per mile for the
first 10,000 miles in each tax year, then 25 pence per mile after that. At
the beginning of each tax year (which starts 6th April) the counter gets
reset.
I'm hoping I can add some kind of value expression to a "miles" commodity
which does the following:
1. add the value to the cummulative miles
2. convert the miles into £ as follows (pseudo code):
0.45 * max(0, min(new, 10000) - old) +
0.25 * max(0, new - max(10000, old))
where "old" is the old cummulative miles total and "new" is the new
cumulative miles total.
Perhaps I'm barking up the wrong tree here. Is this even possible with
ledger ?
Thanks in advance,
John
P.S. I'm trying this with Ledger 3.1.0-20141005 on Centos7
--
---
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.