mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Fixed Custom Field Logic
This commit is contained in:
@@ -127,19 +127,17 @@ class QboInvoice < ActiveRecord::Base
|
|||||||
cf.string_value = value.value.to_s
|
cf.string_value = value.value.to_s
|
||||||
is_changed = true
|
is_changed = true
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# Use the max milage
|
# 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?
|
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
|
||||||
|
else
|
||||||
|
# Everything else
|
||||||
|
cf.string_value = value.value.to_s
|
||||||
|
is_changed = true
|
||||||
end
|
end
|
||||||
|
|
||||||
# Everything else
|
|
||||||
cf.string_value = value.value.to_s
|
|
||||||
is_changed = true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
|
|||||||
Reference in New Issue
Block a user