<?php ob_start(); 
session_start(); ?>

<?php
  // Use session variable on this page. This function must put on the top of page.

	if(isset($_GET['idd']))
	{
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php include "layouts/db_connect.php"; ?>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LAKSHMI & CO</title>
    <script type="text/javascript">
      window.onload=function(){self.print();setTimeout("window.close()", 10);}
      
          window.onfocus = function() { window.close(); }
           $(function(){ 
         setTimeout(function(){
            $('form').print();
          },100);
      });
      </script>
      <!-- <?php
          function convert_digit_to_words($no)  
          {   
          
          //creating array  of word for each digit
           $words = array('0'=> 'Zero' ,'1'=> 'one' ,'2'=> 'two' ,'3' => 'three','4' => 'four','5' => 'five','6' => 'six','7' => 'seven','8' => 'eight','9' => 'nine','10' => 'ten','11' => 'eleven','12' => 'twelve','13' => 'thirteen','14' => 'fourteen','15' => 'fifteen','16' => 'sixteen','17' => 'seventeen','18' => 'eighteen','19' => 'nineteen','20' => 'twenty','30' => 'thirty','40' => 'forty','50' => 'fifty','60' => 'sixty','70' => 'seventy','80' => 'eighty','90' => 'ninty','100' => 'hundred','1000' => 'thousand','100000' => 'lakh','10000000' => 'crore');
           //$words = array('0'=> '0' ,'1'=> '1' ,'2'=> '2' ,'3' => '3','4' => '4','5' => '5','6' => '6','7' => '7','8' => '8','9' => '9','10' => '10','11' => '11','12' => '12','13' => '13','14' => '14','15' => '15','16' => '16','17' => '17','18' => '18','19' => '19','20' => '20','30' => '30','40' => '40','50' => '50','60' => '60','70' => '70','80' => '80','90' => '90','100' => '100','1000' => '1000','100000' => '100000','10000000' => '10000000');
           
           
           //for decimal number taking decimal part
           
          $cash=(int)$no;  //take number wihout decimal
          $decpart = $no - $cash; //get decimal part of number
          
          $decpart=sprintf("%01.2f",$decpart); //take only two digit after decimal
          
          $decpart1=substr($decpart,2,1); //take first digit after decimal
          $decpart2=substr($decpart,3,1);   //take second digit after decimal  
          
          $decimalstr='';
          
          //if given no. is decimal than  preparing string for decimal digit's word
          
          if($decpart>0)
          {
           $decimalstr.="point ".$numbers[$decpart1]." ".$numbers[$decpart2];
          }
           
              if($no == 0)
                  return ' ';
              else {
              $novalue='';
              $highno=$no;
              $remainno=0;
              $value=100;
              $value1=1000;       
                      while($no>=100)    {
                          if(($value <= $no) &&($no  < $value1))    {
                          $novalue=$words["$value"];
                          $highno = (int)($no/$value);
                          $remainno = $no % $value;
                          break;
                          }
                          $value= $value1;
                          $value1 = $value * 100;
                      }       
                    if(array_key_exists("$highno",$words))  //check if $high value is in $words array
                        return $words["$highno"]." ".$novalue." ".convert_digit_to_words($remainno).$decimalstr;  //recursion
                    else {
                       $unit=$highno%10;
                       $ten =(int)($highno/10)*10;
                       return $words["$ten"]." ".$words["$unit"]." ".$novalue." ".convert_digit_to_words($remainno
                       ).$decimalstr; //recursion
                     }
              }
          } ?> -->
<style type="text/css" media="print">
div.vertical{
	
  padding-top: 0px;
     padding-right: 480px; 
    margin-top: -20em;
 /* position: absolute; */
  transform: rotate(-90deg);
  -webkit-transform: rotate(-90deg); /* Safari/Chrome */
  -moz-transform: rotate(-90deg);    /* Firefox */
  -o-transform: rotate(-90deg);      /* Opera */
  -ms-transform: rotate(-90deg);     /* IE 9 */
  
}

th.vertical{
  max-width: 40px;
  height: 65px;
  line-height: 14px;
  padding-bottom: 10px;
  text-align: inherit;
}
</style>
          <link rel="stylesheet" href="./style.css">
   
</head>
<style>
    body {
  font-family: Roboto, Arial, sans-serif;
}
</style>
<body onload="self.print()" onfocus="window.close()">
	<?php  $idd=$_REQUEST['idd'];
	$qry=mysqli_query($conn, "select * from customerdetails where id=$idd");
					$row=mysqli_fetch_array($qry);
$hpl = $row['hpl'];
					$sch = $row['edate'];	
					$mfin5 = $row['mfin'];
$sql678 = mysqli_query($conn, "select * from mfin where name='$mfin5'");
$row678 = mysqli_fetch_array($sql678);
					?>
	
  

          <table style="width: 100%;border-top: 1px solid black;margin-top: 20px;border-left: 1px solid black;border-right: 1px solid black;">
            <tr style="border: 1px solid black;">
              <td style="font-size: 15px;">
                <center>  <img src="./logg.png" alt="" width="80" height="70"></center>
                <div style="font-size: 14px;text-align: center;font-weight: 800;">ரசீது எண் :<?php echo $row['hpl']; ?></div>
              </td> 
                <td style="text-align: center;">
                  <div style="font-size: 7px;">உ</div>
                   <div style="font-size: 10px;">சிவமயம்</div>
                    <div style="font-size: 33px;font-weight: 900;color: red;font-family: 'Times New Roman', Times, serif;">
              <?php echo $row678['name2']; ?></div>
                    <div style="font-size: 13px;">
            <?php echo $row678['addr']; ?> <?php echo $row678['addr1']; ?> </br><?php echo $row678['addr2']; ?></br><?php echo $row678['pno']; ?></div>
        <br>
        
        <div style="font-size: 14px;text-align: center;font-weight: 800;">
          திட்டம்: <?php echo $row['sch']; ?>
        </div>
                </td>
				 <?php $ssd = $row['sch'];
$qry5=mysqli_query($conn, "select * from msch where name='$ssd'");
	$row2=mysqli_fetch_array($qry5); 
	$edate2 = $row2['edate'];
	$edate = $row['hpdate']; 
	$i = 0;
	
$edate = date ("d-m-Y", strtotime("+".$edate2." month", strtotime($edate))); 
$i++;

	?>
                <td style="text-align: right;line-height: 25px;">
                  <div style="font-size: 28px;">₹ <?php echo $row['hpamount']; ?></div>
                  <div style="font-size: 13px;">தேதி:<?php echo $row['hpdate']; ?></u></div>
                  <div style="font-size: 13px;">காலாவதியாகும்தேதி:<?php echo $edate; ?></div>
                </td>
            </tr>
          </table>
          
            
          <table style="width: 100%;border: 1px solid black;">
            <tr>
                <td style="width: 70%;border-right: 1px solid black;line-height: 40px;color: black;line-height: 25px;font-size: 13px;">
                   <div>அடகு வைத்தவரின் பெயர் :  <?php echo $row['name']; ?></div>
                   <div>த(அ)க பெயர் :  <?php echo $row['fname']; ?></div>
                   <div>முகவரி : <?php echo $row['address']; ?> <?php echo $row['address1']; ?> <?php echo $row['address2']; ?></div>
                   <div>தொலைபேசி : <?php echo $row['pno']; ?></div>
                   <div>கடன் தொகை அசல் ரூபாய் : <?php	$totr = $row['hpamount']; $uco = convert_digit_to_words($totr);  echo ucwords($uco); echo " Only."; ?> </div>
                   
                   
                   
                </td>
                <td>
                  
                  <center><img src="user/<?php echo $row['uimg']; ?>" width="80" height="60" alt="" style="border: 1px solid black;height: 100px;width: 100px;"></center>
                   
                </td>
                <td>
                  
                  <center><img src="user/<?php echo $row['img']; ?>" width="80" height="60" alt="" style="border: 1px solid black;height: 100px;width: 100px;"></center>
                   
                </td>
            </tr>
          </table>
         
          <table style="width: 100%;border: 1px solid black;font-size: 12px;">
            <tr>
              <td style="width:40%;border-right: 1px solid black;">அடகு பொருட்கள் விபரம்</td>
              <td style="text-align: center;width: 12%;">No</td>
              <td style="text-align: center;width: 12%;">T-W-T</td>
              <td style="text-align: center;width: 12%;">ST/OT</td>
              <td style="text-align: center;width: 12%;">G-W-T</td>
              <td style="text-align: center;width: 12%;">N/W</td>
            </tr>
          </table>
        
          <table style="width: 100%;border: 1px solid black;height: 100px;font-size: 12px;">
            <tr>
             
                 <td style="border-right: 1px solid black;width: 40%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['v1']; ?></br>&nbsp;&nbsp;
                          <?php $t = 1; 
                     $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
                     ['v10'];	
                     if($n2 != 0){ $t++; echo $row['v2']; ?> </br> &nbsp;&nbsp; <?php }
                     if($n3 != 0){ $t++; echo $row['v3']; ?> </br> &nbsp;&nbsp; <?php }
                     if($n4 != 0){ $t++; echo $row['v4']; ?> </br> &nbsp;&nbsp; <?php }
                     if($n5 != 0){ $t++; echo $row['v5']; ?> </br> &nbsp;&nbsp; <?php }
                     if($t == 1) { ?> </br></br> </br> <?php }
                     if($t == 2) { ?> </br></br> <?php }
                     if($t == 3) { ?> </br> <?php }
                     if($t == 4) { ?> <?php }
                     if($t == 5) { ?> <?php }
                     if($t == 6) { ?> <?php }
                     
                      ?>
                          
                          
                          
                          </b>
                         </font>
                         </td>
                         <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['a1']; ?></br>&nbsp;&nbsp;
                          <?php $t = 1; 
                     $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
                     ['v10'];	
                     if($n2 != 0){ $t++; echo $row['a2']; ?> </br> &nbsp;&nbsp; <?php }
                     if($n3 != 0){ $t++; echo $row['a3']; ?> </br> &nbsp;&nbsp; <?php }
                     if($n4 != 0){ $t++; echo $row['a4']; ?> </br> &nbsp;&nbsp; <?php }
                     if($n5 != 0){ $t++; echo $row['a5']; ?> </br> &nbsp;&nbsp; <?php }
                     if($t == 1) { ?> </br></br> </br> <?php }
                     if($t == 2) { ?> </br></br> <?php }
                     if($t == 3) { ?> </br> <?php }
                     if($t == 4) { ?> <?php }
                     if($t == 5) { ?> <?php }
                     if($t == 6) { ?> <?php }
                     
                      ?>
                          
                          
                          
                          </b>
                         </font>
                         </td>
              
                 <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['t1']; ?></br>&nbsp;&nbsp;
                  <?php $t = 1; 
             $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
             ['v10'];	
             if($n2 != 0){ $t++; echo $row['t2']; ?> </br> &nbsp;&nbsp; <?php }
             if($n3 != 0){ $t++; echo $row['t3']; ?> </br> &nbsp;&nbsp; <?php }
             if($n4 != 0){ $t++; echo $row['t4']; ?> </br> &nbsp;&nbsp; <?php }
             if($n5 != 0){ $t++; echo $row['t5']; ?> </br> &nbsp;&nbsp; <?php }
             if($t == 1) { ?> </br></br> </br> <?php }
             if($t == 2) { ?> </br></br> <?php }
             if($t == 3) { ?> </br> <?php }
             if($t == 4) { ?> <?php }
             if($t == 5) { ?> <?php }
             if($t == 6) { ?> <?php }
             
              ?>
                  
                  
                  
                  </b>
                 </font>
                 </td>
                 <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['s1']; ?></br>&nbsp;&nbsp;
                  <?php $t = 1; 
             $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
             ['v10'];	
             if($n2 != 0){ $t++; echo $row['s2']; ?> </br> &nbsp;&nbsp; <?php }
             if($n3 != 0){ $t++; echo $row['s3']; ?> </br> &nbsp;&nbsp; <?php }
             if($n4 != 0){ $t++; echo $row['s4']; ?> </br> &nbsp;&nbsp; <?php }
             if($n5 != 0){ $t++; echo $row['s5']; ?> </br> &nbsp;&nbsp; <?php }
             if($t == 1) { ?> </br></br> </br> <?php }
             if($t == 2) { ?> </br></br> <?php }
             if($t == 3) { ?> </br> <?php }
             if($t == 4) { ?> <?php }
             if($t == 5) { ?> <?php }
             if($t == 6) { ?> <?php }
             
              ?>
                  
                  
                  
                  </b>
                 </font>
                 </td>
                 <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['g1']; ?></br>&nbsp;&nbsp;
                  <?php $t = 1; 
             $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
             ['v10'];	
             if($n2 != 0){ $t++; echo $row['g2']; ?> </br> &nbsp;&nbsp; <?php }
             if($n3 != 0){ $t++; echo $row['g3']; ?> </br> &nbsp;&nbsp; <?php }
             if($n4 != 0){ $t++; echo $row['g4']; ?> </br> &nbsp;&nbsp; <?php }
             if($n5 != 0){ $t++; echo $row['g5']; ?> </br> &nbsp;&nbsp; <?php }
             if($t == 1) { ?> </br></br> </br> <?php }
             if($t == 2) { ?> </br></br> <?php }
             if($t == 3) { ?> </br> <?php }
             if($t == 4) { ?> <?php }
             if($t == 5) { ?> <?php }
             if($t == 6) { ?> <?php }
             
              ?>
                  
                  
                  
                  </b>
                 </font>
                 </td>
                 <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['n1']; ?></br>&nbsp;&nbsp;
                  <?php $t = 1; 
             $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
             ['v10'];	
             if($n2 != 0){ $t++; echo $row['n2']; ?> </br> &nbsp;&nbsp; <?php }
             if($n3 != 0){ $t++; echo $row['n3']; ?> </br> &nbsp;&nbsp; <?php }
             if($n4 != 0){ $t++; echo $row['n4']; ?> </br> &nbsp;&nbsp; <?php }
             if($n5 != 0){ $t++; echo $row['n5']; ?> </br> &nbsp;&nbsp; <?php }
             if($t == 1) { ?> </br></br> </br> <?php }
             if($t == 2) { ?> </br></br> <?php }
             if($t == 3) { ?> </br> <?php }
             if($t == 4) { ?> <?php }
             if($t == 5) { ?> <?php }
             if($t == 6) { ?> <?php }
             
              ?>
                  
                  
                  
                  </b>
                 </font>
                 </td>
              
            </tr>
          </table>
        
        
          <table style="width: 100%;border: 1px solid black;height: 10px;font-size: 14px;font-weight: 100;">
            <tr>
    <?php $hpamt = $row['hpamount'];
	$tamtt = $hpamt + ($hpamt * 0.2); 
	$st = $row['a1']+$row['a2']+$row['a3']+$row['a4']+$row['a5']; 
	$sttt = $row['t1']+$row['t2']+$row['t3']+$row['t4']+$row['t5']; 
	?>
	<td><b>&nbsp;பொருட்களின் மதிப்பு :  <?php echo $tamtt; ?></td>
	<td><b>&nbsp;எடை :  <?php echo $sttt; ?></td>
	<td><b>&nbsp;மொத்த_உருப்படி:<?php echo $st; ?></td></tr>
             
            </tr>
          </table>

          <table style="width: 100%;">
            <tr>
                <td>
                    <p style="text-align: center;font-size: 10px;">வேலை நேரம் : 9.00 A.M to 5.00 P.M. விடுமுறை : ஞாயிற்றுக்கிழமை மற்றும் முக்கிய பண்டிகை நாட்கள்</p>
                </td>
            </tr>
          </table>
          <table style="border: 1px solid black;width: 100%;">
            <tr>
                <td style="width:60%;">
                    <div>
                     <p style="font-size: 10px;"> மேற்கண்ட திட்டத்தின்படி அடகு வைக்க சம்மதிக்கிறேன். நகையை மீட்க தவறும்பட்சத்தில் ஏலம் விட சம்மதம் தெரிவிக்கிறேன்.
                        அதற்கான ஒப்புதல் படிவத்தில் கையெழுத்திட்டுள்ளேன். இதனை முழு மனதுடன் சம்மதிக்கிறேன்.
                      </p>
                    </div>
                    <div style="margin-top: 40px;text-align: left;font-size: 13px;">வாடிக்கையாளர் கையொப்பம் (அ) கைரேகை</div>
                </td>
                <td style="width: 40%;height: 40px;">
                   <div style="margin-top: 60px;text-align: right;"><h3 style="font-size: 18px;"> For  <?php echo $row678['name2']; ?>,</h3></div>
                </td>
                
            </tr>
          </table>


  <table style="width: 100%;border-top: 1px solid black;margin-top: 20px;border-left: 1px solid black;border-right: 1px solid black;">
    <tr style="border: 1px solid black;">
      <td style="font-size: 15px;">
        <center>  <img src="./logg.png" alt="" width="80" height="70"></center>
        <div style="font-size: 14px;text-align: center;font-weight: 800;">ரசீது எண் :<?php echo $row['hpl']; ?></div>
      </td> 
        <td style="text-align: center;">
          <div style="font-size: 7px;">உ</div>
           <div style="font-size: 10px;">சிவமயம்</div>
            <div style="font-size: 33px;font-weight: 900;color: red;font-family: 'Times New Roman', Times, serif;">
			<?php echo $row678['name2']; ?></div>
            <div style="font-size: 11px;">
		<?php echo $row678['addr']; ?> <?php echo $row678['addr1']; ?></br> <?php echo $row678['addr2']; ?></br><?php echo $row678['pno']; ?></div>
<br>

<div style="font-size: 14px;text-align: center;font-weight: 800;">
  திட்டம்: <?php echo $row['sch']; ?>
</div>
        </td>
        <td style="text-align: right;line-height: 25px;">
          <div style="font-size: 33px;">₹ <?php echo $row['hpamount']; ?></div>
          <div style="font-size: 13px;">தேதி:<?php echo $row['hpdate']; ?></u></div>
          <div style="font-size: 13px;">காலாவதியாகும்தேதி:<?php echo $edate; ?></div>
        </td>
    </tr>
  </table>
  
    
  <table style="width: 100%;border: 1px solid black;">
    <tr>
        <td style="width: 70%;border-right: 1px solid black;line-height: 40px;color: black;line-height: 25px;font-size: 13px;">
           <div>அடகு வைத்தவரின் பெயர் :  <?php echo $row['name']; ?></div>
           <div>த(அ)க பெயர் :  <?php echo $row['fname']; ?></div>
           <div>முகவரி : <?php echo $row['address']; ?> <?php echo $row['address1']; ?> <?php echo $row['address2']; ?></div>
           <div>தொலைபேசி : <?php echo $row['pno']; ?></div>
           <div>கடன் தொகை அசல் ரூபாய் : <?php	$totr = $row['hpamount']; $uco = convert_digit_to_words($totr);  echo ucwords($uco); echo " Only."; ?> </div>
           
           
           
        </td>
        <td>
          
          <center><img src="user/<?php echo $row['uimg']; ?>" width="80" height="60" alt="" style="border: 1px solid black;height: 100px;width: 100px;"></center>
           
        </td>
        <td>
          
          <center><img src="user/<?php echo $row['img']; ?>" width="80" height="60" alt="" style="border: 1px solid black;height: 100px;width: 100px;"></center>
           
        </td>
    </tr>
  </table>
 
  
  <table style="width: 100%;border: 1px solid black;font-size: 12px;">
    <tr>
      <td style="width:40%;border-right: 1px solid black;">அடகு பொருட்கள் விபரம்</td>
      <td style="text-align: center;width: 12%;">No</td>
      <td style="text-align: center;width: 12%;">T-W-T</td>
      <td style="text-align: center;width: 12%;">ST/OT</td>
      <td style="text-align: center;width: 12%;">G-W-T</td>
      <td style="text-align: center;width: 12%;">N/W</td>
    </tr>
  </table>

  <table style="width: 100%;border: 1px solid black;height: 100px;font-size: 12px;">
    <tr>
     
         <td style="border-right: 1px solid black;width: 40%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['v1']; ?></br>&nbsp;&nbsp;
                  <?php $t = 1; 
             $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
             ['v10'];	
             if($n2 != 0){ $t++; echo $row['v2']; ?> </br> &nbsp;&nbsp; <?php }
             if($n3 != 0){ $t++; echo $row['v3']; ?> </br> &nbsp;&nbsp; <?php }
             if($n4 != 0){ $t++; echo $row['v4']; ?> </br> &nbsp;&nbsp; <?php }
             if($n5 != 0){ $t++; echo $row['v5']; ?> </br> &nbsp;&nbsp; <?php }
             if($t == 1) { ?> </br></br> </br> <?php }
             if($t == 2) { ?> </br></br> <?php }
             if($t == 3) { ?> </br> <?php }
             if($t == 4) { ?> <?php }
             if($t == 5) { ?> <?php }
             if($t == 6) { ?> <?php }
             
              ?>
                  
                  
                  
                  </b>
                 </font>
                 </td>
                 <td style="border-right: 1px solid black;text-align: center;width: 12%;font-size: 14px;font-weight: 900;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['a1']; ?></br>&nbsp;&nbsp;
                  <?php $t = 1; 
             $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
             ['v10'];	
             if($n2 != 0){ $t++; echo $row['a2']; ?></br> &nbsp;&nbsp; <?php }
             if($n3 != 0){ $t++; echo $row['a3']; ?></br> &nbsp;&nbsp; <?php }
             if($n4 != 0){ $t++; echo $row['a4']; ?></br> &nbsp;&nbsp; <?php }
             if($n5 != 0){ $t++; echo $row['a5']; ?></br> &nbsp;&nbsp; <?php }
             if($t == 1) { ?> </br></br> </br> <?php }
             if($t == 2) { ?> </br></br> <?php }
             if($t == 3) { ?> </br> <?php }
             if($t == 4) { ?> <?php }
             if($t == 5) { ?> <?php }
             if($t == 6) { ?> <?php }
             
              ?>
                  
                  
                  
                  </b>
                 </font>
                 </td>
      
         <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['t1']; ?></br>&nbsp;&nbsp;
          <?php $t = 1; 
     $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
     ['v10'];	
     if($n2 != 0){ $t++; echo $row['t2']; ?> </br> &nbsp;&nbsp; <?php }
     if($n3 != 0){ $t++; echo $row['t3']; ?> </br> &nbsp;&nbsp; <?php }
     if($n4 != 0){ $t++; echo $row['t4']; ?> </br> &nbsp;&nbsp; <?php }
     if($n5 != 0){ $t++; echo $row['t5']; ?> </br> &nbsp;&nbsp; <?php }
     if($t == 1) { ?> </br></br> </br> <?php }
     if($t == 2) { ?> </br></br> <?php }
     if($t == 3) { ?> </br> <?php }
     if($t == 4) { ?> <?php }
     if($t == 5) { ?> <?php }
     if($t == 6) { ?> <?php }
     
      ?>
          
          
          
          </b>
         </font>
         </td>
         <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['s1']; ?></br>&nbsp;&nbsp;
          <?php $t = 1; 
     $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
     ['v10'];	
     if($n2 != 0){ $t++; echo $row['s2']; ?> </br> &nbsp;&nbsp; <?php }
     if($n3 != 0){ $t++; echo $row['s3']; ?> </br> &nbsp;&nbsp; <?php }
     if($n4 != 0){ $t++; echo $row['s4']; ?> </br> &nbsp;&nbsp; <?php }
     if($n5 != 0){ $t++; echo $row['s5']; ?> </br> &nbsp;&nbsp; <?php }
     if($t == 1) { ?> </br></br> </br> <?php }
     if($t == 2) { ?> </br></br> <?php }
     if($t == 3) { ?> </br> <?php }
     if($t == 4) { ?> <?php }
     if($t == 5) { ?> <?php }
     if($t == 6) { ?> <?php }
     
      ?>
          
          
          
          </b>
         </font>
         </td>
         <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['g1']; ?></br>&nbsp;&nbsp;
          <?php $t = 1; 
     $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
     ['v10'];	
     if($n2 != 0){ $t++; echo $row['g2']; ?> </br> &nbsp;&nbsp; <?php }
     if($n3 != 0){ $t++; echo $row['g3']; ?> </br> &nbsp;&nbsp; <?php }
     if($n4 != 0){ $t++; echo $row['g4']; ?> </br> &nbsp;&nbsp; <?php }
     if($n5 != 0){ $t++; echo $row['g5']; ?> </br> &nbsp;&nbsp; <?php }
     if($t == 1) { ?> </br></br> </br> <?php }
     if($t == 2) { ?> </br></br> <?php }
     if($t == 3) { ?> </br> <?php }
     if($t == 4) { ?> <?php }
     if($t == 5) { ?> <?php }
     if($t == 6) { ?> <?php }
     
      ?>
          
          
          
          </b>
         </font>
         </td>
         <td style="border-right: 1px solid black;text-align: center;width: 12%;"><font face="Times New Roman" size="1.5px"><b>&nbsp;&nbsp; <?php echo $row['n1']; ?></br>&nbsp;&nbsp;
          <?php $t = 1; 
     $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
     ['v10'];	
     if($n2 != 0){ $t++; echo $row['n2']; ?> </br> &nbsp;&nbsp; <?php }
     if($n3 != 0){ $t++; echo $row['n3']; ?> </br> &nbsp;&nbsp; <?php }
     if($n4 != 0){ $t++; echo $row['n4']; ?> </br> &nbsp;&nbsp; <?php }
     if($n5 != 0){ $t++; echo $row['n5']; ?> </br> &nbsp;&nbsp; <?php }
     if($t == 1) { ?> </br></br> </br> <?php }
     if($t == 2) { ?> </br></br> <?php }
     if($t == 3) { ?> </br> <?php }
     if($t == 4) { ?> <?php }
     if($t == 5) { ?> <?php }
     if($t == 6) { ?> <?php }
     
      ?>
          
          
          
          </b>
         </font>
         </td>
      
    </tr>
  </table>


  <table style="width: 100%;border: 1px solid black;height: 10px;font-size: 14px;font-weight: 100;">
    <tr>
    <?php $hpamt = $row['hpamount'];
	$tamtt = $hpamt + ($hpamt * 0.2); 
	$st = $row['a1']+$row['a2']+$row['a3']+$row['a4']+$row['a5']; 
	$sttt = $row['t1']+$row['t2']+$row['t3']+$row['t4']+$row['t5']; 
	?>
	<td><b>&nbsp;பொருட்களின் மதிப்பு :  <?php echo $tamtt; ?></td>
	<td><b>&nbsp;எடை :  <?php echo $sttt; ?></td>
	<td><b>&nbsp;மொத்த_உருப்படி:<?php echo $st; ?></td></tr>
     
    </tr>
  </table>
  <table style="width: 100%;">
    <tr>
        <td>
            <p style="text-align: center;font-size: 10px;">வேலை நேரம் : 9.00 A.M to 5.00 P.M. விடுமுறை : ஞாயிற்றுக்கிழமை மற்றும் முக்கிய பண்டிகை நாட்கள்</p>
        </td>
    </tr>
  </table>
  <table style="border: 1px solid black;width: 100%;margin-bottom: 0px;position: relative;">
    <tr>
        <td style="width:60%;">
            <div>
             <p style="font-size: 10px;"> மேற்கண்ட திட்டத்தின்படி அடகு வைக்க சம்மதிக்கிறேன். நகையை மீட்க தவறும்பட்சத்தில் ஏலம் விட சம்மதம் தெரிவிக்கிறேன்.
                அதற்கான ஒப்புதல் படிவத்தில் கையெழுத்திட்டுள்ளேன். இதனை முழு மனதுடன் சம்மதிக்கிறேன்.
              </p>
            </div>
            <div style="margin-top: 40px;text-align: left;font-size: 13px;">வாடிக்கையாளர் கையொப்பம் (அ) கைரேகை</div>
        </td>
        <td style="width: 40%;height: 40px;">
           <div style="margin-top: 60px;text-align: right;"><h3 style="font-size: 18px;"> For  <?php echo $row678['name2']; ?>,</h3></div>
        </td>
        
    </tr>
  </table>
  
  <div class="vertical">
    <th>
      
      <font size="2px"><b>திட்டம் :<?php echo $row['sch']; ?></br></font>
	    <font size="2px"><b> ரசீது எண் :<?php echo $row['hpl']; ?></br></font>
      <font size="2px">	அடகு வைத்தவரின் பெயர் : <br><?php echo $row['name']; ?></br></font>
      <font size="2px">	அடகு பொருட்கள் விபரம் : </br></font>
      <font face="Times New Roman" size="2px"><b>&nbsp;&nbsp; <?php echo $row['v1'] ?> - <?php echo $row['a1']; ?></br>&nbsp;&nbsp;
  <?php $t = 1; 
$n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
['v10'];	
if($n2 != 0){ $t++; echo $row['v2'] ?> - <?php echo $row['a2']; ?> </br> &nbsp;&nbsp; <?php }
if($n3 != 0){ $t++; echo $row['v3'] ?> - <?php echo $row['a3']; ?> </br> &nbsp;&nbsp; <?php }
if($n4 != 0){ $t++; echo $row['v4'] ?> - <?php echo $row['a4']; ?> </br> &nbsp;&nbsp; <?php }
if($n5 != 0){ $t++; echo $row['v5'] ?> - <?php echo $row['a5']; ?> </br> &nbsp;&nbsp; <?php }
if($t == 1) { ?> </br></br> </br> <?php }
if($t == 2) { ?> </br></br> <?php }
if($t == 3) { ?> </br> <?php }
if($t == 4) { ?> <?php }
if($t == 5) { ?> <?php }
if($t == 6) { ?> <?php }

?>
  
  
  
  </b>
 </font>


<font size="2px">
  எடை :<?php echo $sttt; ?></br>
  க.நீ.எடை:<?php echo $st; ?><br>
  ரூபாய் :<?php echo $row['hpamount']; ?></br>
  தேதி:<?php echo $row['hpdate']; ?></br>

</font>

</br></br></br></br>
<div >


  <font size="2px"><b>திட்டம் :<?php echo $row['sch']; ?></br></font>
<font size="2px"><b> ரசீது எண் :<?php echo $row['hpl']; ?></br></font>
  <font size="2px">	அடகு வைத்தவரின் பெயர் : <br> <?php echo $row['name']; ?></br></font>
  <font size="2px">	அடகு பொருட்கள் விபரம் : </br></font>
  <font face="Times New Roman" size="2px"><b>&nbsp;&nbsp; <?php echo $row['v1']  ?> - <?php echo $row['a1']; ?></br>&nbsp;&nbsp;
    <?php $t = 1; 
  $n2 = $row['n2']; $n3 = $row['n3']; $n4 = $row['n4']; $n5 = $row['n5']; 
  ['v10'];	
  if($n2 != 0){ $t++; echo $row['v2'] ?> - <?php echo $row['a2']; ?> </br> &nbsp;&nbsp; <?php }
  if($n3 != 0){ $t++; echo $row['v3']  ?> - <?php echo $row['a3']; ?> </br> &nbsp;&nbsp; <?php }
  if($n4 != 0){ $t++; echo $row['v4']  ?> - <?php echo $row['a4']; ?> </br> &nbsp;&nbsp; <?php }
  if($n5 != 0){ $t++; echo $row['v5']  ?> - <?php echo $row['a5']; ?> </br> &nbsp;&nbsp; <?php }
  if($t == 1) { ?> </br></br> </br> <?php }
  if($t == 2) { ?> </br></br> <?php }
  if($t == 3) { ?> </br> <?php }
  if($t == 4) { ?> <?php }
  if($t == 5) { ?> <?php }
  if($t == 6) { ?> <?php }
  
  ?>
    
    
    
    </b>
   </font>
  
  
  <font size="2px">
    எடை :<?php echo $sttt; ?></br>
    க.நீ.எடை:<?php echo $st; ?><br>
    ரூபாய் :<?php echo $row['hpamount']; ?></br>
    தேதி:<?php echo $row['hpdate']; ?></br>
  
  </font>
</div>
</th>
</div>

 
</body>
</html>

<?php
}

?>