|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
subrows |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
walker.for_empty_cell { "<td></td>" } |
|
|
|
|
walker.for_empty_cell { "<td> </td>" } |
|
|
|
|
|
|
|
|
|
walker.for_cell do |result| |
|
|
|
|
"<td>#{number_to_currency result.real_costs}</td>" |
|
|
|
@ -23,27 +23,30 @@ |
|
|
|
|
%> |
|
|
|
|
|
|
|
|
|
<table style='text-align: center' border='1'> |
|
|
|
|
<% walker.headers do |list, first| %> |
|
|
|
|
<tr> |
|
|
|
|
<% walker.headers do |list, first, first_in_col, last_in_col| %> |
|
|
|
|
<%= '<tr>' if first_in_col %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column)}' colspan='#{query.depth_of(:row) - 1}'></td>" if first %> |
|
|
|
|
<% list.each do |column| %> |
|
|
|
|
<td colspan="<%= column.final_number(:column) %>"><%= show_row column %></td> |
|
|
|
|
<% end %> |
|
|
|
|
<%= "<td rowspan='#{@query.depth_of(:column)}' colspan='#{query.depth_of(:row) - 1}'></td>" if first %> |
|
|
|
|
</tr> |
|
|
|
|
<%= '</tr>' if last_in_col %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% walker.body do |line| %> |
|
|
|
|
<tr><%= line %></tr> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% walker.headers(:reverse) do |list, final| %> |
|
|
|
|
<% walker.headers(:reverse) do |list, final, first_in_col, last_in_col| %> |
|
|
|
|
<% first = list.first.final_column? %> |
|
|
|
|
<tr> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column)}' colspan='#{query.depth_of(:row) - 1}'></td>" if first %> |
|
|
|
|
<% list.each do |column| %> |
|
|
|
|
<td colspan="<%= column.final_number(:column) %>"><%= number_to_currency column.real_costs %></td> |
|
|
|
|
<% end %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column)}' colspan='#{query.depth_of(:row) - 1}'>#{number_to_currency query.real_costs}</td>" if first %> |
|
|
|
|
</tr> |
|
|
|
|
<%= '<tr>' if first_in_col %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column)}' colspan='#{query.depth_of(:row) - 1}'></td>" if first && first_in_col %> |
|
|
|
|
<% list.each do |column| %> |
|
|
|
|
<td colspan="<%= column.final_number(:column) %>"><%= number_to_currency column.real_costs %></td> |
|
|
|
|
<% end %> |
|
|
|
|
<% if first && last_in_col %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column)}' colspan='#{query.depth_of(:row) - 1}'>#{number_to_currency query.real_costs}</td>" %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= '</tr>' if last_in_col %> |
|
|
|
|
<% end %> |
|
|
|
|
</table> |