Adding dollar signs or % to amounts

* Added number_or_percent helper to return the correct string
* Deliverable.labor_budget will now return 0.0 if it's nil

  #1274
This commit is contained in:
Eric Davis committed 2008-06-12 16:05:02 -07:00
1 parent d3cbbbb07f
commit 9989b6971b
4 files changed
+13 -7

No files matched your search

+6
View File
@@ -63,4 +63,10 @@ module DeliverablesHelper
)
end
def number_or_percent(number_field, percent_field)
return number_to_currency(number_field, :precision => 0) unless number_field.blank?
return number_to_percentage(percent_field, :precision => 0) unless percent_field.blank?
return "$0"
end
end