<?php
     $PageSecurity = 3;
$title = _('View/Search Items') ;
include('includes/SQL_CommonFunctions.inc');
$_SESSION['modid']=$_REQUEST['modid'];
$_SESSION['frmid']=$_REQUEST['frmid'];
$frmpermission= $px->GetFileAccess($_SESSION['modid'],$_SESSION['frmid'],$_SESSION['ACGRoleId']);

$SQL=DB_query("select * from spare_part_kits where id='".$_REQUEST['Viewid']."'",$db);
$GetRec=DB_fetch_array($SQL);
extract($GetRec);
?>
<link rel="stylesheet" href="css/new_mxerp.css">
<p>
<h2 align="center">View Spare Part Kids</h2>
</p>
<form name="" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" align="center"><table width="40%" border="1" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td width="50%" class="tabledata"> Kit Code </td>
    <td width="50%" class="tabledata"><?php echo $kit_code; ?></td>
  </tr>
  <tr>
    <td class="tabledata">Kit Name </td>
    <td class="tabledata"><?php echo $kit_name; ?></td>
  </tr>
  <tr>
    <td class="tabledata">Kit Description </td>
    <td class="tabledata"><?php echo $kit_desc; ?></td>
  </tr>
</table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

   <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><div id="showdata">
 			<table width="100%" border="1" cellspacing="0" cellpadding="3">
              <tr class="row1">
                <td class="tabledata">S.No</td>
				<td class="tabledata">Item Code</td>
				<td class="tabledata">Shade/Item Name.</td>
				<td class="tabledata">Sub Cat.</td>
				<td class="tabledata">Qty</td>
                <td class="tabledata">Rate</td>
				<td class="tabledata">Amount</td>
               
              </tr>
		
<!------Add Extra Items--------->	
<tbody id="dataTable">
<?php 
$i=0;
$SQL1=DB_query("select * from spare_part_kits_details where parant_id='".$id."'",$db);
while($GetRc1=DB_fetch_array($SQL1)){
$Item_Code=$s->GetFieldValue('item_master',"id='".$GetRc1['item_id']."'",'StockID');
$Item_Name=$s->GetFieldValue('item_master',"id='".$GetRc1['item_id']."'",'StockID');
$subcatnme=$s->GetFieldValue('stockcategory',"id='".$GetRc1['sub_cat_id']."'",'categorydescription');
 ?>
<tr class="row1">
	<td style="white-space:nowrap;" class="tabledata"><?php echo $i+1; ?></td>
	<td class="tabledata"><?php echo $Item_Code; ?></td>
	<td class="tabledata" style="white-space:nowrap"><?php echo $Item_Name; ?></td>
	<td class="tabledata"><?php echo $subcatnme; ?></td>
	<td class="tabledata"><?php echo $GetRc1['qty']; ?></td>
	<td class="tabledata"><?php echo $GetRc1['rate']; ?></td>
	<td class="tabledata"><?php echo $GetRc1['amount']; ?></td>
</tr>
<?php $i++;} ?>
</tbody>

  
 <!------Add Extra Items--------->	
</table>
			</div></td>
  </tr>
</table>


