ledger / ledger-mode

Emacs Lisp files for interacting with the C++Ledger accounting system
GNU General Public License v2.0
377 stars 75 forks source link

ledger-reconcile raises an error if current balance is zero #416

Closed bcc32 closed 5 months ago

bcc32 commented 5 months ago

When there are uncleared transactions for an account, but the cleared+pending balance is zero, ledger-reconcile raises an error like so:

ledger-subtract-commodity: Can’t subtract different commodities (0 nil) from (0 "USD")

Arguably, subtracting zero from a commoditized amount (even if the commodities don't match), should be fine. In this case, it's just because ledger doesn't print a commodity at all if the amount is zero.