implement total payable/receivable functions
bug fix