[utility function] fix total debit/credit due to floating point issue