<?php include_once "../../../includes/basics/basics.inc"; if (!empty($_GET['ino_auto_complete'])) { global $db; $org = new org(); // if the 'term' variable is not sent with the request, exit if (!isset($_REQUEST['term'])) { echo "exit"; exit; } else { $item_number = $_REQUEST['term']; if (!empty($_GET['primary_column1'])) { $org_id = $_GET['primary_column1']; } else { $master_org = $org->findAll_item_master(); $org_id = $master_org[0]->org_id; } if (!empty($_GET['other_options'])) { $options = $_GET['other_options']; } else { $options = null; } //echo $org_id; $data = item::find_item_number_by_itemNumber_OrgId_allAttributes($item_number, $org_id, $options); // jQuery wants JSON data $json = json_encode($data); echo header('Content-Type: application/json'); echo json_encode($data); } }
<div><ul class="column header_field"> <li><?php $f->l_select_field_from_object('type', inventory::inventory_org_types(), 'option_line_code', 'option_line_code', $inventory->type, 'type', '', '', $readonly); ?> </li> <li><?php $f->l_text_field_d('code'); ?> </li> <li><?php $f->l_checkBox_field_d('item_master_cb'); ?> </li> <li><?php $org = new org(); $f->l_select_field_from_object('master_org_id', $org->findAll_item_master(), 'org_id', 'org', $inventory->master_org_id, 'master_org_id', '', '', $readonly1); ?> </li> <li><?php $f->l_text_field_d('calendar'); ?> </li> <li><?php $f->l_text_field_d('locator_control'); ?> </li> <li><?php $f->l_checkBox_field_d('allow_negative_balance_cb'); ?> </li> <li><?php