I am trying to declare an account and check it's balance and all of its childrens' balances. Doc <https://www.ledger-cli.org/3.0/doc/ledger3.html#Command-Directives> says
The check and assert directives warn or raise an error (respectively) if the given value expression evaluates to false within the context of any posting. The doc for value expressions <https://www.ledger-cli.org/3.0/doc/ledger3.html#Posting_002faccount-details> says O - The total of all postings seen so far, or the total of an account and all its children. So I am trying to write: *account Budget* * check O >= 0 * But I get no errors with this test: *4/14 test* * Budget:Travel $-10000* * Equity:Opening Balance $10000 * What is the correct syntax to do this? I've tried other formats like: *check O >= 0* *check "O >= 0"* *check expr = "O >= 0" * But I can't seem to get any of them to work. The documentation claims that the variable O contains *the total of an account and all its children*. Is this the correct implementation? -- --- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/ed27b670-fd7c-4f56-b459-5ed962ea0a8fn%40googlegroups.com.
