[% PROCESS elements.html; PROCESS dynatable.html; %]
[% text('Create Batch') %]
[% text("Batch Number") %]
[% PROCESS input element_data = { name = "batch_number" type = "text" value = batch.batch_number } %]
[% text("Description") %]
[% PROCESS input element_data = { name = "description" type = "text" value = batch.batch_number } %]
[% text("Batch Date") %]
[% PROCESS input element_data = { type = "date" class = "date" name = "batch_date" required = "true" value = batch.batch_date } %]
[% PROCESS button element_data = { value = "create_vouchers" type = "submit" class = "submit" name = "__action" text = text('Continue') } %]
[% hidden_url_base = ''; FOREACH item = batch.hidden; IF item.value; hidden_url_base = hidden_url_base _ '&' _ item.name _ '=' _ item.value; END; %] [% PROCESS input element_data = { type = "hidden" name = item.name value = item.value } %] [% END %]
[% text('Or Add To Batch') %]
[% FOREACH row IN batch.search_results; row.row_id = row.id; END; PROCESS dynatable attributes = {id = 'batch_list'} tbody = {rows = batch.search_results} columns = [ { col_id='control_code', type='href', name=text('Batch Number'), #' href_base="vouchers.pl?__action=add_vouchers" _ hidden_url_base _ "&batch_id=" } { col_id='description', type='text', name = text('Description') } { col_id='created_by', type='text', name = text('Created By') } #' { col_id='created_on', type='text', name = text('Created On') } #' { col_id='default_date', type='text', name = text('Post Date') } #' ]; %]