diff --git a/app/views/deliverables/_finances.html.erb b/app/views/deliverables/_finances.html.erb
index bb95dd6..2ff292d 100644
--- a/app/views/deliverables/_finances.html.erb
+++ b/app/views/deliverables/_finances.html.erb
@@ -22,38 +22,38 @@
<% deliverable.billable_time_entry_activities.each do |activity| %>
<% content_tag_for(:tr, activity, :class => 'labor ' + cycle('even','')) do %>
-
+ |
<%= h(activity.name) %>
|
-
+ |
<%= number_to_currency(deliverable.spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_to_currency(deliverable.budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.hours_spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.hours_budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
<% end %>
<% end %>
- |
+ |
Totals
|
-
+ |
<%= number_to_currency(deliverable.labor_budget_spent, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_to_currency(deliverable.labor_budget_total, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.labor_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.labor_budget_hours, :precision => Deliverable::ViewPrecision) %>
|
@@ -72,38 +72,38 @@
<% deliverable.non_billable_time_entry_activities.each do |activity| %>
<% content_tag_for(:tr, activity, :class => 'overhead ' + cycle('even','')) do %>
-
+ |
<%= h(activity.name) %>
|
-
+ |
<%= number_to_currency(deliverable.spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_to_currency(deliverable.budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.hours_spent_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.hours_budget_for_activity(activity), :precision => Deliverable::ViewPrecision) %>
|
<% end %>
<% end %>
- |
+ |
Totals
|
-
+ |
<%= number_to_currency(deliverable.overhead_spent, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_to_currency(deliverable.overhead_budget_total, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.overhead_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.overhead_budget_hours, :precision => Deliverable::ViewPrecision) %>
|
@@ -127,26 +127,26 @@
<% deliverable.users_with_billable_time.sort.each do |user| %>
<% content_tag_for(:tr, user, :class => 'labor ' + cycle('even','')) do %>
-
+ |
<%= h(user.name) %>
|
-
+ |
<%= number_to_currency(deliverable.spent_for_user(user, true), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.hours_spent_for_user(user, true), :precision => Deliverable::ViewPrecision) %>
|
<% end %>
<% end %>
- |
+ |
Totals
|
-
+ |
<%= number_to_currency(deliverable.labor_budget_spent, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.labor_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
@@ -165,26 +165,26 @@
<% deliverable.users_with_non_billable_time.sort.each do |user| %>
<% content_tag_for(:tr, user, :class => 'overhead ' + cycle('even','')) do %>
-
+ |
<%= h(user.name) %>
|
-
+ |
<%= number_to_currency(deliverable.spent_for_user(user, false), :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.hours_spent_for_user(user, false), :precision => Deliverable::ViewPrecision) %>
|
<% end %>
<% end %>
- |
+ |
Totals
|
-
+ |
<%= number_to_currency(deliverable.overhead_spent, :precision => Deliverable::ViewPrecision) %>
|
-
+ |
<%= number_with_precision(deliverable.overhead_hours_spent_total, :precision => Deliverable::ViewPrecision) %>
|
diff --git a/assets/stylesheets/redmine_contracts.css b/assets/stylesheets/redmine_contracts.css
index 870c1fb..2a778ce 100644
--- a/assets/stylesheets/redmine_contracts.css
+++ b/assets/stylesheets/redmine_contracts.css
@@ -51,10 +51,8 @@ padding-left: 0px; /* Don't pad submit buttons */
.deliverable_finance_table td { padding-left: 0px; }
-input.financial{
- text-align: right;
- width: 65px;
-}
+.financial, .numeric { text-align: right; }
+input.financial{ width: 65px; }
table.striped-contract-style { border-collapse: collapse; }
@@ -535,3 +533,4 @@ div.fixed-budget-form {padding: 5px 0;}
.deliverable-finance-report { float: left; padding: 0 5px; }
#finance-summary { font-size: 1.2em; color: #666666; }
#finance-summary span { padding: 0; font-weight: bold; color: #000000; }
+table.striped-contract-style td.financial, table.striped-contract-style td.numeric { text-align: right; }
diff --git a/test/integration/deliverable_finances_test.rb b/test/integration/deliverable_finances_test.rb
index 6a9030f..3d83d98 100644
--- a/test/integration/deliverable_finances_test.rb
+++ b/test/integration/deliverable_finances_test.rb
@@ -80,20 +80,20 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
should "render the labor activities table for the deliverable" do
assert_select "table#deliverable-labor-activities" do
- assert_select "tr" do
- assert_select "td.labor", :text => /#{@billable_activity.name}/
- assert_select "td.spent-amount.labor", :text => /\$200/
- assert_select "td.total-amount.labor", :text => /\$300/
- assert_select "td.spent-hours.labor", :text => /2/
- assert_select "td.total-deliverable-hours.labor", :text => /30/ # 3 month retainer * 10
+ assert_select "tr.labor" do
+ assert_select "td", :text => /#{@billable_activity.name}/
+ assert_select "td.spent-amount", :text => /\$200/
+ assert_select "td.total-amount", :text => /\$300/
+ assert_select "td.spent-hours", :text => /2/
+ assert_select "td.total-deliverable-hours", :text => /30/ # 3 month retainer * 10
end
- assert_select "tr.summary-row" do
- assert_select "td.labor", :text => /Totals/
- assert_select "td.spent-amount.labor", :text => /\$200/
- assert_select "td.total-amount.labor", :text => /\$300/
- assert_select "td.spent-hours.labor", :text => /2/
- assert_select "td.total-deliverable-hours.labor", :text => /30/
+ assert_select "tr.summary-row.labor" do
+ assert_select "td", :text => /Totals/
+ assert_select "td.spent-amount", :text => /\$200/
+ assert_select "td.total-amount", :text => /\$300/
+ assert_select "td.spent-hours", :text => /2/
+ assert_select "td.total-deliverable-hours", :text => /30/
end
end
@@ -101,20 +101,20 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
should "render the overhead activities table for the deliverable" do
assert_select "table#deliverable-overhead-activities" do
- assert_select "tr" do
- assert_select "td.overhead", :text => /#{@non_billable_activity.name}/
- assert_select "td.spent-amount.overhead", :text => /\$500/
- assert_select "td.total-amount.overhead", :text => /\$600/
- assert_select "td.spent-hours.overhead", :text => /5/
- assert_select "td.total-deliverable-hours.overhead", :text => /30/ # 3 month retainer * 10
+ assert_select "tr.overhead" do
+ assert_select "td", :text => /#{@non_billable_activity.name}/
+ assert_select "td.spent-amount", :text => /\$500/
+ assert_select "td.total-amount", :text => /\$600/
+ assert_select "td.spent-hours", :text => /5/
+ assert_select "td.total-deliverable-hours", :text => /30/ # 3 month retainer * 10
end
- assert_select "tr.summary-row" do
- assert_select "td.overhead", :text => /Totals/
- assert_select "td.spent-amount.overhead", :text => /\$500/
- assert_select "td.total-amount.overhead", :text => /\$600/
- assert_select "td.spent-hours.overhead", :text => /5/
- assert_select "td.total-deliverable-hours.overhead", :text => /30/
+ assert_select "tr.summary-row.overhead" do
+ assert_select "td", :text => /Totals/
+ assert_select "td.spent-amount", :text => /\$500/
+ assert_select "td.total-amount", :text => /\$600/
+ assert_select "td.spent-hours", :text => /5/
+ assert_select "td.total-deliverable-hours", :text => /30/
end
end
@@ -122,16 +122,16 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
should "render the labor finances for each user for the deliverable" do
assert_select "table#deliverable-labor-users" do
- assert_select "tr" do
- assert_select "td.labor", :text => /#{@manager.name}/
- assert_select "td.amount-cost.labor", :text => /\$200/
- assert_select "td.time-cost.labor", :text => /2/
+ assert_select "tr.labor" do
+ assert_select "td", :text => /#{@manager.name}/
+ assert_select "td.amount-cost", :text => /\$200/
+ assert_select "td.time-cost", :text => /2/
end
assert_select "tr.summary-row" do
- assert_select "td.labor", :text => /Totals/
- assert_select "td.amount-cost.labor", :text => /\$200/
- assert_select "td.time-cost.labor", :text => /2/
+ assert_select "td", :text => /Totals/
+ assert_select "td.amount-cost", :text => /\$200/
+ assert_select "td.time-cost", :text => /2/
end
end
@@ -139,16 +139,16 @@ class DeliverableFinancesShowTest < ActionController::IntegrationTest
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/
+ assert_select "tr.overhead" do
+ assert_select "td", :text => /#{@manager.name}/
+ assert_select "td.amount-cost", :text => /\$500/
+ assert_select "td.time-cost", :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/
+ assert_select "tr.summary-row.overhead" do
+ assert_select "td", :text => /Totals/
+ assert_select "td.amount-cost", :text => /\$500/
+ assert_select "td.time-cost", :text => /5/
end
end