[% PROCESS "elements.html"; PROCESS "dynatable.html"; LINK = request.script _ '?' _ request.query_string _ '&company=' _ DBNAME; %]
[% name %]
[% request.company %]
[% FOREACH LINE IN hlines %]
[% request.${LINE.name} %]
[% END %]
[% FOREACH KEY IN [ 'entity_class', 'to_date', 'report_type', 'overdue', 'c0', 'c30', 'c60', 'c90']; IF KEY == 'rows'; NEXT; ELSE; PROCESS input element_data = { name = KEY type = 'hidden' value = request.$KEY }; END; END; PROCESS input element_data = { name = 'rowcount' value = rows.size type = 'hidden' }; PROCESS dynatable tbody = {rows = rows } attributes = {id = 'aging', class = 'report' }; PROCESS select element_data = { name = 'print_template' options = [{text = 'Statement', value = 'statement'}] class = 'print_template' }; PRINTERS.push({text = text('Email'), value = 'email' }); PFORMATS = [ ]; FOREACH F IN LIST_FORMATS(); PFORMATS.push({text = F, value = F}); END; PROCESS select element_data = { name = 'print_format' options = PFORMATS default_values = [ 'PDF' ] class = 'print_format' }; PROCESS select element_data = { name = 'media' options = PRINTERS class = 'printers' }; PROCESS input element_data = { name = 'copies' value = '1' type = 'text' size = '2' class = 'smallint' }; PROCESS button element_data = { text = text('Generate') name = 'action' value = 'generate_statement' class = 'submit' 'data-dojo-type' = 'lsmb/PrintButton' 'data-dojo-props' = 'minimalGET:false' }; %]

[[% text('permalink') %]]  [% IF FORMATS.grep('PDF').size() %] [[% text('PDF') %]]  [% END; IF FORMATS.grep('TXT').size(); %] [[% text('CSV') %]]  [% END; IF FORMATS.grep('XLS').size() %] [[% text('XLS') %]]  [% END; IF FORMATS.grep('XLSX').size() %] [[% text('XLSX') %]]  [% END; IF FORMATS.grep('ODS').size() %] [[% text('ODS') %]]  [% END; %]