<?php $PageSecurity = 11;
include('includes/session.inc');
include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');
include("includes/function_lib.php");
include('includes/stockcalculation.php');
$SQLP12=DB_query("SELECT A.id AS ID,A.pick_list_no,B.mst_itemid FROM dbl_dealer_dispatch A inner join dbl_dealer_dispatch_details  B on(A.id=B.parentid)  where B.mst_itemid='".$_REQUEST['itemid']."'",$db);
$data1="";
$data1.="<option value=''>Select</option>";
 while($pickListNo12=DB_fetch_array($SQLP12)){
$data1.="<option value='".$pickListNo12['ID']."'>".$pickListNo12['pick_list_no']."</option>";
 } 
 
$sqlpartcat=DB_query("select CategoryID,SubCategoryID from item_master where id='".$_REQUEST['itemid']."'",$db);
$partnamesubname=DB_fetch_array($sqlpartcat);

$cat=$s->GetFieldValue('stockmaincategory',"id='".$partnamesubname['CategoryID']."'",'stockmaincategoryname');
$subcat=$s->GetFieldValue('stockcategory',"id='".$partnamesubname['SubCategoryID']."'",'categorydescription');

$data2="";
$data2.="<input type='hidden' name='part_category' id='part_category' value='".$partnamesubname['CategoryID']."' style='width:150px;'>";
$data2.="<input type='text' name='part_category1' readonly id='part_category1' value='".$cat."' style='width:150px;'>";


$data3="";
$data3.="<input type='hidden' name='part_sub_category' id='part_sub_category' value='".$partnamesubname['SubCategoryID']."' style='width:150px;'>";
$data3.="<input type='text' name='part_sub_category1' readonly id='part_sub_category1' value='".$subcat."' style='width:150px;'>";

echo $data=$data1."__".$data2."__".$data3;