double_double 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/double_double/transaction.rb +1 -0
- data/lib/double_double/version.rb +1 -1
- metadata +1 -1
@@ -54,6 +54,7 @@ module DoubleDouble
|
|
54
54
|
#
|
55
55
|
# @return [DoubleDouble::Transaction] A Transaction with built credit and debit objects ready for saving
|
56
56
|
def self.build args
|
57
|
+
args.merge!({credits: args[:debits], debits: args[:credits]}) if args[:reversed]
|
57
58
|
t = Transaction.new()
|
58
59
|
t.description = args[:description]
|
59
60
|
t.transaction_type = args[:transaction_type] if args.has_key? :transaction_type
|