added invoice method on transaction.rb