Hello,

I have seen there were a few fixes to the balance assertions and their
docs. I am still confused by how it works. My example here:

2013/12/01 * Initial State
    Crédit:Viseca:MasterCard P1                        -618.50 CHF
    Crédit:Viseca:MasterCard P2                         -52.10 CHF
    Equity:Opening Balances

2013/12/23 * Bill Viseca
    Crédit:Viseca:MasterCard P2                          52.10 CHF = 0
    Crédit:Viseca:MasterCard P1                         618.50 CHF = 0
    Dépenses:Frais:Gestion Comptes                        1.50 CHF ; fee
    Crédit:Viseca                                      -672.10 CHF

2014/01/03 * Payment Viseca
    Crédit:Viseca                                       672.10 CHF = 0
    Actif:Comptes:Bank1

I have 2 cards, and get itemized bills. That is summarized in the Initial
state. then I get the bill, where I want to sum the cards and add any other
fees (bill fees, late payment, etc.) and push this into the parent account.
Later I actually pay the bill, making that top level account zero again.

This has worked for quite some time until about 6 month ago. (I just
updated my system, and got a new version of ledger).

Now, with the example above I get these errors:

$ ledger -f test.ledger bal
While parsing file "test.ledger", line 7:
While parsing posting:
 Crédit:Viseca:MasterCard P2                          52.10 CHF = 0
                                                                   ^
Error: Balance assertion off by -52 (expected to see 52)
While parsing file "test.ledger", line 13:
While parsing posting:
 Crédit:Viseca                                       672.10 CHF = 0
                                                                   ^
Error: Balance assertion off by -672 (expected to see 672)

I don't understand what ledger is computing and asserting, especially given
the documentation on balance assertions
<https://www.ledger-cli.org/3.0/doc/ledger3.html#Balance-assertions>. If I
remove the assertions, I get what I am expecting:

$ ledger -f test.ledger bal
        -672.10 CHF  Actif:Comptes:CP courant
           1.50 CHF  Dépenses:Frais:Gestion Comptes
         670.60 CHF  Equity:Opening Balances
--------------------
                  0

What part I am not understanding correctly ?

--Pascal

-- 

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