Chris Bennett <[email protected]> writes:

> But when I assert a balance for the Expense account, it errors:
>
> 2015/12/31 MyCompany:Expenses closing balance
>   MyCompany:Expenses                                 $0.00 = $4.55
>   Equity:Dummy
>
>
> $ ledger -f test.ledger bal
> While parsing posting:
>   MyCompany:Expenses                                 $0.00 = $4.55
>                                                              ^^^^^
> Error: Balance assertion off by $4.55

Yes. You're asserting “After this transaction that moves $0.00, the
balance should be $4.55”.

I think instead you want::

    2015/10/01 Light Refreshments
      MyCompany:Expenses:LightRefreshments               $4.55
      MyCompany:Liabilities:AP:LightRefreshments

    2015/12/31 MyCompany:Expenses closing balance
      MyCompany:Expenses                                 $4.55 = $0.00
      Equity:Dummy

The second asserts “After this transaction which moves $4.55, the
balance should be $0.00”.

    $ ledger -f ~/Documents/finance/foo.ledger balance
                  $-4.55  Equity:Dummy
                   $4.55  MyCompany
                   $9.10    Expenses
                   $4.55      LightRefreshments
                  $-4.55    Liabilities:AP:LightRefreshments
    --------------------
                       0

But maybe instead you have a mistake in which transactions you specify
for the transactions?

-- 
 \        “Don't worry about people stealing your ideas. If your ideas |
  `\     are any good, you'll have to ram them down people's throats.” |
_o__)                                                    —Howard Aiken |
Ben Finney

-- 

--- 
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.

Reply via email to