On Jun 24, 2010, at 3:09 PM, John Wiegley wrote:
>> Second is declaring pairs of accounts between which transfers could
>> validly occur, so that e.g money could not be transferred from a
>> contingency account to the director's loan account.
>
> You can do this with the "check" keyword and an automated transaction:
>
> = /Checking/
> check account =~ /Expense/
>
> 2010-06-24 Sample
> Expenses:Food $100
> Assets:Checking
>
> Use "assert" instead of "check" if you want it to be an error.
Just as a side-note: You can still confirm this at the end of the file
using:
check account("Assets:Checking").all(account =~ /Expense/)
However, this will not tell you where the problem came from. That's OK
if you are actively using version control and can identify which set of
changes introduced the problem, but otherwise automated transactions are
the surest way to find the cause.
John