<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
                <div class="col-lg-12">
                    <h1 class="page-header">Pending List</h1>
                </div>
                <!--end page header -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
					 <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Vehicle Loan
                        </div>
                        <div class="panel-body">
                            <div class="row">
                   
<div id="mydiv">
<input type="button" value="Print" onclick="PrintElem('#mydiv')"  style="margin:20px;">
<a href="pendcat.php"><button class="btn btn-primary">Catogory Wise</button></a>&nbsp;&nbsp;&nbsp;
<div class="table-responsive">
<center><a href="pen.php">Add Columns</a></center>
  <table class="table table-bordered table-hover">
  	<thead>
						<tr>
						<th>S.No</th>
						<th>Hpl</th>
						<th>Name</th>
		<th>Vno</th>
		<th>Phone</th>
						
							<th>Paid Due</th>
							<th>Pend Due</th>
							<th>Due Amt</th>
							<th>HL</th>
							<th>Def</th>
							<th>Total Amt</th>
	<th>Area</th>
							<th>L.D.Date</th>
					</tr></thead>
<?php $vname=$_REQUEST['vname'];
$area=$_REQUEST['area'];
if($area == 'select') {
$qry = "SELECT * FROM pending where mfin='$mfin' &&  vname='$vname'";
}
else {
	$qry= "SELECT * FROM pending where mfin='$mfin' && area='$area' && vname='$vname'";
}
 $ii = 0;
//$qry=mysqli_query($conn, "select * from pending where mfin='$mfin'");
				//$n=mysqli_num_rows($qry);
				while($row=mysqli_fetch_array($qry))
  { $ii++;
$x = $row['hpl'];

				
?>			<tr>
				<td><b><b><?php echo $ii;?></b></td> 
						<td><b><a href="udelete10.php?hpl=<?php echo $row['hpl']; ?>&mfin=<?php echo $mfin; ?>" target="_blank"><?php echo $row['hpl'];?> <?php echo $row['star'];?></a></b></td>
						<td><b><a href="udelete10.php?hpl=<?php echo $row['hpl']; ?>&mfin=<?php echo $mfin; ?>" target="_blank"><?php echo $row['fname']; ?></a></b></td>
						<td><b><?php echo $row['vno'];?></a></b></td>
						<td><b><?php echo $row['pno'];?></a></b></td>
							
				<td><b><?php echo $row['paymnt'];?></b></td>
				<td><b><?php echo $row['pendmnt'];?></b></td>
				<?php $aa = $row['penamt'];
				$bb = $row['hlbal'];
				$cc = $row['defamt'];
				$dd = $aa - $bb - $cc; ?>
				<td><b><?php echo round($dd,0);?></b></td>
				<td><b><?php echo round($row['hlbal'],0);?></b></td>
				<td><b><?php echo round($row['defamt'],0);?></b></td>
		<td><b><?php echo round($row['penamt'],0);?></b></td>
				<td><b><?php echo $row['area'];?></b></td>

				<td><b><?php echo $row['lddate'];?></b></td>		
					</tr>
					<?php
						$x++;  }

					?>  			
		</tbody>
					</table>
 </div></div>
 
 
</div>
</div></div>
</div><?php include "layouts/footer.php"; ?></body></html>