[#4477] Added FixedBudgets to the Deliverable finance form.

This commit is contained in:
Eric Davis
2010-09-09 17:06:35 -07:00
parent 07da5d98d8
commit feee5e8b43
9 changed files with 115 additions and 29 deletions
+8
View File
@@ -7,6 +7,14 @@ class FixedBudget < ActiveRecord::Base
# Validations
# Accessors
def budget=(v)
if v.is_a? String
write_attribute(:budget, v.gsub(/[$ ,]/, ''))
else
write_attribute(:budget, v)
end
end
def markup_value
return 0 if budget.blank? || markup.blank?