<?php
session_start();
$q = strtolower($_GET["q"]);
if (!$q) return;
include '../db_connect.php';
    include '../db_table_select.php';

$cmp=$_SESSION[SESS_CMPC];
$fny=$_SESSION[SESS_FNY];

$items = mysqli_query($con,"Select bookid, tamount from $bookingreg where vendor = '$_GET[comcode]' and cmp = 'IS' and fny = '12-13' and bookid not in (select billno from vchdetails)");

//while($row = mysqli_fetch_array($items))
 // {
 // echo $row['value'];
 
//  }

while($row = mysqli_fetch_array($items)) {
	if (strpos(strtolower($row['bookid']), $q) !== false) {
		echo "$row[bookid]|$row[tamount]\n";
}
}
mysqli_close($con);


?>