>>>>> "'WvL" == 'Dave Webb' via Ledger <[email protected]> writes:

'WvL> I found a transaction in my ledger for which I think balance
'WvL> verification should fail but ledger accepts it. I am using 3.3.0.
'WvL> Here is a simplified example of what I found

'WvL> 2016-08-19 OpeningBalances
'WvL>   Assets:Cash  £ 3
'WvL>   Equity:OpeningBalances

'WvL> 2016-09-25 X
'WvL>   Expenses:Other  £ 2
'WvL>   Assets:Cash  = £ 1

'WvL> 2016-09-26 X
'WvL>   Expenses:Other  £ 1
'WvL>   Assets:Cash   = £ 1       ; I would expect this to fail

Just to note, a balance assertion that has no associated amount will always
just adjust the balance to match.

Now, I edited this file to get rid of a lot of really strange whitespace, and
I changed the currency to $, just to rule out all strangeness. After I did
that, I got the output I expected to see:

  Vulcan ~/dl $ ledger -f foo.dat reg
  While parsing file "/Users/johnw/Downloads/foo.dat", line 11:
  While balancing transaction from "/Users/johnw/Downloads/foo.dat", lines 9-11:
  > 2022/09/26 X
  >     Expenses:Other                                $1
  >     Assets:Cash            = $1
  Unbalanced remainder is:
                    $1
  Amount to balance against:
                    $1
  Error: Transaction does not balance

John

-- 

--- 
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/m2a6151bln.fsf%40newartisans.com.

Reply via email to