Update qbo_invoice.rb

This commit is contained in:
2016-09-14 14:34:50 -04:00
committed by GitHub
parent 365219eddb
commit dacde1e050

View File

@@ -98,7 +98,7 @@ class QboInvoice < ActiveRecord::Base
# Use the lowest Milage # Use the lowest Milage
if cf.name.eql? "Mileage In" if cf.name.eql? "Mileage In"
if cf.string_value.to_i > value.value.to_i if cf.string_value.to_i > value.value.to_i or cf.string_value.blank?
cf.string_value = value.value.to_s cf.string_value = value.value.to_s
is_changed = true is_changed = true
end end
@@ -107,7 +107,7 @@ class QboInvoice < ActiveRecord::Base
# Use the max milage # Use the max milage
if cf.name.eql? "Mileage Out" if cf.name.eql? "Mileage Out"
if cf.string_value.to_i < value.value.to_i if cf.string_value.to_i < value.value.to_i or cf.string_value.blank?
cf.string_value = value.value.to_s cf.string_value = value.value.to_s
is_changed = true is_changed = true
end end