|
<% _.each(datatable.getSubtables(), function(subtable, subtableIndex){
if(subtable.getType() != 'curyear'){
//# PREVYEAR/BUDGET COLUMNS
var column = subtable.getLastColumn();
if(options.hasCompareLastYearPeriod || subtable.getType() != 'compareyear'){ %>
<% total_columns += 2; %>
style="width:<%= width %>px;"><%= column.getFullname() %> |
<%= subtable.getCompareColumn().getFullname() %> |
<% }
if(!params.hide_totals && (options.hasCompareLastYearTotal || subtable.getType() != 'compareyear') && (options.hasCompareBudgetTotal || subtable.getType() != 'comparebudget')){ %>
<% total_columns += 2; %>
style="width:<%= width + 10 %>px;"><%= subtable.getTotalColumn().getFullname() %> |
<%= subtable.getCompareYearColumn().getFullname() %> |
<% }
}else{
//# CURYEAR COLUMNS
_.each(subtable.getColumns(), function(column, index0){ %>
<% total_columns++; %>
style="width:<%= width %>px;"><%= column.getFullname() %> |
<% });
if(!subtable.hasOnlyOneColumn()){ %>
<% if(options.hasCompareLastPeriod){ %>
<% total_columns++; %>
<%= subtable.getCompareColumn().getFullname() %>
| <% }
if(options.hasSamePeriodsCur){ %>
<% total_columns += 2; %>
|
|
<% }
}
if(!params.hide_totals){ %>
<% total_columns++; %>
style="width:<%= width + 10 %>px;"><%= subtable.getTotalColumn().getFullname() %> |
<% } %>
<% } %>
<% }); %>