lib/bankscrap/cli.rb in bankscrap-2.0.3 vs lib/bankscrap/cli.rb in bankscrap-2.0.4
- old
+ new
@@ -117,10 +117,10 @@
say 'BALANCE'.rjust(15)
say '-' * 99
end
def print_transaction(transaction)
- color = (transaction.amount > Money.new(0) ? :green : :red)
+ color = (transaction.amount.to_i > 0 ? :green : :red)
say transaction.effective_date.strftime('%d/%m/%Y') + ' '
say transaction.description.squish.truncate(50).ljust(50) + ' ', color
say transaction.amount.format.rjust(15) + ' ', color
say transaction.balance.format.rjust(15)
end