[% PROCESS "elements.html" %]
[% PROCESS input element_data = { type = "hidden" name = "rowcount" value = 1 }; PROCESS input element_data = { type = "hidden" name = "transdate_0" value = transdates.0 }; PROCESS input element_data = { type = "hidden" name = "transdate_1" value = transdates.1 }; PROCESS input element_data = { type = "hidden" name = "transdate_2" value = transdates.2 }; PROCESS input element_data = { type = "hidden" name = "transdate_3" value = transdates.3 }; PROCESS input element_data = { type = "hidden" name = "transdate_4" value = transdates.4 }; PROCESS input element_data = { type = "hidden" name = "transdate_5" value = transdates.5 }; PROCESS input element_data = { type = "hidden" name = "transdate_6" value = transdates.6 }; FOREACH bu IN b_units; bu.text = bu.control_code _ ' -- ' _ bu.description; END; %]
[% text('Weekly Time and Materials Entry') %]

[% transdates.0 %] | [% transdates.1 %] | [% transdates.2 %] | [% transdates.3 %] | [% transdates.4 %] | [% transdates.5 %] | [% transdates.6 %]
--- | --- | --- | --- | --- | --- | ---
[% FOR lnum IN [1 .. num_lines] %]
[% FOR dnum IN [0 .. 6] %] [% text('Report in') %] [% suffix = transdates.$dnum.replace('[./-]', '_') _ '_' _ lnum; PROCESS select element_data = { name = "business_unit_id_$suffix" default_values = [${"business_unit_id_$suffix"}] options = b_units text_attr = 'text' value_attr = 'id' } %] [% text('Currency') %] [% currencies2 = []; FOREACH curr IN currencies; currencies2.push({text = curr, value = curr }); END; PROCESS select element_data = { name = "curr_$suffix" options = currencies2 default_values = [${"curr_$suffix"}] }; %] [% text('Partnumber') %] [% text('Qty') %] [% PROCESS input element_data = { name = "qty_$suffix" value = ${"qty_$suffix"} class = 'qty' size = 5 } %] [% text('Extra Used') %] [% PROCESS input element_data = { name = "non_billable_$suffix" value = ${"non_billable_$suffix"} class = 'qty' size = 5 } %] [% text('Description') %] [% ${"description_$suffix"} %] [% END %]
[% END %]

[% PROCESS button element_data = { text = text('Save') name = '__action' value = 'save_week' type = 'submit' class = 'submit' 'data-lsmb-doing' = text('Saving...') 'data-lsmb-done' = text('Saved') } %]