<?php $PageSecurity = 11;
include('includes/session.inc');
//include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');

if($_REQUEST['id']=='Consolidate')
{?>
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border:#666666 solid 1px;">
              <tr>
                <td class="tabledata">Sr. No.</td>
                <td class="tabledata">Item Name</td>
                <td class="tabledata">Qty in Stock </td>
                <td class="tabledata">Req. Qty.</td>
                <td class="tabledata">Price</td>
                <td class="tabledata">Total amount</td>
              </tr>
			   <tbody id="dataTable">
				<tr bgcolor="#c1c1c1">
                  <td><input name="delitem[]" type="checkbox" value="<?php echo $item_row['id'];?>" />
                  <input type="hidden" name="item_code[]" id="item_code" size="40"/></td>
                  <td><input type="text" name="itemname[]"  id="itemname" size="40"/></td>
                  <td>&nbsp;</td>
                  <td><input type="text" name="rqty[]"  id="rqty" size="40"/>                  </td>
                  <td><input type="text" name="price[]" id="price" size="40" />                  </td>
                  <td><input type="text" name="amt[]" id="amt" size="40" onkeyup="calculateTotalAmt(this.id)"/></td>
                </tr>
 </tbody>
</table>	

<?php } else
 { 
 $basic = DB_query("Select * from trouble_ticket_creation",$db);
 $basicAmount=DB_fetch_array($basic);
 ?>
 	<table width="806" border="1" cellspacing="0" cellpadding="0" style="border:#666666 solid 1px;">
               <tr>
                <td width="76" class="tabledata">Sr. No.</td>
                <td width="152" class="tabledata">Service Type</td>
                <td width="225" class="tabledata">Service Description</td>
                <td width="343" class="tabledata">Service Amount</td>
              </tr>
			   <tbody id="dataTable">
				<tr bgcolor="#c1c1c1">
                  <td><input name="delitem[]" type="checkbox" value="<?php echo $item_row['id'];?>" /></td>
                  <td><?php $serv_type= DB_query("SELECT * FROM services_type",$db);?>
				  	<select name="service_type" style="width:100%">
						<option value="">--Select--</option>
						<?php 
							   while($getServe_type= DB_fetch_array($serv_type)){?>
							   			<option value="<?php echo $getServe_type['id']?>"><?php echo $getServe_type['service_type']?></option>
							   <?php }
						?>
						<option></option>
					</select>
				  </td>
                  <td>
				  	<?php $serv_type= DB_query("SELECT * FROM services_description",$db);?>
				  	<select name="service_type" style="width:100%">
						<option value="">--Select--</option>
						<?php 
							   while($getServe_type= DB_fetch_array($serv_type)){?>
							   			<option value="<?php echo $getServe_type['id']?>"><?php echo $getServe_type['service_description']?></option>
							   <?php }
						?>
						<option></option>
					</select>
				  </td>
                  <td><input type="text" name="amt[]" id="amt" size="40" onkeyup="calculateTotalAmt(this.id)" value="<?php echo $basicAmount['basicAmount']?>"/></td>
                </tr>
  </tbody>
</table>	
	
<?php } ?>	


