186 lines
11 KiB
Plaintext
186 lines
11 KiB
Plaintext
<% validated_period = validate_period(deliverable, period) %>
|
|
|
|
<td colspan="13" class="deliverable_details_outer_wrapper_<%= h(deliverable.id) %>">
|
|
|
|
<div class="expanded">
|
|
|
|
<div class="info">
|
|
<div class="title">
|
|
<%= link_to(l(:button_edit), edit_contract_deliverable_path(@project, contract, deliverable), :class => 'icon icon-edit') %>
|
|
<%= link_to(l(:button_delete), contract_deliverable_path(@project, contract, deliverable), :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') if contract.open? %>
|
|
</div>
|
|
|
|
<%= textilizable(deliverable, :notes) %>
|
|
|
|
<% if deliverable.retainer? %>
|
|
<form method="get" action="<%= contract_deliverable_path(@project, contract, deliverable, :format => 'js', :as => 'deliverable_details_row') %>">
|
|
<fieldset>
|
|
<select name="period" id="retainer_period_change_<%= h(deliverable.id) %>" class="retainer_period_change">
|
|
<%= retainer_period_options(deliverable, :selected => validated_period) %>
|
|
</select>
|
|
</fieldset>
|
|
</form>
|
|
<% end %>
|
|
|
|
<table>
|
|
<%= show_field(deliverable, :current_period, :html_options => {:class => 'deliverable-current-period'}) if deliverable.retainer? %>
|
|
<tr><td colspan="2"><%= release(5, "Retainer lightbox") %></td></tr>
|
|
<%= show_field(deliverable, :start_date, :format => :format_date, :html_options => {:class => 'deliverable-start-date'}) %>
|
|
<%= show_field(deliverable, :end_date, :format => :format_date, :html_options => {:class => 'deliverable-end-date'}) %>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="finance">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<th><%= l(:field_spent) %></th>
|
|
<th><%= l(:field_budget) %></th>
|
|
<th><%= l(:field_hours) %></th>
|
|
<th><%= l(:field_estimated) %></th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr class="fill">
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</tfoot>
|
|
<tbody>
|
|
<tr>
|
|
<td class="l">
|
|
<%= link_to(l(:field_labor), "#", :class => 'deliverable-action-link deliverable-lightbox', "data-deliverable-id" => h(deliverable.id)) %>
|
|
</td>
|
|
<td class="labor_budget_spent <%= overage_class(deliverable.labor_budget_spent(validated_period), deliverable.labor_budget_total(validated_period)) %>">
|
|
<%= 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">
|
|
<%= h(format_value_field_for_contracts(deliverable.labor_budget_hours(validated_period))) %> <%= l(:text_short_hours) %>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="l">
|
|
<%= link_to(l(:field_overhead), "#", :class => 'deliverable-action-link deliverable-lightbox', "data-deliverable-id" => h(deliverable.id)) %>
|
|
</td>
|
|
<td class="overhead_budget_spent <%= overage_class(deliverable.overhead_spent(validated_period), deliverable.overhead_budget_total(validated_period)) %>">
|
|
<%= 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">
|
|
<%= h(format_value_field_for_contracts(deliverable.overhead_budget_hours(validated_period))) %> <%= l(:text_short_hours) %>
|
|
</td>
|
|
</tr>
|
|
|
|
<% deliverable.fixed_budgets.by_period(validated_period).each do |fixed_budget| %>
|
|
<% next if fixed_budget.blank_record? %>
|
|
<tr id="fixed_budget_<%= fixed_budget.id %>">
|
|
<td class="l fixed_title" title="<%= h(fixed_budget.description) %>"><%= h(fixed_budget.title) %></td>
|
|
<td class="fixed_budget_spent <%= overage_class(fixed_budget.budget_spent, fixed_budget.budget) %>">
|
|
<%= h(format_value_field_for_contracts(fixed_budget.budget_spent)) %>
|
|
</td>
|
|
<td class="fixed_budget_total"><%= h(format_value_field_for_contracts(fixed_budget.budget)) %></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<% end %>
|
|
|
|
<% if show_markup_for?(deliverable, validated_period) %>
|
|
<tr>
|
|
<td class="l"><%= l(:field_markup) %></td>
|
|
<td class="fixed_markup_budget_spent <%= overage_class(deliverable.fixed_markup_budget_total_spent(validated_period), deliverable.fixed_markup_budget_total(validated_period)) %>">
|
|
<%= h(format_value_field_for_contracts(deliverable.fixed_markup_budget_total_spent(validated_period))) %>
|
|
</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 %>
|
|
|
|
<tr>
|
|
<td class="l"><%= l(:field_profit) %></td>
|
|
<td class="profit_spent">
|
|
<%= h(format_value_field_for_contracts(deliverable.profit_left(validated_period))) %>
|
|
</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>
|
|
<td class="total_spent <%= overage_class(deliverable.total_spent(validated_period), deliverable.total(validated_period)) %>">
|
|
<strong>
|
|
<%= h(format_value_field_for_contracts(deliverable.total_spent(validated_period))) %>
|
|
</strong>
|
|
</td>
|
|
<td class="total"><strong><%= h(format_value_field_for_contracts(deliverable.total(validated_period))) %></strong></td>
|
|
<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> <%= 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>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="issue_status">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th colspan="2"><%= l(:label_issue_status_plural) %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% deliverable.issues_by_status.each do |status, issues| %>
|
|
<tr>
|
|
<td>
|
|
<%= link_to_issue_list_with_filter(status.name,
|
|
:deliverable_id => deliverable.id,
|
|
:status_id => status.id) %>
|
|
</td>
|
|
<td class="number">
|
|
<%= link_to_issue_list_with_filter(issues.length,
|
|
:deliverable_id => deliverable.id,
|
|
:status_id => status.id) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<tr>
|
|
<td><strong>
|
|
<%= link_to_issue_list_with_filter(l(:label_all).capitalize,
|
|
:deliverable_id => deliverable.id) %>
|
|
</strong></td>
|
|
<td class="number">
|
|
<%= link_to_issue_list_with_filter(deliverable.issues.count,
|
|
:deliverable_id => deliverable.id) %>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
</td>
|
|
|