[% PROCESS 'elements.html'; PROCESS 'report_base.html'; PROCESS 'utilities.html'; %]
[% FOR hidden IN ['id', 'parts_id']; PROCESS input element_data = { type = 'hidden' name = hidden value = $hidden }; END; %]
[% text('Time or Materials Card') %]

[% text('Category') %] :
[% text('Entered For') %] | [% FOREACH bu IN b_units; bu.text = bu.control_code _ ' -- ' _ bu.description; END; PROCESS select element_data = { name = "business_unit_id" default_values = [business_unit_id] options = b_units text_attr = 'text' value_attr = 'id' } %]
[% text('Partnumber') %] |
[% text('Description') %] | [% description %]
[% text('Date Worked') %] | [% PROCESS input element_data = { name = 'transdate' value = transdate type = 'text', size = '15', class = 'date' } %]
[% IF jctype.is_timecard OR jctype.is_service %]
[% text('Time In') %] | [% PROCESS input element_data = { name = 'in_hour' value = in_hour type = 'text' class = 'time-part' size = 3 maxlength = 2 } %] : [% PROCESS input element_data = { name = 'in_min' value = in_min type = 'text' class = 'time-part' size = 3 maxlength = 2 } %] | [% text('Time Out') %] | [% PROCESS input element_data = { name = 'out_hour' value = out_hour type = 'text' class = 'time-part' size = 3 maxlength = 2 } %] : [% PROCESS input element_data = { name = 'out_min' value = out_min type = 'text' class = 'time-part' size = 3 maxlength = 2 } %]
[% text('Clocked') %] | [% total %]
[% END # if is_service or is_timecard %]
[% text('Chargeable') %] | [% PROCESS input element_data = { name = 'qty' value = qty.defined ? qty : 0 type = 'text' class = 'qty' size = 16 } %]
[% text('Non-Chargeable') %] | [% PROCESS input element_data = { name = 'non_billable' value = non_billable.defined ? non_billable : 0 type = 'text' class = 'qty' size = 16 } %]
[% text('Currency') %] | [% currencies2 = []; FOREACH curr IN currencies; currencies2.push({text = curr, value = curr }); END; PROCESS select element_data = { name = "curr" options = currencies2 default_values = [curr] }; %]
[% text('Allocated') %] | [% allocated %]
[% text('Notes') %] | [% PROCESS textarea element_data = { name="notes" rows=2 cols=46 wrap="soft" text=notes } %]

[% IF id; formats = []; FOR F IN LIST_FORMATS(); IF F == 'HTML' or F == 'PDF'; formats.push({text = F, id = F}); END; END; PROCESS print_options; END; %] [% IF id; PROCESS button element_data = { name = '__action' class = 'submit' text = text('Print') value = 'print' "data-dojo-type" = "lsmb/PrintButton" }; ELSE; PROCESS button element_data = { name = '__action' type = 'submit' class = 'submit' text = text('Save') 'data-lsmb-doing' = text('Saving...') 'data-lsmb-done' = text('Saved') value = 'save' }; END; %]