<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="aihut online" />
<meta name="keywords" content="site keywords" />
 <link  href="<?php echo site_url();?>assets/css/bootstrap1.css" rel="stylesheet">
 <link  href="<?php echo site_url();?>assets/css/admin.css" rel="stylesheet">

    <nav class="navbar navbar-default">
  <div class="container-fluid" style="width:500px; margin:0 auto;">
    <div class="navbar-header">    
              <form class="navbar-form navbar-left" role="search" method="GET" action="">
                <input type="hidden" name="v" value="" >
                <input type="hidden" name="mail" value="true" >
                <input type="hidden" name="id" value="302742" >
                <input type="hidden" name="from" value="" >
                <input type="hidden" name="to" value="" >
                <input type="hidden" name="type" value="2" >
                <input type="hidden" name="action" value="view" >

				         <a class="btn btn-primary" onclick="window.print();"> Print </a>
		 
         
        <!--   <div class="form-group">
            <input type="text" class="form-control" name="e" placeholder="Enter email id" required="required">
          </div>
          <button type="submit" class="btn btn-default">Send</button>-->
        </form>

<style>
.table thead > tr > th, .table tbody > tr > th, .table tfoot > tr > th, .table thead > tr > td, .table tbody > tr > td, .table tfoot > tr > td {
    padding: 3px;
    line-height: 1.428571429;
    vertical-align: top;
    border-top: 1px solid #2c2c2c;
}
#main td, th {
    font-size: 13px;
    border: 1px solid #2c2c2c;
    padding: 3px 8px;
}

.css-serial {
  counter-reset: serial-number;  /* Set the serial number counter to 0 */
}

.css-serial td:first-child:before {
  counter-increment: serial-number;  /* Increment the serial number counter */
  content: counter(serial-number);  /* Display the counter */
}


</style>
    </div>
  </div>

</nav><div class="container" style="width:826px;">
        <link rel="stylesheet" type="text/css" href="<?php echo site_url();?>assets/css/invoice-style.css">
        <body>
<style>
body {
    font-family: Arial;
    color: #111;
}
</style>
		
		<table id="example1" border="2" class="table" style="border-top:1px solid #2c2c2c;">
		<tr>
			<td colspan="8" style="border-bottom: 3px solid #2c2c2c;">
				<div class="heading col-md-8 col-md-offset-2">
				<font size="5em"><b>Tender</b>	</font>
				</div>
			</td>
		</tr>
		<tr>
		
		</tr>
		<tr>
		<td colspan="8">
	
		<div class="row">
<?php
$product_id=$quotation_info[0]['product'];
 $sql = "SELECT product,tax FROM product where IsActive=0 and id='$product_id'";
        $record = $this->db->query($sql);
        $product=$record->row('product');
        $tax=$record->row('tax');
        
      	$tender_date11=$quotation_info[0]['tender_date'];
		$tender_date12=date("d-m-Y", strtotime($tender_date11));
								
		$tender_date1=$quotation_info[0]['tender_due_date'];
		$tender_due_date=date("d-m-Y", strtotime($tender_date1));
?>
            <div class="col-md-4 " style="float:left;">
               <b>Tender no.: </b><?=$quotation_info[0]['tender_no']?><br />
               <b>Product :</b>&nbsp; <?php echo $product?>
            </div>          
			<div class="col-md-4 col-md-offset-2" style="float:right;">
               <b>Tender Date :</b>&nbsp; <?php echo $tender_date12?><br />
			   <b>Tender Due Date : </b>&nbsp; <?php echo $tender_due_date?>
            </div>
		</div>
		
		
			<tr class="css-serial">
    <th>&nbsp;</th>
    <th>Descr.</th>
     <th>Unit Price</th>
    <th>Quantity</th>
    <th>Price</th>
    
</tr>
<?php
	foreach($quotation_info as $r)
	 {
		 
		     $category=$r['category'];
    $component=$r['component'];
    $sql = "SELECT * FROM category where IsActive=0 and category_no='$category'";
        $record = $this->db->query($sql);
        $cat_info=$record->result_array(); 
		
		
		$sqlcc = "SELECT * FROM component where IsActive=0 and component_no='$component'";
        $recordcc = $this->db->query($sqlcc);
        $cat_infocc=$recordcc->result_array();
		
		 ?>
  <tr style="font-size:13px;">
    <td style="border-top:1px solid #111;" scope="row"><?=$cat_info[0]['category']?></td>
    <td style="border-top:1px solid #111;" scope="row"><?=$cat_infocc[0]['component']?></td>
	<td style="border-top:1px solid #111;"><?=$r['price']?></td>
    <td style="border-top:1px solid #111;"><?=$r['quantity']?></td>
    <td style="border-top:1px solid #111;"><?=$r['amount']?></td>
	
  </tr>  
 <?php
	 
}	  
$tender_id=$quotation_info[0]['tender_id'];
 $sql1 = "SELECT sum(amount) as amount FROM quotation where IsActive=0 and tender_id='$tender_id'";
        $record1 = $this->db->query($sql1);
        $amount=$record1->row('amount');
		
		$tamount=(($amount*$tax)/100);
		$tamount1=$tamount+$amount
?>
 <tr style="font-size:13px;">
    <td style="border-top:1px solid #111;" scope="row">&nbsp;</td>
    <td style="border-top:1px solid #111;" scope="row">&nbsp;</td>
	<td style="border-top:1px solid #111;">&nbsp;</td>
    <td style="border-top:1px solid #111;"><b>TOTAL</b></td>
    <td style="border-top:1px solid #111;"><b><?=$amount?></b></td>
	
  </tr>   
  
  <tr style="font-size:13px;">
    <td style="border-top:1px solid #111;" scope="row">&nbsp;</td>
    <td style="border-top:1px solid #111;" scope="row">&nbsp;</td>
	<td style="border-top:1px solid #111;">&nbsp;</td>
    <td style="border-top:1px solid #111;">TAX <?=$tax?>%</td>
    <td style="border-top:1px solid #111;"><?=$tamount?></td>
	
  </tr> 
  
  <tr style="font-size:13px;">
    <td style="border-top:1px solid #111;" scope="row">&nbsp;</td>
    <td style="border-top:1px solid #111;" scope="row">&nbsp;</td>
	<td style="border-top:1px solid #111;">&nbsp;</td>
    <td style="border-top:1px solid #111;"><b>GT</b></td>
    <td style="border-top:1px solid #111;"><b><?=$tamount1?></b></td>
	
  </tr>  
<style>
body {
	margin:0;
	background-color:#f2f2f2;	
}

h1 {
	font-size:28px;	
}
</style>
	<style>
	        .floatedTable {
				float:left;
        }
        .inlineTable {
            display: inline-block;
        }
	</style>

	  
</head>
<body>
</body>

 