<link rel="stylesheet" href="css/new_mxerp.css">
<?php 
$sql_query=DB_query("select * from machine_center where id='".$_REQUEST['Id']."'",$db);
$rowresult=DB_fetch_array($sql_query);
extract($rowresult);
?>
<div class="body_contain">
<div class="tab_div">
<h1>View Machine Center Master</h1>
<form action="" method="post" enctype="multipart/form-data">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr class="row1">
	<td colspan="4"><h3>Machine Details</h3></td>
</tr>
<tr class="row1">
        <td class="tabledata1">Code</td>
        <td><?php echo $code; ?></td>
		<td class="tabledata1" scope="row">Name</td>
        <td><?php echo $name; ?></td>
</tr>
<tr class="row1">
        <td class="tabledata1" scope="row">Under Group</td>
        <td><?php echo $s->GetFieldValue('machine_group_master',"id='".$under_group."'",'machine_gp_location'); ?></td>
		<td class="tabledata1" scope="row">Sr. No.</td>
        <td><?php echo $sr_no; ?></td>

</tr>
<tr class="row1">
        <td class="tabledata1" scope="row">Model No.</td>
        <td><?php echo $model_no; ?></td>
		<td class="tabledata1" scope="row">Chesis No.</td>
        <td><?php echo $chesis_no; ?></td>
</tr>
<tr class="row1">
	<td colspan="4"><h3>Warranty</h3></td>
</tr>
<tr class="row1">
        <td class="tabledata1">Warranty Type</td>
        <td><?php echo $warranty_type; ?></td>
		<td class="tabledata1">Add File</td>
        <td><strong><a href="index.php?route=machinecenter_download&id=<?php echo $id; ?>&modid=<?php echo $_REQUEST['modid'];?>&frmid=<?php echo $_REQUEST['frmid'];?>">Download</a></strong></td>

</tr>
<tr class="row1">
        <td class="tabledata1">Start Period</td>
        <td><?php echo ConvertSQLDate($start_period); ?></td>
        <td class="tabledata1">End Period</td>
        <td><?php echo ConvertSQLDate($end_period); ?></td>
</tr>
<tr class="row1">
        <td class="tabledata1">Status</td>
        <td><?php echo $status; ?></td>
		<td class="tabledata1">AMC On Value</td>
        <td><?php echo $amc_on_value; ?></td>
</tr>
<tr class="row1">
        <td class="tabledata1">AMC %</td>
        <td><?php echo $amc_per; ?></td>
		<td class="tabledata1">EMI Of Year</td>
        <td><?php echo $emi_year; ?></td>
</tr>
<tr class="row1">
	<td colspan="4"><h3>Running Capacity</h3></td>
</tr>
<tr class="row1">
	<td class="tabledata1">Fuel Type</td>
    <td><?php echo $fule_type; ?></td>
	<td class="tabledata1">One Day</td>
	<td><?php echo $one_day_capacity; ?></td>

</tr>
<tr class="row1">
	<td class="tabledata1">Setup Time</td>
	<td><?php echo $setup_time; ?></td>
	<td class="tabledata1">Average Production Qty</td>
	<td><?php echo $average_production_qty; ?></td>
</tr>
<tr class="row1">
	<td colspan="4"><h3>Asset Manager</h3></td>
</tr>
<tr class="row1">
	<td class="tabledata1">Accounting Group</td>
    <td><select name="accounting_group" id="accounting_group" style="width:150px;" >
        <option value="0">Select </option>
        <?php 
        $sql2="select * from accountcategory_master where categoryName='ASSETS'";
		$query1=DB_query($sql2,$db);
		while($rowdata=DB_fetch_array($query1))
		{
		$sqlassect="select * from accountgroupmaster where MainGroupId='".$rowdata['id']."'";
		$sqlquery=DB_query($sqlassect,$db);
		while($row2=DB_fetch_array($sqlquery))
		{?>
			<option value="<?php echo $row2['GroupId']; ?>"><?php echo $row2['GroupName']; ?></option>	
        <?php } }?>	 	
        	
        </select></td>
	<td class="tabledata1">Depriciation Account GL Link</td>
        <td>
        	 <select name="depriciation_ac_gl" id="depriciation_ac_gl" style="width:150px;" >
        <option value="0">Select </option>
        <?php 
        $sql2="select * from accountcategory_master where categoryName='ASSETS'";
		$query1=DB_query($sql2,$db);
		while($rowdata=DB_fetch_array($query1))
		{
		$sqlassect="select * from accountgroupmaster where MainGroupId='".$rowdata['id']."'";
		$sqlquery=DB_query($sqlassect,$db);
		while($row2=DB_fetch_array($sqlquery))
		{?>
			<option value="<?php echo $row2['GroupId']; ?>"><?php echo $row2['GroupName']; ?></option>	
        <?php } }?>	 	        	
        </select>	    	
        </td>

</tr>
<tr class="row1">
        <td class="tabledata1">Sale Status</td>
        <td><?php echo $sale_status; ?></td>
		<td class="tabledata1">Sale Amount</td>
        <td><?php echo $sale_amount; ?></td>
</tr>
<tr class="row1">
	<td class="tabledata1">Sale Date</td>
	<td><?php echo $sale_date; ?></td>
	<td class="tabledata1">Sale Party</td>
    <td><?php echo $s->GetFieldValue('suppliers',"vendor_code='".$sale_party."'",'vendor_name'); ?></td>
</tr>
<tr class="row1">
        <td class="tabledata1">Accumulative Depriciation Amt.</td>
        <td><?php echo $accumulative_depriciation; ?></td>
		<td class="tabledata1">Total Till Date Net Gross Block Amt.</td>
        <td><?php echo $total_till_date; ?></td>
</tr>
<tr class="row1">
	<td colspan="4"><h3>Location</h3></td>
</tr>
<tr class="row1">
        <td class="tabledata1">Location</td>
        <td><?php echo $s->GetFieldValue('locations',"loccode='".$location."'",'locationname'); ?></td>
	<td class="tabledata1">Installation By</td>
	<td><?php echo $insatallation_by; ?></td>
</tr>
<tr class="row1">
	<td class="tabledata1" scope="row">Date</td>
	<td colspan="3"><?php echo ConvertSQLDate($date); ?></td>

</tr>
<tr class="row1">
	<td colspan="4"><p align="center"><input type="submit" name="Save" value="Save" class="search" /></p></td>
</tr>
</table>
</form>
</div>
</div>