|
|
|
@ -15,7 +15,7 @@ |
|
|
|
|
subrows |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
walker.for_empty_cell { "<td> </td>" } |
|
|
|
|
walker.for_empty_cell { "<td> #{":)" if params[:debug]}</td>" } |
|
|
|
|
|
|
|
|
|
walker.for_cell do |result| |
|
|
|
|
"<td>#{number_to_currency result.real_costs}#{"," << result.fields.inspect if params[:debug]}</td>" |
|
|
|
@ -25,11 +25,11 @@ |
|
|
|
|
<table style="text-align: center; border-collapse: collapse" border="1"> |
|
|
|
|
<% 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 %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column) + 1}' 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 %> |
|
|
|
|
<%= "<td rowspan='#{@query.depth_of(:column) + 1}' colspan='#{query.depth_of(:row) - 1}'></td>" if first %> |
|
|
|
|
<%= '</tr>' if last_in_col %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
@ -40,12 +40,12 @@ |
|
|
|
|
<% walker.headers(:reverse) do |list, final, first_in_col, last_in_col| %> |
|
|
|
|
<% first = list.first.final_column? %> |
|
|
|
|
<%= '<tr>' if first_in_col %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column)}' colspan='#{query.depth_of(:row) - 1}'></td>" if first && first_in_col %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column) + 1}' 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>" %> |
|
|
|
|
<%= "<td rowspan='#{query.depth_of(:column) + 1}' colspan='#{query.depth_of(:row) - 1}'>#{number_to_currency query.real_costs}</td>" %> |
|
|
|
|
<% end %> |
|
|
|
|
<%= '</tr>' if last_in_col %> |
|
|
|
|
<% end %> |
|
|
|
|