Coding transactions with expense category rules