Fixed Custom Field Logic

This commit is contained in:
2017-04-02 08:06:07 -04:00
committed by GitHub
parent 3decf83a7b
commit 8a6bb45b6a

View File

@@ -127,21 +127,19 @@ class QboInvoice < ActiveRecord::Base
cf.string_value = value.value.to_s
is_changed = true
end
end
# Use the max milage
if cf.name.eql? "Mileage Out"
elsif cf.name.eql? "Mileage Out"
if cf.string_value.to_i < value.value.to_i or cf.string_value.blank?
cf.string_value = value.value.to_s
is_changed = true
end
end
else
# Everything else
cf.string_value = value.value.to_s
is_changed = true
end
end
end
rescue
# Nothing to do here, there is no match
end