[% PROCESS "report_base.html"; PROCESS "elements.html"; IF entity_class == 1; TITLE = text('Search AP Invoices'); #' NAME = text('Vendor'); META_NUMBER = text('Vendor Number'); #' FORM_ID = 'search-ap-invoice'; ELSIF entity_class == 2; TITLE = text('Search AR Invoices'); #' NAME = text('Customer'); META_NUMBER = text('Customer Number'); #' FORM_ID = 'search-ar-invoice'; END; FOREACH T IN accounts; T.text = T.accno _ '--' _ T.description; END; %]
[% PROCESS input element_data = { name = 'entity_class' value = entity_class type = 'hidden' } %]
[% TITLE %]

[% text('Account') %] | [% PROCESS select element_data = { name = 'account_id', value_attr = 'id', text_attr = 'text', default_values = [account_id], default_blank = 1 class = 'account', options = accounts } %]
[% NAME %] | [% PROCESS input element_data = { name = "entity_name" value = entity_name type = "text" size = "32" class = "name" } %]
[% META_NUMBER %] | [% PROCESS input element_data = { name = "meta_number" value = meta_number type = 'text' size = 16 class = "control-code" } %]
[% PROCESS employee_row SELECTNAME='employee_id' %] [% PROCESS business_classes %]
[% text('Tax Status') %] | [% PROCESS select element_data = { name = "taxable" options = [{text = text('Taxable'), value = 1} {text = text('Nontaxable'), value = 0}] default_values = taxable default_blank = 1 } %]
[% text('Tax Account') %] | [% FOREACH T IN tax_accounts; T.text = T.accno _ '--' _ T.description; END; PROCESS select element_data = { name = 'tax_account_id', value_attr = 'id', text_attr = 'text', default_values = [tax_account_id], default_blank = 1 class = 'account', options = tax_accounts } %]
[% text('Invoice Number') %] | [% PROCESS input element_data = { name = "invnumber" value = invnumber type = 'text' size = 16 class = "control-code" } %]
[% text('Order Number') %] | [% PROCESS input element_data = { name = "ordnumber" value = ordnumber type = 'text' size = 16 class = "control-code" } %]
[% text('PO Number') %] | [% PROCESS input element_data = { name = "ponumber" value = ponumber type = 'text' size = 16 class = "control-code" } %]
[% text('Partnumber') %] | [% PROCESS input element_data = { name = "partnumber" value = partnumber type = 'text' size = 16 class = "control-code" } %]
[% text('Source') %] | [% PROCESS input element_data = { name = "source" value = source type = 'text' size = 16 class = "control-code" } %]
[% text('Description') %] | [% PROCESS input element_data = { name = "description" value = description type = 'text' size = 32 class = "text" } %]
[% text('Notes') %] | [% PROCESS input element_data = { name = "notes" value = notes type = 'text' size = 32 class = "text" } %]
[% text('Ship Via') %] | [% PROCESS input element_data = { name = "ship_via" value = ship_via type = 'text' size = 32 class = "text" } %]
[% PROCESS date_row %]
[% text('Invoice Status') %] |
[% label_pos = 1; PROCESS input element_data = { label = text('Active') type = 'radio' name = 'on_hold' id = 'on_hold-active' value = '0' }; %] | [% PROCESS input element_data = { label = text('On Hold') type = 'radio' name = 'on_hold' id = 'on_hold-hold' value = '1' }; %] | [% PROCESS input element_data = { label = text('All') type = 'radio' name = 'on_hold' id = 'on_hold-all' value = '' checked = 'CHECKED' }; %]
[% PROCESS input element_data = { name = 'oc_state' type = 'radio' value = 'open' label = text('Open') } %] | [% PROCESS input element_data = { name = 'oc_state' type = 'radio' value = 'closed' label = text('Closed') } %] | [% PROCESS input element_data = { name = 'oc_state' type = 'radio' value = 'all' label = text('All') checked = 'CHECKED' } %]
[% PROCESS input element_data = { name = 'is_approved' type = 'radio' value = 'Y' label = text('Approved') }; %] | [% 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') checked = 'CHECKED' }; %]
[% PROCESS input element_data = { name = 'is_voided' type = 'radio' value = 'Y' label = text('Voided') }; %] | [% PROCESS input element_data = { name = 'is_voided' type = 'radio' value = 'N' label = text('Unvoided') }; %] | [% PROCESS input element_data = { name = 'is_voided' type = 'radio' value = 'All' label = text('All') checked = 'CHECKED' }; %]
[% text('Include in Report') %] |
[% PROCESS input element_data = { name = 'col_running_number' type = 'checkbox' value = '1' label = text('No.') } %] | [% PROCESS input element_data = { name = 'col_id' type = 'checkbox' value = '1' label = text('ID') checked = 'CHECKED' } %] | [% PROCESS input element_data = { name = 'col_invnumber' type = 'checkbox' value = '1' label = text('Invoice Number') checked = 'CHECKED' } %] | [% PROCESS input element_data = { name = 'col_ordnumber' type = 'checkbox' value = '1' label = text('Order Number') } %] | [% PROCESS input element_data = { name = 'col_ponumber' type = 'checkbox' value = '1' label = text('PO Number') } %]
[% PROCESS input element_data = { name = 'col_transdate' type = 'checkbox' value = '1' label = text('Invoice Date') checked = 'CHECKED' } %] | [% PROCESS input element_data = { name = 'col_business_units' type = 'checkbox' value = '1' label = text('Business Units') } %] | [% PROCESS input element_data = { name = 'col_entity_name' type = 'checkbox' value = '1' label = NAME checked = 'CHECKED' } %] | [% PROCESS input element_data = { name = 'col_salesperson' type = 'checkbox' value = '1' label = text('Salesperson') } %] | [% PROCESS input element_data = { name = 'col_manager' type = 'checkbox' value = '1' label = text('Manager') } %]
[% PROCESS input element_data = { name = 'col_netamount' type = 'checkbox' value = '1' label = text('Amount') } %] | [% PROCESS input element_data = { name = 'col_tax' type = 'checkbox' value = '1' label = text('Tax') } %] | [% PROCESS input element_data = { name = 'col_amount' type = 'checkbox' value = '1' label = text('Total') checked = 'CHECKED' } %] | [% PROCESS input element_data = { name = 'col_curr' type = 'checkbox' value = '1' label = text('Currency') } %] | [% PROCESS input element_data = { name = 'col_last_payment' type = 'checkbox' value = '1' label = text('Date Paid') } %]
[% PROCESS input element_data = { name = 'col_paid' type = 'checkbox' value = '1' label = text('Paid') checked = 'CHECKED' } %] | [% PROCESS input element_data = { name = 'col_due_date' type = 'checkbox' value = '1' label = text('Due Date') } %] | [% PROCESS input element_data = { name = 'col_due' type = 'checkbox' value = '1' label = text('Amount Due') checked = 'CHECKED' } %] | [% PROCESS input element_data = { name = 'col_notes' type = 'checkbox' value = '1' label = text('Notes') } %]
[% PROCESS input element_data = { name = 'col_shipping_point' type = 'checkbox' value = '1' label = text('Shipping Point') } %] | [% PROCESS input element_data = { name = 'col_ship_via' type = 'checkbox' value = '1' label = text('Ship Via') } %]
[% PROCESS input element_data = { name = 'subtotal' type = 'checkbox' value = '1' label = text('Subtotal') } %]

[% PROCESS button element_data = { name = '__action' value = 'invoice_search' type = 'submit' class = 'submit' text = text('Continue') } %]