henriquebastos / gnucash-to-beancount

Gnucash to Beancount Converter.
GNU General Public License v2.0
30 stars 19 forks source link

Fix error on empty gnucash transactions #6

Open debanjum opened 7 years ago

debanjum commented 7 years ago

This pull request fixes #4 and possibly resolves #2.

Adds an empty transaction in Beancount's ledger format for the equivalent empty Gnucash transaction. Earlier was raising exception when trying to deal with empty transaction by attempting to carry out a 0/0 invalid operation in the directives.py:price_for() function

Tested while exporting my Gnucash account to Beancount. Passes test.sh.