[% account_data = report.account_data; FORMATS = LIST_FORMATS(); LINK = request.script _ '?' _ request.query_string _ '&company=' _ DBNAME; LINK = LINK.replace('\&\&', '&'); DRILLBASE = 'journal.pl?sort=transdate&&category=X' _ '&col_transdate=Y&col_reference=Y&col_description=Y' _ '&col_debits=Y&col_credits=Y&col_source=Y' _ '&col_accno=Y&action=search&col_running_balance=Y'; max_path_depth = 0; FOREACH row IN report.sorted_row_ids ; IF max_path_depth < report.rheads.ids.$row.path.size ; max_path_depth = report.rheads.ids.$row.path.size; END; END; IF report.legacy_hierarchy ; hierarchy = 'flat-hierarchy'; ELSE ; hierarchy = 'full-hierarchy'; END ; %]

[% name %]

[% company_name %]
[% company_address %]
[% i = 1; WHILE i <= max_path_depth; ' '; i = i + 1; END; %] [% i = 1; WHILE i <= report.cheads.ids.keys.size; ' '; i = i + 1; END; %] [% FOREACH col IN report.sorted_col_ids -%] [% END -%] [% FOREACH row IN report.sorted_row_ids ; path_depth = report.rheads.ids.$row.path.size; path_prefix_len = path_depth - 1; path_suffix_len = max_path_depth - path_prefix_len; IF report.rheads.ids.$row.props.account_type == 'H' ; class = 'class="heading' _ path_depth _ ' ' _ report.rheads.ids.$row.props.account_type _ '"'; clazz = "heading" _ path_depth _ ' ' _ report.rheads.ids.$row.props.account_type; ELSIF report.rheads.ids.$row.props.section_for ; row_id = report.rheads.ids.$row.props.section_for ; class = 'class="section' _ path_depth _ ' ' _ report.rheads.ids.$row_id.props.account_category _ '"'; clazz = "section" _ path_depth _ ' ' _ report.rheads.ids.$row_id.props.account_category; ELSE; class = 'class="account"'; clazz = 'account'; END; %] [% colspan = 1; WHILE colspan <= path_prefix_len; colspan = colspan + 1; -%] [%- END -%] [% FOREACH col IN report.sorted_col_ids -%] [% END %] [% END %] [% END %]
[% report.cheads.ids.$col.props.description %]
  [% IF report.rheads.ids.$row.props.section_for ; head_id = report.rheads.ids.$row.props.section_for; report.rheads.ids.$head_id.props.account_description; %] [% ELSE -%] [% IF report.rheads.ids.$row.props.account_number && report.incl_accnos; -%] [% report.rheads.ids.$row.props.account_number %] - [% END; -%] [% report.rheads.ids.$row.props.account_description %][% report.cells.$row.$col %]
[% IF FORMATS.grep('PDF').size() %]