[#4647] Split the hours and estimates in the Deliverable details row
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
<th><%= l(:field_spent) %></th>
|
||||
<th><%= l(:field_budget) %></th>
|
||||
<th><%= l(:field_hours) %></th>
|
||||
<th><%= l(:field_estimated) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
@@ -47,6 +48,7 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@@ -56,8 +58,11 @@
|
||||
<%= h(format_value_field_for_contracts(deliverable.labor_budget_spent(validated_period))) %>
|
||||
</td>
|
||||
<td class="labor_budget_total"><%= h(format_value_field_for_contracts(deliverable.labor_budget_total(validated_period))) %></td>
|
||||
<td class="labor_hours_spent">
|
||||
<span class="<%= overage_class(deliverable.labor_hours_spent_total(validated_period), deliverable.labor_budget_hours(validated_period)) %>"><%= h(format_value_field_for_contracts(deliverable.labor_hours_spent_total(validated_period))) %></span> <%= l(:text_short_hours) %>
|
||||
</td>
|
||||
<td class="labor_hours">
|
||||
<span class="<%= overage_class(deliverable.labor_hours_spent_total(validated_period), deliverable.labor_budget_hours(validated_period)) %>"><%= h(format_value_field_for_contracts(deliverable.labor_hours_spent_total(validated_period))) %></span>/<%= h(format_value_field_for_contracts(deliverable.labor_budget_hours(validated_period))) %> <%= l(:text_short_hours) %>
|
||||
<%= h(format_value_field_for_contracts(deliverable.labor_budget_hours(validated_period))) %> <%= l(:text_short_hours) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -66,8 +71,11 @@
|
||||
<%= h(format_value_field_for_contracts(deliverable.overhead_spent(validated_period))) %>
|
||||
</td>
|
||||
<td class="overhead_budget_total"><%= h(format_value_field_for_contracts(deliverable.overhead_budget_total(validated_period))) %></td>
|
||||
<td class="overhead_hours_spent">
|
||||
<span class="<%= overage_class(deliverable.overhead_hours_spent_total(validated_period), deliverable.overhead_budget_hours(validated_period)) %>"><%= h(format_value_field_for_contracts(deliverable.overhead_hours_spent_total(validated_period))) %></span> <%= l(:text_short_hours) %>
|
||||
</td>
|
||||
<td class="overhead_hours">
|
||||
<span class="<%= overage_class(deliverable.overhead_hours_spent_total(validated_period), deliverable.overhead_budget_hours(validated_period)) %>"><%= h(format_value_field_for_contracts(deliverable.overhead_hours_spent_total(validated_period))) %></span>/<%= h(format_value_field_for_contracts(deliverable.overhead_budget_hours(validated_period))) %> <%= l(:text_short_hours) %>
|
||||
<%= h(format_value_field_for_contracts(deliverable.overhead_budget_hours(validated_period))) %> <%= l(:text_short_hours) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -80,6 +88,7 @@
|
||||
</td>
|
||||
<td class="fixed_budget_total"><%= h(format_value_field_for_contracts(fixed_budget.budget)) %></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -91,6 +100,8 @@
|
||||
</td>
|
||||
<td class="fixed_markup_budget_total"><%= h(format_value_field_for_contracts(deliverable.fixed_markup_budget_total(validated_period))) %></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -101,6 +112,8 @@
|
||||
</td>
|
||||
<td class="profit_total"><%= h(format_value_field_for_contracts(deliverable.profit_budget(validated_period))) %></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<td class="l"><strong><%= l(:field_total) %>:</strong></td>
|
||||
@@ -110,10 +123,15 @@
|
||||
</strong>
|
||||
</td>
|
||||
<td class="total"><strong><%= h(format_value_field_for_contracts(deliverable.total(validated_period))) %></strong></td>
|
||||
<td class="total_hours">
|
||||
<td class="total_hours_spent">
|
||||
<strong>
|
||||
<span class="<%= overage_class(deliverable.hours_spent_total(validated_period), deliverable.estimated_hour_budget_total(validated_period)) %>">
|
||||
<%= h(format_value_field_for_contracts(deliverable.hours_spent_total(validated_period))) %></span>/<%= h(format_value_field_for_contracts(deliverable.estimated_hour_budget_total(validated_period))) %> <%= l(:text_short_hours) %>
|
||||
<%= h(format_value_field_for_contracts(deliverable.hours_spent_total(validated_period))) %></span> <%= l(:text_short_hours) %>
|
||||
</strong>
|
||||
</td>
|
||||
<td class="total_hours">
|
||||
<strong>
|
||||
<%= h(format_value_field_for_contracts(deliverable.estimated_hour_budget_total(validated_period))) %> <%= l(:text_short_hours) %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -77,3 +77,4 @@ en:
|
||||
field_profit: Profit
|
||||
text_error_message_orphaned_time: "There is {{amount}} worth of time clocked to issues that are not assigned to any deliverables."
|
||||
text_error_message_update_orphaned_time: "Please update the orphaned issues."
|
||||
field_estimated: Estimated
|
||||
|
||||
@@ -331,7 +331,8 @@ class ContractsShowTest < ActionController::IntegrationTest
|
||||
|
||||
visit_contract_page(@contract)
|
||||
assert_select "table#deliverables" do
|
||||
assert_select "td.labor_hours", :text => /10\/100/
|
||||
assert_select "td.labor_hours_spent", :text => /10/
|
||||
assert_select "td.labor_hours", :text => /100/
|
||||
end
|
||||
|
||||
end
|
||||
@@ -365,7 +366,8 @@ class ContractsShowTest < ActionController::IntegrationTest
|
||||
|
||||
visit_contract_page(@contract)
|
||||
assert_select "table#deliverables" do
|
||||
assert_select "td.overhead_hours", :text => /5\/100/
|
||||
assert_select "td.overhead_hours_spent", :text => /5/
|
||||
assert_select "td.overhead_hours", :text => /100/
|
||||
end
|
||||
|
||||
end
|
||||
@@ -408,7 +410,8 @@ class ContractsShowTest < ActionController::IntegrationTest
|
||||
|
||||
visit_contract_page(@contract)
|
||||
assert_select "table#deliverables" do
|
||||
assert_select "td.total_hours", :text => /15\/200/
|
||||
assert_select "td.total_hours_spent", :text => /15/
|
||||
assert_select "td.total_hours", :text => /200/
|
||||
end
|
||||
|
||||
end
|
||||
@@ -489,9 +492,9 @@ class ContractsShowTest < ActionController::IntegrationTest
|
||||
assert_select '#deliverables .labor_budget_spent.overage'
|
||||
assert_select '#deliverables .overhead_budget_spent.overage'
|
||||
assert_select '#deliverables .profit_spent.overage'
|
||||
assert_select '#deliverables .labor_hours .overage'
|
||||
assert_select '#deliverables .overhead_hours .overage'
|
||||
assert_select '#deliverables .total_hours .overage'
|
||||
assert_select '#deliverables .labor_hours_spent .overage'
|
||||
assert_select '#deliverables .overhead_hours_spent .overage'
|
||||
assert_select '#deliverables .total_hours_spent .overage'
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user