transaction.js: calculate only if one entry in table