[% PROCESS elements.html; PROCESS report_base.html; BALANCE_TYPES = [ {text = text('Debit'), id = -1} {text = text('Credit'), id = 1} {text = text('Normal'), id = 0} ]; TRIAL_BALANCE_TYPES = [ {text = text('Full'), id = 'sql-ledger' }, {text = text('Ending'), id = 'balance' } ] %]
[% IF report.id; INCLUDE input element_data = { type="hidden", name="report_id", value=report.id }; END;%]
Trial Balance [% id ? 'Edit' : 'Create'%] Report
[% PROCESS business_classes %] [% PROCESS date_row %]
[% PROCESS input element_data = { label = text('All accounts') name = 'all_accounts' type = 'checkbox' } %]
[% PROCESS input element_data = { name = 'is_approved' type = 'radio' value = 'Y' label = text('Approved') checked = 'CHECKED' }; %] [% PROCESS input element_data = { name = 'is_approved' type = 'radio' value = 'N' label = text('Unapproved') }; %] [% PROCESS input element_data = { name = 'is_approved' type = 'radio' value = 'All' label = text('All') }; %]
[% text('Balances as') %] [% PROCESS select element_data = { name = 'balance_sign' id = 'balance_sign' options = BALANCE_TYPES default_values = ['0'] value_attr = 'id' } %]
[% text('Report Type') %] [% PROCESS select element_data = { name = 'tb_type' options = TRIAL_BALANCE_TYPES value_attr = 'id' } %]

[% # Add in the list of accounts here.%] [% FOR heading IN headings%] [% FOR account IN heading.accounts%] [% END%] [% END%]
[% heading.accno%] -- [% heading.description%] [% IF report.heading_id; IF report.heading_id == heading.id; checked="checked"; END; ELSE; checked=undef; END; PROCESS input element_data = { type="radio", name="heading", id="heading-" _ heading.id, value=heading.id, checked=checked }%]

[% PROCESS button element_data={ text = text('Continue'), attributes = { name= '__action', value= 'run' } }%]