Merge remote branch 'pasco/master'
Conflicts: app/views/deliverables/_deliverable_summary_row.html.erb
This commit is contained in:
@@ -93,8 +93,8 @@ 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_currency(number_field, :unit => l(:label_currency), :precision => 0) unless number_field.blank?
|
||||
return number_to_percentage(percent_field, :precision => 0) unless percent_field.blank?
|
||||
return "$0"
|
||||
return number_to_currency(0, :unit => l(:label_currency), :precision => 0)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<%= l(:field_budget) %>
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.budget, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.budget, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -18,7 +18,7 @@
|
||||
<%= l(:label_labor_budget) %>
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.labor_budget, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.labor_budget, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -29,7 +29,7 @@
|
||||
<%= l(:label_labor_budget_spent) %>
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.spent, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.spent, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -40,7 +40,7 @@
|
||||
<%= l(:label_labor_budget_remaining) %>
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.labor_budget_left, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.labor_budget_left, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -71,7 +71,7 @@
|
||||
<%= l(:label_overruns) %>
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.overruns, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.overruns, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -82,7 +82,7 @@
|
||||
<%= l(:label_missing_on) %> <%= link_to('Deliverables:', :action => 'issues', :id => @project.id, :deliverable_id => :none) %>
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.amount_missing_on_deliverables, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.amount_missing_on_deliverables, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.amount_missing_on_issues, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.amount_missing_on_issues, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -127,7 +127,7 @@
|
||||
<%= l(:label_potential_profit) %>
|
||||
</td>
|
||||
<td class="calculation-column">
|
||||
<%= h number_to_currency(budget.profit, :precision => 0) %>
|
||||
<%= h number_to_currency(budget.profit, :unit => l(:label_currency), :precision => 0) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -23,16 +23,16 @@
|
||||
<%= row_with_double_data l(:label_hours_estimated), number_with_precision(deliverable.total_hours, 0), '' %>
|
||||
<% end %>
|
||||
<% if deliverable.fixed? %>
|
||||
<%= row_with_double_data l(:label_fixed_amount), '', number_to_currency(deliverable.fixed_cost, :precision => 0) %>
|
||||
<%= row_with_double_data l(:label_fixed_amount), '', number_to_currency(deliverable.fixed_cost, :unit => l(:label_currency), :precision => 0) %>
|
||||
<% end %>
|
||||
|
||||
<% if deliverable.hours_used > 0 %>
|
||||
<%= row_with_double_data l(:label_hours_used), number_with_precision(deliverable.hours_used,0), number_to_currency(deliverable.spent_by_members, :precision => 0) %>
|
||||
<%= row_with_double_data l(:label_hours_used), number_with_precision(deliverable.hours_used,0), number_to_currency(deliverable.spent_by_members, :unit => l(:label_currency), :precision => 0) %>
|
||||
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<% deliverable.members_spent.each do |person| %>
|
||||
<%= row_with_double_data(h(person.user.name), person.hours.round, number_to_currency(person.spent, :precision => 0)) %>
|
||||
<%= row_with_double_data(h(person.user.name), person.hours.round, number_to_currency(person.spent, :unit => l(:label_currency), :precision => 0)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -41,10 +41,10 @@
|
||||
|
||||
<td colspan="3">
|
||||
<table class="financials">
|
||||
<%= row_with_data(l(:field_budget), number_to_currency(deliverable.budget, :precision => 0)) -%>
|
||||
<%= row_with_data(l(:field_budget), number_to_currency(deliverable.budget, :unit => l(:label_currency), :precision => 0)) -%>
|
||||
<% if allowed_management? %>
|
||||
<% base_price_label = deliverable.hourly? ? l(:label_labor) : l(:label_fixed_amount) %>
|
||||
<%= row_with_data(base_price_label, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0)) -%>
|
||||
<%= row_with_data(base_price_label, number_to_currency(deliverable.labor_budget || 0.0, :unit => l(:label_currency), :precision => 0)) -%>
|
||||
<%= row_with_data(l(:label_overhead), number_or_percent(deliverable.overhead, deliverable.overhead_percent)) -%>
|
||||
<%= row_with_data(l(:label_materials), number_or_percent(deliverable.materials, deliverable.materials_percent)) -%>
|
||||
<%= row_with_data(l(:label_potential_profit), number_or_percent(deliverable.profit, deliverable.profit_percent)) -%>
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<%= content_tag(:td, deliverable.id, :class => '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.budget || 0.0, :precision => 0), :class => 'budget') if allowed_management? %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0), :class => 'budget labor') if allowed_management? %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.spent, :precision => 0), :class => 'spent') if allowed_management? %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.budget || 0.0, :unit => l(:label_currency), :precision => 0), :class => 'budget') if allowed_management? %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.labor_budget || 0.0, :unit => l(:label_currency), :precision => 0), :class => 'budget labor') if allowed_management? %>
|
||||
<%= content_tag(:td, number_to_currency(deliverable.spent, :unit => l(:label_currency), :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 => 'done_ratio')) %>
|
||||
<%= Redmine::Hook.call_hook(:plugin_budget_view_deliverable_summary_row, { :deliverable => deliverable }) %>
|
||||
|
||||
Reference in New Issue
Block a user