this doesn't seem to be documented in the 3.0 documentation, is that
correct?
I was looking for exactly this in it and failed to find the anser I needed
till I came across this post.
Chapter 11 on value expressions is also a bit chaotic and unclear IMHO.
I read it twice and I still can't make head nor tails of it.
with kind regards,
Jeroen
On Sunday, June 13, 2010 6:50:08 AM UTC+2, John Wiegley wrote:
>
> These can occur in many places:
>
> ; Within an automated transaction, the assert is evaluated every time
> ; a posting is matched, with the expression context set to the
> ; matched posting.
> = /Food/
> assert account("Expenses:Food").total >= $100
>
> 2010-06-12 Sample
> Expenses:Food $100
> Assets:Checking
>
> ; At file scope, the expression is evaluated within "global" scope.
> assert account("Expenses:Food").total == $100
>
> ; At the top of a transction, the assertion's scope is the
> ; transaction. After a posting, the scope is that posting. Note
> ; however that account totals are only adjusted after successful
> ; parsing of a transaction, which means that all the assertions below
> ; are true, even though it appears as though the first posting should
> ; affect the total immediately, which is not the case.
> 2010-06-12 Sample 2
> assert account("Expenses:Food").total == $100
> Expenses:Food $50
> assert account("Expenses:Food").total == $100
> Assets:Checking
> assert account("Expenses:Food").total == $100
>
> John
>