<style>
 
.ft0{font: 29px 'Calibri';line-height: 34px;}
.ft1{font: bold 15px 'Calibri';line-height: 18px;}
.ft2{font: 15px 'Calibri';color: #ff0000;line-height: 18px;}
.ft3{font: 15px 'Calibri';line-height: 18px;}
.ft4{font: 13px 'Arial';line-height: 15px;color: #000000;}
.ft5{font: bold 15px 'Calibri';color: #ffffff;line-height: 18px;}
.ft6{font: 15px 'Calibri';color: #ffffff;line-height: 18px;}
.ft7{font: bold 14px 'Calibri';line-height: 17px;}
.ft8{font: 11px 'Arial';line-height: 14px;}
.ft9{font: 1px 'Arial';line-height: 7px;}
.ft10{font: 10px 'Arial';line-height: 13px;}
.ft11{font: 1px 'Arial';line-height: 4px;}
.ft12{font: 1px 'Arial';line-height: 3px;}
.ft13{font: 12px 'Calibri';line-height: 14px;}
.ft14{font: 11px 'Calibri';line-height: 13px;}
.ft15{font: 1px 'Arial';line-height: 5px;}
.ft16{font: 1px 'Arial';line-height: 6px;}
.ft17{font: 15px 'Calibri';text-decoration: underline;line-height: 18px;}


.td0{padding: 0px;margin: 0px;width: 415px;vertical-align: bottom;}
.td1{padding: 0px;margin: 0px;width: 83px;vertical-align: bottom;}
.td2{border-left: #000000 1px solid;border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;background: #4f81bd;}
.td3{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 83px;vertical-align: bottom;background: #4f81bd;}
.td4{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td5{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;background: #4f81bd;}
.td6{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td7{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;background: #4f81bd;}
.td8{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td9{border-left: #000000 1px solid;border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td10{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 83px;vertical-align: bottom;}
.td11{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;}
.td12{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;}
.td13{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td14{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;}
.td15{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;}
.td16{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 142px;vertical-align: bottom;}
.td17{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;}
.td18{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 179px;vertical-align: bottom;}
.td19{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 46px;vertical-align: bottom;}
.td20{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 79px;vertical-align: bottom;}
.td21{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 91px;vertical-align: bottom;}
.td22{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 86px;vertical-align: bottom;}
.td23{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td24{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 134px;vertical-align: bottom;}
.td25{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 110px;vertical-align: bottom;}
.td26{padding: 0px;margin: 0px;width: 88px;vertical-align: bottom;}
.td27{padding: 0px;margin: 0px;width: 96px;vertical-align: bottom;}
.td28{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;background: #000000;}
.td29{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 140px;vertical-align: bottom;background: #4f81bd;}
.td30{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;}
.td31{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 45px;vertical-align: bottom;}
.td32{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td33{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td34{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td35{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;}
.td36{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 304px;vertical-align: bottom;}
.td37{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 88px;vertical-align: bottom;}
.td38{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 96px;vertical-align: bottom;}
.td39{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;}
.td40{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;}
.td41{padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;background: #000000;}
.td42{padding: 0px;margin: 0px;width: 225px;vertical-align: bottom;}
.td43{padding: 0px;margin: 0px;width: 79px;vertical-align: bottom;}
.td44{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;}
.td45{padding: 0px;margin: 0px;width: 86px;vertical-align: bottom;}
.td46{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;}
.td47{padding: 0px;margin: 0px;width: 134px;vertical-align: bottom;}
.td48{padding: 0px;margin: 0px;width: 110px;vertical-align: bottom;}
.td49{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;}
.td50{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;}
.td51{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td52{padding: 0px;margin: 0px;width: 179px;vertical-align: bottom;}
.td53{padding: 0px;margin: 0px;width: 46px;vertical-align: bottom;}
.td54{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td55{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;}
.td56{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;}
.td57{padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td58{padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;}
.td59{padding: 0px;margin: 0px;width: 304px;vertical-align: bottom;}
.td60{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 163px;vertical-align: bottom;}
.td61{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 225px;vertical-align: bottom;}
.td62{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;}
.td63{padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;}
.td64{padding: 0px;margin: 0px;width: 179px;vertical-align: bottom;background: #4f81bd;}
.td65{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 45px;vertical-align: bottom;background: #4f81bd;}
.td66{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td67{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 176px;vertical-align: bottom;background: #4f81bd;}
.td68{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;background: #4f81bd;}
.td69{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td70{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;background: #4f81bd;}
.td71{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;background: #4f81bd;}
.td72{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;background: #4f81bd;}
.td73{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 140px;vertical-align: bottom;background: #4f81bd;}
.td74{padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;background: #4f81bd;}
.td75{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;background: #4f81bd;}
.td76{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td77{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 140px;vertical-align: bottom;background: #4f81bd;}
.td78{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;background: #4f81bd;}
.td79{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 45px;vertical-align: bottom;background: #4f81bd;}
.td80{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td81{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;background: #4f81bd;}
.td82{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td83{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;background: #4f81bd;}
.td84{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td85{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;background: #4f81bd;}
.td86{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;background: #4f81bd;}
.td87{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;background: #4f81bd;}

.tr0{height: 19px;}
.tr1{height: 20px;}
.tr2{height: 23px;}
.tr3{height: 18px;}
.tr4{height: 57px;}
.tr5{height: 7px;}
.tr6{height: 15px;}
.tr7{height: 4px;}
.tr8{height: 14px;}
.tr9{height: 3px;}
.tr10{height: 16px;}
.tr11{height: 5px;}
.tr12{height: 37px;}
.tr13{height: 6px;}

.t0{width: 498px;margin-left: 399px;margin-top: 18px;font: 15px 'Calibri';}
.t1{width: 701px;margin-top: 35px;font: 15px 'Calibri';}
.t2{width: 996px;margin-top: 20px;font: 11px 'Arial';}   
    
</style>
<?php 
	$invoice_info = $this->db->get_where('invoice', array('invoice_id' => $invoice_id))->result_array();
	foreach($invoice_info as $row):
	     $client_id=$row['client_id'];
?>
<div class="content-w">
<ul class="breadcrumb hidden-xs-down hidden-sm-down">
		<div class="back">
			<a href="<?php echo base_url();?>admin/students_payments/"><i class="os-icon os-icon-common-07"></i></a>
		</div>
</ul>
<div class="content-i">
	<div class="content-box">
	  <div class="element-wrapper">
		<div class="invoice-w">
		  <div class="infos">
			<div class="info-1">
			  <div class="invoice-logo-w">
			    
				<img alt="" src="<?php echo base_url();?>uploads/tommylogo.png" height="50%">
			  </div>
			  
			  <TABLE cellpadding=0 cellspacing=0 class="t1">
<TR>
	<TD class="tr0 td2"><P class="p4 ft5">Client</P></TD>
	<TD class="tr0 td3"><P class="p5 ft5">Engineer</P></TD>
	<TD class="tr0 td4"><P class="p6 ft5">Date</P></TD>
	<TD class="tr0 td5"><P class="p7 ft5">Time In</P></TD>
	<TD class="tr0 td6"><P class="p5 ft5">Time Out</P></TD>
	<TD class="tr0 td7"><P class="p8 ft5">Total Hours</P></TD>
	<TD class="tr0 td8"><P class="p9 ft5">Chargeable Hours</P></TD>
</TR>

<TR>
	<TD class="tr3 td9"><P class="p10 ft3">	<?php $exams = $this->db->get_where('client' , array('client_id' =>$client_id))->result_array();
							foreach($exams as $rows):
							?>		
				<?php echo $rows['client_name'];?>
							<?php endforeach;?></P></TD>
	<TD class="tr3 td10"><P class="p11 ft3"><?php echo $row['job_user'];?></P></TD>
	<TD class="tr3 td11"><P class="p12 ft3"><NOBR><?php echo date("Y-m-d",$row['job_date']);
	?> </NOBR></P></TD>
	<TD class="tr3 td12"><P class="p13 ft3"><?php echo $row['job_time_in'];
	?></P></TD>
	<TD class="tr3 td13"><P class="p14 ft3"><?php echo $row['job_time_out'];
	?></P></TD>
	<TD class="tr3 td14"><P class="p15 ft3"><?php echo $row['total_hours'];
	?></P></TD>
	<TD class="tr3 td15"><P class="p16 ft3">2:00</P></TD>
</TR>
<TR>
	<TD class="tr1 td16"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td10"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td11"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td12"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td13"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td14"><P class="p15 ft3">0:00</P></TD>
	<TD class="tr0 td15"><P class="p16 ft3">0:00</P></TD>
</TR>
<TR>
	<TD class="tr0 td16"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td10"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td11"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td12"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td13"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td14"><P class="p15 ft3">0:00</P></TD>
	<TD class="tr3 td15"><P class="p16 ft3">0:00</P></TD>
</TR>
</TABLE>
			  
			  <div class="company-name">
				<?php echo $this->db->get_where('settings', array('type' => 'system_name'))->row()->description;?>
			  </div>
			  <div class="company-address">
				<?php echo $this->db->get_where('settings', array('type' => 'address'))->row()->description;?>
			  </div>
			  <div class="company-extra">
				<?php echo get_phrase('phone');?>: <?php echo $this->db->get_where('settings', array('type' => 'phone'))->row()->description;?>
			  </div>
			</div>
			<div class="info-2"><br><br>
			  <div class="company-name">
				<?php echo $this->db->get_where('student', array('student_id' => $row['student_id']))->row()->name;?>
			  </div>
			  <div class="company-address">
				<?php echo get_phrase('roll');?>: <strong><?php echo $this->db->get_where('enroll', array('student_id' => $row['student_id']))->row()->roll;?></strong><br/>
				<?php echo $this->db->get_where('class', array('class_id' => $row['class_id']))->row()->name;?><br/>
			  </div>
			</div>
		  </div>
		  <div class="invoice-heading">
			<h3><?php echo get_phrase('invoice');?></h3>
			<div class="invoice-date">
			  <?php echo date('d M,Y', $row['creation_timestamp']);?>
			</div>
		  </div>
		  <div class="invoice-body">
			<div class="invoice-table">
			  <table class="table">
				<thead>
				  <tr>
				  	<th><?php echo get_phrase('Client');?></th>
					<th><?php echo get_phrase('description');?></th>
					<th class="text-right"><?php echo get_phrase('amount');?></th>
				  </tr>
				</thead>
				<tbody>
				  <tr>
				  		<td><?php echo $this->db->get_where('client' , array('client_id'=>$client_id))->row()->client_name; ?></td>
					<td><?php 
				$monthNum=	$row['month'];
					$dateObj = DateTime::createFromFormat('!m', $monthNum);
  
// Store the month name to variable
$monthName = $dateObj->format('F');
					
					echo $monthName.' '.$row['year'].' '.'';?></td>
				
						<td><?php echo number_format($row['amount'],2);?></td>
				<!--	<td class="text-right"><?php //echo $this->db->get_where('settings' , array('type'=>'currency'))->row()->description; ?><?php echo $row['amount'];?></td>
				!-->
				  </tr>
				</tbody>
				<tfoot>
				  <tr>
					<td><?php echo get_phrase('total');?></td>
					<td class="text-right" colspan="2"><?php echo $this->db->get_where('settings' , array('type'=>'currency'))->row()->description; ?><?php echo $row['amount'];?></td>
				  </tr>
				</tfoot>
			  </table>
			</div>
		  </div>
		  <div class="invoice-footer">
			<div class="invoice-logo">
			  <img alt="" src="<?php echo base_url();?>uploads/tommylogo.png"><span><?php echo $this->db->get_where('settings', array('type' => 'system_name'))->row()->description;?></span>
			</div>
			<div class="invoice-info">
			  <span><?php echo $this->db->get_where('settings', array('type' => 'system_email'))->row()->description;?></span><span><?php echo $this->db->get_where('settings', array('type' => 'phone'))->row()->description;?></span>
			</div>
		  </div>
		</div>
	  </div>
	</div>
</div>
</div>
<?php endforeach;?>