[#4477] Show the total fixed budget in the deliverable row

This commit is contained in:
Eric Davis
2010-09-17 13:27:35 -07:00
parent 294c88f11d
commit 86be29cecc
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -104,7 +104,7 @@
<td width="15%" class="manager"><%= h deliverable.manager.try(:name) %></td>
<%= format_budget_for_deliverable(deliverable, deliverable.labor_budget_spent, deliverable.labor_budget_total, :class => 'labor') %>
<%= format_budget_for_deliverable(deliverable, deliverable.overhead_spent, deliverable.overhead_budget_total, :class => 'overhead') %>
<%= format_budget_for_deliverable(deliverable, 0, 0) %><%# TODO: Release 2, Fixed Budgets %>
<%= format_budget_for_deliverable(deliverable, 0, deliverable.fixed_budget_total, :class => 'fixed') %>
<% end %>
<tr id="deliverable_details_<%= h(deliverable.id) %>" class="ign">
+17
View File
@@ -210,6 +210,23 @@ class ContractsShowTest < ActionController::IntegrationTest
end
should "show the total fixed budget for a Deliverable" do
@manager = User.generate!
@deliverable1 = FixedDeliverable.generate!(:contract => @contract, :manager => @manager)
FixedBudget.generate!(:deliverable => @deliverable1, :budget => '$1,000', :markup => '$100')
FixedBudget.generate!(:deliverable => @deliverable1, :budget => '$2,000', :markup => '200%')
visit_contract_page(@contract)
assert_select "table#deliverables" do
assert_select "td.fixed", :text => /3,000/
end
end
should "QUESTION: show the total fixed budget spent for a Deliverable"
should "show the current period for a Retainer" do
today_mock = Date.new(2010,2,15)
Date.stubs(:today).returns(today_mock)