diff --git a/app/views/deliverables/_finances.html.erb b/app/views/deliverables/_finances.html.erb index d0a557d..4f7b7f8 100644 --- a/app/views/deliverables/_finances.html.erb +++ b/app/views/deliverables/_finances.html.erb @@ -154,4 +154,42 @@ + + + + + + + + + <% deliverable.users_with_non_billable_time.sort.each do |user| %> + + <% content_tag_for(:tr, user, :class => 'overhead ' + cycle('even','')) do %> + + + + <% end %> + + <% end %> + + + + + + + +
<%= l(:field_overhead) %><%= l(:field_cost) %><%= l(:field_hours) %>
+ <%= h(user.name) %> + + <%= number_to_currency(deliverable.spent_for_user(user, false), :precision => 0) %> + + <%= number_with_precision(deliverable.hours_spent_for_user(user, false), :precision => 0) %> +
+ Totals + + <%= number_to_currency(deliverable.overhead_spent, :precision => 0) %> + + <%= number_with_precision(deliverable.overhead_hours_spent_total, :precision => 0) %> +
+ <%# /div.users %> diff --git a/test/integration/deliverable_finances_test.rb b/test/integration/deliverable_finances_test.rb index 9ae7aca..be2007f 100644 --- a/test/integration/deliverable_finances_test.rb +++ b/test/integration/deliverable_finances_test.rb @@ -137,5 +137,22 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest end end + should "render the overhead finances for each user for the deliverable" do + assert_select "table#deliverable-overhead-users" do + assert_select "tr" do + assert_select "td.overhead", :text => /#{@manager.name}/ + assert_select "td.amount-cost.overhead", :text => /\$500/ + assert_select "td.time-cost.overhead", :text => /5/ + end + + assert_select "tr.summary-row" do + assert_select "td.overhead", :text => /Totals/ + assert_select "td.amount-cost.overhead", :text => /\$500/ + assert_select "td.time-cost.overhead", :text => /5/ + end + + end + end + end end