[% PROCESS 'elements.html'; PROCESS 'report_base.html'; %]

[% text('Purchase History') %]
[% PROCESS entity_class %]
[% text('Entity Name') %] | [% INCLUDE input element_data = { size = 32, name = "name_part", type = "text" } %]
[% text('Contact Info') %] | [% INCLUDE input element_data = { size = 32 name = "contact_info" type = "text" } %]
Salesperson | [% INCLUDE input element_data = { size = 32 name = "salesperson" type = "text" } %]
[% IF account_class == 1; number_desc = text('Vendor Number'); #' ELSE; number_desc = text('Customer Number'); #' END; %] [% number_desc %] | [% INCLUDE input element_data = { name = "meta_number", size = "32", type = "text" } %]
[% text('Address') %] | [% INCLUDE input element_data = { name = "address_line", size = "32", type = "text" } %]
[% text('City') %] | [% INCLUDE input element_data = { name = "city", size = "32", type = "text" } %]
[% text('State/Province') %] | [% INCLUDE input element_data = { name = "state", size = "32", type = "text" } %]
[% text('Zip/Postal Code') %] | [% INCLUDE input element_data = { name = "zip", size = "10", type = "text" } %]
[% text('Country') %] | [% INCLUDE select element_data = { name = "country_id", text_attr = 'name', value_attr = 'id', options = country_list, default_blank = 1, } %]
[% text('Startdate') %] | [% INCLUDE input element_data = { name = "startdate_from", size = "11", type = "text", class = "date", title = user.dateformat, label = text('From') }; INCLUDE input element_data = { name = "startdate_to", size = "11", type = "text", class = "date", title = user.dateformat, label = text('To') } %]
[% text('Transaction Date') %] | [% INCLUDE input element_data = { name = "from_date", size = "11", type = "text", class = "date", title = user.dateformat, label = text('From') } ; INCLUDE input element_data = { name = "to_date", size = "11", type = "text", class = "date", title = user.dateformat, label = text('To') } %]
[% text('Include in Report') %]
[% INCLUDE input element_data = { checked = 'CHECKED', name = 'type', id = 'type-i', type = 'radio', class = 'radio', value = 'i' label = text('Invoices'), } %] | [% INCLUDE input element_data = { name = 'type', id = 'type-o', type = 'radio', class = 'radio', value = 'o' label = text('Orders'), } %] | [% INCLUDE input element_data = { name = 'type', id = 'type-q', type = 'radio', class = 'radio', value = 'q' label = text('Quotations'), } %]
[% INCLUDE input element_data = { type = 'checkbox', name = 'inc_open', value = '1', label = text('Open'), class = 'checkbox', checked = 'CHECKED' } %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'inc_closed', value = '1', label = text('Closed'), class = 'checkbox', checked = 'CHECKED' }; %]
[% INCLUDE input element_data= { label = text('Summary'), name = 'is_summary', id = 'is_summary-1', type = 'radio', value = '1', class = 'radio', checked = 'CHECKED' } %] | [% INCLUDE input element_data= { label = text('Detail'), name = 'is_summary', id = 'is_summary-0', type = 'radio', value = '0', class = 'radio', } %]
[% INCLUDE input element_data = { type = 'checkbox', name = 'l_partnumber', value = '1', label = text('Part Number'), #' class = 'checkbox', checked = 'CHECKED' }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_description', value = '1', label = text('Description'), class = 'checkbox', checked = 'CHECKED' }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_sellprice', value = '1', label = text('Sell Price'), #' class = 'checkbox', }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_curr', value = '1', label = text('Currency'), class = 'checkbox', }; %]
[% INCLUDE input element_data = { type = 'checkbox', name = 'l_qty', value = '1', label = text('Qty'), class = 'checkbox', checked = 'CHECKED' }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_unit', value = '1', label = text('Unit'), class = 'checkbox', checked = 'CHECKED' }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_discount', value = '1', label = text('Discount'), class = 'checkbox', }; %]
[% INCLUDE input element_data = { type = 'checkbox', name = 'l_deliverydate', value = '1', label = text('Delivery Date'), #' class = 'checkbox', }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_projectnumber', value = '1', label = text('Project Number'), #' class = 'checkbox', }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_serialnumber', value = '1', label = text('Serial Number'), #' class = 'checkbox', }; %] | [% INCLUDE input element_data = { type = 'checkbox', name = 'l_transdate', value = '1', label = text('Transaction Date'), #' class = 'checkbox', }; %]

[% INCLUDE button element_data = { text = text('Continue'), value = 'history', type = 'submit', class = 'submit', name = '__action' } %]