[#4556] Formatted the Fixed Budget values in the deliverable form

This commit is contained in:
Eric Davis committed 2010-09-23 10:51:56 -07:00
1 parent 893ad7943d
commit d778201eff
3 files changed
+11 -3

No files matched your search

+8
View File
@@ -84,6 +84,14 @@ module ContractsHelper
number_with_precision(value, :precision => Deliverable::ViewPrecision, :delimiter => '')
end
def format_deliverable_value_fields_as_dollar_or_percent(value)
if value.to_s.match('%')
h(value)
else # currency or straight amount
number_to_currency(value.to_s.gsub('$',''), :precision => Deliverable::ViewPrecision, :delimiter => '', :unit => '$')
end
end
def format_value_field_for_contracts(value)
number_with_precision(value, :precision => Contract::ViewPrecision, :delimiter => ',')
end