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:
1 parent
d3cbbbb07f
commit
9989b6971b
4 files changed
+13
-7
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<%= content_tag(:td, deliverable.id) %>
|
||||
<%= content_tag(:td, h(deliverable.score.to_i), :class => 'score') if allowed_management? %>
|
||||
<%= content_tag(:td, h(deliverable.subject), :class => 'subject') %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.labor_budget, :precision => 0), :class => 'budget') %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0), :class => 'budget') %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.spent, :precision => 0), :class => 'spent') if allowed_management? %>
|
||||
<%= content_tag(:td, format_date(deliverable.due), :class => 'due_date') %>
|
||||
<%= content_tag(:td, progress_bar(deliverable.progress, :width => '100%', :class => 'dont_ratio')) %>
|
||||
@@ -45,10 +45,10 @@
|
||||
<td colspan="3">
|
||||
<%= paragraph_with_data("Total Budget: ", number_to_currency(deliverable.budget, :precision => 0)) -%>
|
||||
<% if allowed_management? %>
|
||||
<%= paragraph_with_data("Labor: ", number_to_currency(deliverable.labor_budget, :precision => 0)) -%>
|
||||
<%= paragraph_with_data("Overhead: ", number_to_currency(deliverable.overhead, :precision => 0)) -%>
|
||||
<%= paragraph_with_data("Materials: ", number_to_currency(deliverable.materials, :precision => 0)) -%>
|
||||
<%= paragraph_with_data("Profit: ", number_to_currency(deliverable.profit, :precision => 0)) -%>
|
||||
<%= paragraph_with_data("Labor: ", number_to_currency(deliverable.labor_budget || 0.0, :precision => 0)) -%>
|
||||
<%= paragraph_with_data("Overhead: ", number_or_percent(deliverable.overhead, deliverable.overhead_percent)) -%>
|
||||
<%= paragraph_with_data("Materials: ", number_or_percent(deliverable.materials, deliverable.materials_percent)) -%>
|
||||
<%= paragraph_with_data("Profit: ", number_or_percent(deliverable.profit, deliverable.profit_percent)) -%>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
|
||||
Reference in new issue
Block a user