<?php 
$PageSecurity = 11;
//echo $_SERVER['QUERY_STRING'];exit;
include('includes/SQL_CommonFunctions.inc');
include('includes/function_lib.php');
include('includes/session.inc');
?>
<link rel="stylesheet" type="text/css" href="css/professional/table_frize.css">

<?php

if($_REQUEST['arr']!='consolidate')
{ ?>

<div class="frisetable4">
		<div class="bodywidth4">
		<table width="100%" cellpadding="3" cellspacing="0" border="1" >
		<tr bgcolor="#d4d4d4">
			<td class="headerpartl_1">Sr. No.</td>
			<td class="headerpartl_2"></td>
			<td class="headerpartl_3">Part Code</td>
			<td class="headerpartl_4">Part Name</td>
			<td class="headerpartl_5">Item Desc</td>
			<td class="headerpartl_6">Stock Bal</td>
			<td class="colls">Qty</td>
			<td class="colls">Rate</td>
			<td class="colls">Total Price</td>
			<td class="consolidateshow colls">Excise Duty Rate</td>
			<td class="consolidateshow colls">ED Amt</td>
			<td class="colls">Total Amt</td>
			<td class="colls">Remarks</td>
		</tr> 
		<tbody id="dataTable">
			<tr bgcolor="#c1c1c1">
					<td class="headerpartcol1"><input type="checkbox" id="delitem[]" /></td>
					<td class="headerpartcol2"><input type="hidden" name="mst_itemid[0]" id="itemid" /></td>
					<td class="headerpartcol3"><input type="text" name="itemcode[0]" id="itemcode" style="width:100%;" readonly="" /></td>
					<td class="headerpartcol4"><input type="text" name="itemname[0]" id="itemname" style="width:100%;" readonly="" /></td>
					<td class="headerpartcol5"><input type="text" name="itemdesc[0]" id="itemdesc" style="width:100%;" readonly=""></td>
					<td class="headerpartcol6"><input type="text" name="total_stock[0]" id="total_stock" style="width:100%;" readonly="" /></td>
					<td class="colls1"><input type="text" name="Quantity[0]" id="Quantity" style="width:80px;"/></td>
					<td><input type="text" name="Rate[0]" id="Rate" onKeyUp="calculateTotalPrice(this.id)" style="width:80px;"/></td>
					<td class="colls1"><input type="text" name="totalPrice[0]" id="totalPrice" readonly="true" style="width:80px;"/></td>
					<td class="consolidateshow colls1"><select name="exdrate[0]" id="exdrate" style="width:107px" onchange="calculateExcise(this.value,this.id)">
							<option value="0">Select</option>
							<?php
								$ServiceSql="select * from  excise_tax WHERE caption LIKE '%excise%'" ;
								$ServiceRes=DB_query($ServiceSql,$db);
								while($ServiceRow=DB_fetch_array($ServiceRes))
								{
							?>
							<option value="<?php echo $ServiceRow['id']?>" <?php echo($edit_EDRate==$ServiceRow['id']?"selected":"") ?>><?php echo $ServiceRow['caption'];?></option>
							<?php	
							}
							?>
						</select></td>
					<td class="consolidateshow colls1"><input type="text" name="ex_amount[0]" id="ex_amount"/></td>
					<td class="colls1"><input type="text" id="TotalSpecial" name="TotalAmount[0]" style="width:150px;" onfocus="cal_grandtotalImp(this.id);" value="0"/></td>
					<td class="colls1"><textarea name="ramarks[0]" id="remarks" style="width:200px;"></textarea></td>
					
					
					
		</tr> 
		</tbody>  
		</table>
		</div>
		</div>
		
		<?php } else { ?>
		<div class="frisetable4">
		<div class="bodywidth4">
		<table width="100%" cellpadding="3" cellspacing="0" border="1" >
		<tr bgcolor="#d4d4d4">
			<td class="headerpartl_1">Sr. No.</td>
			<td class="headerpartl_2"></td>
			<td class="headerpartl_3">Part Code</td>
			<td class="headerpartl_4">Part Name</td>
			<td class="headerpartl_5">Item Desc</td>
			<td class="headerpartl_6">Stock Bal</td>
			<td class="colls">Qty</td>
			<td class="colls">Rate</td>
			<td class="colls">Total Price</td>
			<td class="colls">Total Amt</td>
			<td class="colls">Remarks</td>
		</tr> 
		<tbody id="dataTable">
			<tr bgcolor="#c1c1c1">
					<td class="headerpartcol1"><input type="checkbox" id="delitem[]" /></td>
					<td class="headerpartcol2"><input type="hidden" name="mst_itemid[0]" id="itemid" /></td>
					<td class="headerpartcol3"><input type="text" name="itemcode[0]" id="itemcode" style="width:100%;" readonly="" /></td>
					<td class="headerpartcol4"><input type="text" name="itemname[0]" id="itemname" style="width:100%;" readonly="" /></td>
					<td class="headerpartcol5"><input type="text" name="itemdesc[0]" id="itemdesc" style="width:100%;" readonly=""></td>
					<td class="headerpartcol6"><input type="text" name="total_stock[0]" id="total_stock" style="width:100%;" readonly="" /></td>
					<td class="colls1"><input type="text" name="Quantity[0]" id="Quantity" style="width:80px;"/></td>
					<td class="colls1"><input type="text" name="Rate[0]" id="Rate" onKeyUp="calculateTotalPrice(this.id)" style="width:80px;"/></td>
					<td class="colls1"><input type="text" name="totalPrice[0]" id="totalPrice" readonly="true" style="width:80px;"/></td>
					
					<td class="colls1"><input type="text" id="TotalSpecial" name="TotalAmount[0]" style="width:150px;" onFocus="calgrandtotalImp(this.id);" value="0"/></td>
					<td class="colls1"><textarea name="ramarks[0]" id="remarks" style="width:200px;"></textarea></td>
					
					
					
		</tr> 
		</tbody>  
		</table>
		<div class="frisetable4">
		<div class="bodywidth4">
		
		
		<?php } ?>