@@ -1,17 +1,17 | |||
|
1 | 1 | <% @available_criterias[criterias[level]][:values].each do |value| %> |
|
2 | 2 | <tr class="<%= cycle('odd', 'even') if criterias.length < level + 2 %>"> |
|
3 | 3 | <%= '<td></td>' * level %> |
|
4 | 4 | <td><%= value.name %></td> |
|
5 | 5 | <%= '<td></td>' * (criterias.length - level - 1) %> |
|
6 | 6 | <% hours_for_value = select_hours(hours, criterias[level], value.id) %> |
|
7 | 7 | <% @periods.each do |period| %> |
|
8 | 8 | <% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)) %> |
|
9 | <td align="center"><%= sum > 0 ? sum : "-" %></td> | |
|
9 | <td align="center"><%= sum > 0 ? "%.2f" % sum : "-" %></td> | |
|
10 | 10 | <% end %> |
|
11 | 11 | </tr> |
|
12 | 12 | <% if criterias.length > level+1 %> |
|
13 | 13 | <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %> |
|
14 | 14 | <% end %> |
|
15 | 15 | |
|
16 | 16 | <% end %> |
|
17 | 17 | <% reset_cycle %> |
General Comments 0
You need to be logged in to leave comments.
Login now