
			
		<header>
			<div class="row">
				<div class="col-12">
					<div class="t-corp pull-left">
						<div class="t-corp-logo">
							<img src="<?php echo base_url().'assets/images/logo/salihin-logo.png'; ?>" alt="company logo" />
						</div>
						<div class="t-corp-name"><b>SPS</b> | HR SYSTEM</div>
					</div>
					<div class="report-title pull-right" style="padding-top: 30px;">
						<h5><?php echo (isset($title) ? $title : 'Report'); ?></h5>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-12">
					<table class="company">
						<tr>
							<td class="divider">
								<span class="line">&nbsp;</span>
							</td>
							<td class="details">
								<span><b>SALIHIN (AF 1426)</b></span>
								<span>555, Jalan Samudra Utara 1, Taman Samudra, Batu Caves,</span>
								<span>68100, Batu Caves, Selangor</span>
								<span>Phone: 03-6185 9970 &nbsp;&nbsp; Fax: 03-6185 9970</span>
								<span>Website: salihin.com.my</span>
							</td>
							<td class="divider">
								<span class="line">&nbsp;</span>
								<span><b>NAME &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <?php echo $_SESSION['user']['name'] ?></b></span>
								<?php if(!empty($this->session->userdata('filter_year'))){ ?>
									<span><b>YEAR &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: <?php echo $this->session->userdata('filter_year'); ?></b></span>
								<?php } else {?>
									<span><b>YEAR &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: ALL</b></span>
								<?php } ?>

								<?php if(!empty($this->session->userdata('filter_month'))){ ?>
									<span><b>MONTH &nbsp;&nbsp;&nbsp;&nbsp;: <?php echo $this->session->userdata('filter_month'); ?></b></span>
								<?php } else {?>
									<span><b>MONTH &nbsp;&nbsp;&nbsp;&nbsp;: ALL</b></span>
								<?php } ?>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</header>

		<div class="col-12 table-responsive " style="margin-top:2rem">
					
			<table class="table table-bordered" width="100%" border="1">
				<thead>
					<th class="sorting border-top text-center" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="#: activate to sort column ascending" style="width: 0px;">
						#
					</th>
					<th class="sorting border-top text-center" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Company Code/ Cost Centre: activate to sort column ascending" style="width: 0px;">
						Year
					</th>
					<th class="sorting border-top text-center" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Company Name: activate to sort column ascending" style="width: 0px;">
						Month
					</th>
					<th class="sorting border-top text-center" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Employee Total Upload: activate to sort column ascending" style="width: 0px;">
						Total Hours Applied
					</th>
					<th class="sorting border-top text-center" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Employee Total Upload: activate to sort column ascending" style="width: 0px;">
						Total Hours Approved
					</th>
					<th class="sorting border-top text-center" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Employee Total Upload: activate to sort column ascending" style="width: 0px;">
						Claim Status
					</th>						
				</thead>	

				<tbody>
					<?php if ($this->session->userdata('hr__ot') && $this->session->userdata('hr__ot') != 'no result'): ?>
					<?php foreach ($this->session->userdata('hr__ot') as $key => $group): ?>
					
					<tr>
						<td class="text-center"><?php echo $key+1;?></td>
						<td class="text-center"><?php echo $group['year'];?></td>
						<td class="text-center"><?php echo date('F', mktime(0, 0, 0, $group['month'], 10));?></td>
						<td class="text-center"><?php echo $group['totalHoursApplied'];?></td>
						<td class="text-center"><?php echo $group['totalHoursApproved'];?></td>
						<td>
							<div class="text-center">
								<?php if($group['claim_status'] == 0){ ?>
		                            <span class="badge badge-danger text-white">CLAIM PENDING</span><br>
		                        <?php } else if($group['claim_status'] == 1){ ?>
		                            <span class="badge badge-primary text-white">CLAIM SUBMITTED</span><br>
		                        <?php } else { ?> 
		                        	<span class="badge badge-success text-white">CLAIM APPROVED</span><br>
		                        <?php } ?>

		                        <?php if($group['paid_status'] == 0){  ?>
		                            <span class="badge badge-danger text-white">CLAIM UNPAID</span>
		                        <?php } else { ?>
		                        	<span class="badge badge-success text-white">CLAIM PAID</span>
		                        <?php } ?>
							</div>
						</td>																							
					</tr>

					<?php endforeach ?>
					<?php endif ?>

				</tbody>		
			</table>	
							
		</div>	
									

