[#4477] Added the total FixedBudget markup to the deliverable details
This commit is contained in:
1 parent
ed7536897e
commit
081df7874d
2 files changed
+24
-1
No files matched your search
@@ -72,7 +72,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%# TODO: Release 2, Markup %>
|
<tr>
|
||||||
|
<td class="l"><%= l(:field_markup) %></td>
|
||||||
|
<td class="fixed_markup_budget_spent">0</td>
|
||||||
|
<td class="fixed_markup_budget_total"><%= h(format_value_field_for_contracts(deliverable.fixed_markup_budget_total(period))) %></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="l">Profit</td>
|
<td class="l">Profit</td>
|
||||||
<td><%= h(format_value_field_for_contracts(deliverable.profit_left(period))) %></td>
|
<td><%= h(format_value_field_for_contracts(deliverable.profit_left(period))) %></td>
|
||||||
|
|||||||
@@ -254,6 +254,23 @@ class ContractsShowTest < ActionController::IntegrationTest
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "show the total fixed markup budget in the details for the Deliverable" do
|
||||||
|
@manager = User.generate!
|
||||||
|
|
||||||
|
@deliverable1 = FixedDeliverable.generate!(:contract => @contract, :manager => @manager)
|
||||||
|
|
||||||
|
@budget1 = FixedBudget.generate!(:deliverable => @deliverable1, :title => 'Item 1', :budget => '$1,000', :markup => '$100')
|
||||||
|
@budget2 = FixedBudget.generate!(:deliverable => @deliverable1, :title => 'Item 2', :budget => '$2,000', :markup => '200%')
|
||||||
|
|
||||||
|
visit_contract_page(@contract)
|
||||||
|
assert_select "table#deliverables" do
|
||||||
|
assert_select "#deliverable_details_#{@deliverable1.id}" do
|
||||||
|
assert_select 'td.fixed_markup_budget_spent', :text => '0'
|
||||||
|
assert_select 'td.fixed_markup_budget_total', :text => '4,100'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
should "show the current period for a Retainer" do
|
should "show the current period for a Retainer" do
|
||||||
today_mock = Date.new(2010,2,15)
|
today_mock = Date.new(2010,2,15)
|
||||||
Date.stubs(:today).returns(today_mock)
|
Date.stubs(:today).returns(today_mock)
|
||||||
|
|||||||
Reference in new issue
Block a user