sdementen / piecash

Pythonic interface to GnuCash SQL documents
Other
290 stars 73 forks source link

account.get_balance returns wrong amount #89

Closed lamarc5 closed 4 years ago

lamarc5 commented 6 years ago

With accounts having mixed type childs, account.get_balance will add all child balances as positive values, irrespective of child type. IE ASSETS amounts will be added to LIABILITIES, giving incorrect result. get_balance should return the value signed relative to the parent type. Attached a suggested correction get_balance.py.txt

piecash 0.18.0, python 3.6.5 on ubuntu 18.04

sdementen commented 6 years ago

Good point! Would you have an example book with mixed type account so I can add it in the test suite ? It will also helps me understand the issue.

sdementen commented 5 years ago

Any sample book with expected results from the get_balance?

sdementen commented 4 years ago

fixed in piecash 1.1