<header>
	<div class="row">
		<div class="col-xs-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>
	</div>
	<div class="row">
		<div class="col-xs-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>
					</td>
				</tr>
			</table>
		</div>
	</div>
</header>

<div class="col-xs-12 table-responsive " style="margin-top:2rem">
	<table class="table table-bordered" width="100%" border="1">
		<thead>
			<th class="sorting border-top" 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" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Company Code/ Cost Centre: activate to sort column ascending" style="width: 0px;">
				Company No/ Cost Centre
			</th>
			<th class="sorting border-top" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Company Name: activate to sort column ascending" style="width: 0px;">
				Company Name
			</th>
			<th class="sorting border-top" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Salary/ Wage Month: activate to sort column ascending" style="width: 0px;">
				Salary/ Wage Month
			</th>
			<th class="sorting border-top" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Employee Total Upload: activate to sort column ascending" style="width: 0px;">
				Total Employee Uploded
			</th>
			<th class="sorting border-top" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Total Net Pay: activate to sort column ascending" style="width: 0px;">
				otal Net Pay(RM)
			</th>
			<th class="sorting border-top" tabindex="0" aria-controls="table_contact" rowspan="1" colspan="1" aria-label="Date/ Time Upload: activate to sort column ascending" style="width: 0px;">
				Time/ Date Upload
			</th>
		</thead>

		<tbody>
			<?php
			$totalEmp = 0;
			$totalNet = 0;
			?>
			<?php if($body)
			foreach ($body as $key => $content) {
				?>
				<tr>
					<td class="border-bottom"><?php echo $key+1;?></td>
					<td class="border-bottom text-center"><?php echo $content->roc_no?></td>
					<td class="border-bottom"><?php echo $content->name;?></td>
					<td class="border-bottom text-center"><?php echo date('M',mktime(0,0,0,$content->month,10)).' '.$content->year;?></td>
					<td class="text-center border-bottom"><?php echo $content->total_record;?></td>
					<td class="text-right border-bottom"><?php echo number_format($content->total_netpay,2);?></td>
					<td class="border-bottom"><?php echo $content->uploadedTS;?></td>
				</tr>
				<?php 
				$totalEmp += $content->total_record;
				$totalNet += $content->total_netpay;
			} ?>
				<tr>
					<td colspan="4" class="border-bottom  text-center"><b>TOTAL</b></td>
					<td class="text-center border-bottom"><b><?php echo $totalEmp;?></b></td>
					<td class="text-right border-bottom"><b><?php echo number_format($totalNet,2);?></td>
					<td class="border-bottom "></td>
				</tr>
		</tbody>	
	</table>	
</div>	
									

