On 03.05.16,03:34, Sébastien Gross wrote:
Hi Jostein,
Yes I tried something like:
--8<--
2016/03/31 * Bob
Assets:Bank:Invests:Plan 100.00 EUR
Equity:Invests:Plan -100.00 EUR
--8<--
Event I tried:
--8<--
2016/03/31 * Bob
Assets:Bank:Invests:Plan 100.00 EUR =291.00 EUR
Equity:Invests:Plan -100.00 EUR
--8<--
But still this does not work, following error is yield:
--8<--
While parsing posting:
Assets:Bank:Invests:Plan 100.00 EUR =291.00 EUR
^^^^^^^^^^
Error: Balance assertion off by -9.00 EUR (expected to see 200.00 EUR)
--8<--
The following ledger file works:
--8<--
= /^(?:Assets:Bank:Invests:Plan$)/ and not %/^noauto$/ and expr date >=
[2016/01/01]
$account -1
$account 0.97
Expenses:Bank:Invests:Plan 0.03
2016/01/31 * Bob
Assets:Bank:Invests:Plan 100.00 EUR
Equity:Invests:Plan -100.00 EUR
2016/02/29 * Bob
Assets:Bank:Invests:Plan 100.00 EUR
Equity:Invests:Plan -100.00 EUR
2016/03/31 * Bob
Assets:Bank:Invests:Plan 100.00 EUR = 200.00 EUR ;; The
assertion is ALSO correct with 100.00 EUR = 300.00 EUR How can this be
correct?
Equity:Invests:Plan -100.00 EUR
--8<--
But this is an error since on March 31st the Assets:Bank:Invests:Plan IS
291,00 EUR not 200 EUR neither 300 EUR.
My assumption is that ledger does the following:
- Read the file
- computes all accounts and run assertion BEFORE and AFTER account is
modified, yield and error if either one or the other assertion failed.
- apply automated xacts.
BTW I use Ledger 3.1.1-20160111, the command-line accounting tool brew
version on macosx.
There is a similar thead on this from February this year. Seems to be a bug:
https://groups.google.com/forum/#!topic/ledger-cli/OHTX8fNkteM
Jostein
--
---
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.