
function select_Item(str1) {
   // alert(str2);
$("#search-boxx").val('');
$("#itemcode").val(str1);
$("#suggesstion-box").hide();
//$("#jcno").val(str1);
var itemCode=str1;
var itemCost=get_ItemCost(itemCode);

//get_jobdata();
//LoadReport(str2);

}



function get_ItemCost(itemCode){
var jaxData="globeVar=20&varID="+itemCode;
var itemCost=0;
get_rawitemName(itemCode);
$.ajax({
     type:"POST",url:"listcats.php",data:jaxData
     ,cache:false,
     success:function(response){
   //alert(jaxData);
      itemCost=response;
  $("#CostPrice").val(itemCost);
//alert(response);
         }

     });//end of ajax call
//return itemCost;
}



$(document).ready(function(){

$("#search-boxx").keyup(function(){
      $.ajax({
      type: "POST",
      url: "rawitemlist.php",
      data:'keyword='+$(this).val(),
      beforeSend: function(){
        $("#suggesstion-box").show();
        //$("#suggesstion-box").css("background","#c2c3c4 no-repeat");
        //$("#suggesstion-box").css("background","#c2c3c4 no-repeat");

      },
      success: function(data){
      //  alert(data);
        $("#suggesstion-box").show();
        $("#suggesstion-box").html(data);
        $("#search-boxx").css("background","#FFF");
      }
      });
    });

});
