<div class="card bg-light-transparent mb-3">
	<div class="card-body">
		<div class="card no-shadow"  style="padding-top: 3rem; padding-bottom: 3rem;">
			<div class="card-body">
				<a class="btn btn-info float-right" href="<?php echo base_url('/hr/StaffProfile/printAction/'.$action_type->id); ?>" target="_blank">
					<i class="fas fa-print"></i>
				</a>
				<div class="container">
					<h4><?php echo $action_type->type; ?></h4>
					<!-- <small><?php echo date('d-F-Y',strtotime($action_type->action_efective_date)); ?></small> -->
					<small><?php echo mysql_to_date_format($action_type->action_efective_date); ?></small>
				</div>

				
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>PERSONAL DETAILS</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>STAFF ID</b>
								</div>
								<div class="col">
									<p> : <?php echo (!empty($action_type->staff_id))?$action_type->staff_id:'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>TITLE</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->user_title))?strtoupper($action_type->user_title):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>NAME</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->name))?strtoupper($action_type->name):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>BIRTH DATE</b>
								</div>
								<div class="col">
									<!-- <p>: <?php echo (!empty($action_type->birth_date))?strtoupper(date('d-F-Y',strtotime($action_type->birth_date))):'N/A' ?></p> -->
									<p>: <?php echo (!empty(mysql_to_date_format($action_type->birth_date)))?strtoupper(mysql_to_date_format($action_type->birth_date)):'N/A' ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>BIRTH PLACE</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->birth_place))?strtoupper($action_type->birth_place):'N/A'; ?></p>
								</div>
							</div>							
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>GENDER</b>
								</div>
								<div class="col">
									<p>: 
										<?php 
										if(!empty($action_type->gender_id == 1))
										{
											echo strtoupper('male');
										}elseif (!empty($action_type->gender_id == 2)) 
										{
											echo strtoupper('female');
										}else{
											echo 'N/A';
										}
										?>
									</p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>HOBBY</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->hobby))?strtoupper($action_type->hobby):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>NRIC / PASSPORT</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->ic_no))?strtoupper($action_type->ic_no):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>NATIONALITY</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->nationality))?strtoupper($action_type->nationality):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>PASSPORT EXPIRED DATE</b>
								</div>
								<div class="col">
									<!-- <p>: <?php echo (!empty($action_type->passport_expired_date))?date('d-F-Y',strtotime($action_type->passport_expired_date)):'N/A'; ?></p> -->
									<p>: <?php echo (!empty(mysql_to_date_format($action_type->passport_expired_date)))?strtoupper(mysql_to_date_format($action_type->passport_expired_date)):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>WORKING EXPIRED DATE</b>
								</div>
								<div class="col">
									<!-- <p>: <?php echo (!empty($action_type->working_expired_date))?date('d-F-Y',strtotime($action_type->working_expired_date)):'N/A'; ?></p> -->
									<p>: <?php echo (!empty(mysql_to_date_format($action_type->working_expired_date)))?strtoupper(mysql_to_date_format($action_type->working_expired_date)):'N/A'; ?></p>

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

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>PLACE OF ISSUE</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->issue_country))?strtoupper($action_type->issue_country):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>MOBILE NUMBER</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->phone))?strtoupper($action_type->phone):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>EXTENSION NUMBER</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->ext_no))?strtoupper($action_type->ext_no):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>RELIGION</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->religion))?strtoupper($action_type->religion):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>RACE</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->race))?strtoupper($action_type->race):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>RESIDENTIAL STATUS</b>
								</div>
								<div class="col">
									<p>:
										<?php 
										if (!empty($action_type->residential_id == 1)) 
										{	
											echo strtoupper('resident');
										}elseif ($action_type->residential_id == 2) 
										{
											echo strtoupper('non resident');
										}else{
											echo 'N/A';
										}
										?>
									</p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>MARITAL STATUS</b>
								</div>
								<div class="col">
									<p>:
										<?php 
											if (!empty($action_type->marital_status)) {
												echo ($action_type->marital_status == 1)?strtoupper('single'):'';
												echo ($action_type->marital_status == 2)?strtoupper('married'):'';
												echo ($action_type->marital_status == 3)?strtoupper('divorce'):'';
											}else{
												echo 'N/A';
											}
										?>
									</p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>MARRIED DATE</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty(mysql_to_date_format($action_type->married_date)))?strtoupper(mysql_to_date_format($action_type->married_date)):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>PRIMARY EMAIL</b>
								</div>
								<div class="col">
									<P>: <?php echo (!empty($action_type->primary_email))?$action_type->primary_email:'N/A'; ?></P>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>SECONDARY EMAIL</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($action_type->secondary_email))?$action_type->secondary_email:'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>			
				</div>

				<!-- join group action type -->
				<?php if(!empty($join_group)){ ?>
				<div class="container">

					<div class="row">
						<div class="col">
							<h4><b>EMPLOYMENT DETAIL</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>REASON</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->reason)?strtoupper($join_group->reason):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>POSITION</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->position_hiring)?strtoupper($join_group->position_hiring):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>DESIGNATION</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->designation)?strtoupper($join_group->designation):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>EMPLOYEE GRADE</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->employee_grade)?strtoupper($join_group->employee_grade):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col">
							<div class="row">
								<div class="col-12 col-lg-3">
									<b>REPORTING TO</b>
								</div>
								<div class="col-12 col-lg-9">
									<p>: <?php echo ($join_group->user_reporting_name)?strtoupper($join_group->user_reporting_name):'N/A';?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col">
							<div class="row">
								<div class="col">
									<b>BUSINESS ENTITY</b>
								</div>
								<div class="col">
									<p>: <?php echo ($join_group->business_entity)?strtoupper($join_group->business_entity):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col">
							<div class="row">
								<div class="col">
									<b>BRANCH</b>
								</div>
								<div class="col">
									<p>: <?php echo ($join_group->branch)?strtoupper($join_group->branch):'N/A';?></p>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>PERSONNEL AREA</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->personnel_area)?strtoupper($join_group->personnel_area):'N/A';?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>PERSONAL SUBAREA</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->personal_subarea)?strtoupper($join_group->personal_subarea):'N/A';?></p>
								</div>
							</div>
						</div>
					</div>	

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>EMPLOYEE GROUP</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->employee_group)?strtoupper($join_group->employee_group):'N/A';?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>CONTRACT ELEMENT</b>
								</div>
								<div class="col">
									<p>: <?php echo ($join_group->contract_element)?strtoupper($join_group->contract_element):'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>	

					<div class="row">
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col">
									<b>EMPLOYEE SUBGROUP</b>
								</div>
								<div class="col">
									<p>: <?php echo ($join_group->employee_subgroup_designation)? strtoupper($join_group->employee_subgroup_indicator.' - '.$join_group->employee_subgroup_designation):'N/A'; ?></p>
								</div>
							</div>
						</div>
						<div class="col-12 col-lg-6">
							<div class="row">
								<div class="col-12 col-lg-6">
									<b>EMPLOYMENT STATUS</b>
								</div>
								<div class="col-12 col-lg-6">
									<p>: <?php echo ($join_group->is_active == 1)?'ACTIVE':'INACTIVE'; ?></p>
								</div>
							</div>
						</div>
					</div>
				</div>
				<?php  } ?>
				<!-- join group action type -->

				<!-- address -->
				<?php if($addresses){?>
				<div class="container">

					<div class="row">
						<div class="col">
							<h4><b>ADDRESS</b></h4>
						</div>
					</div>

					<br>
					<div class="row">
						<div class="col table-responsive">
							
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>TYPE</th>
										<th>ADDRESS</th>
										<th>POSTCODE</th>
										<th>CITY</th>
										<th>STATE</th>
										<th>COUNTRY</th>
										<th>CONTACT</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($addresses as $key => $address): ?>
									<tr>
										<td>
											<?php
												if ($address->type == 1) {
													echo 'PERMANENT RESIDENCE';
												}elseif ($address->type == 2) {
													echo 'TEMPORARY RESIDENCE';
												}elseif ($address->type == 3) {
													echo 'CORRESPONDENCE RESIDENCE';
												}else{
													echo 'N/A';
												}
											?>
										</td>
										<td><?php echo ($address->address)?strtoupper($address->address):'N/A'; ?></td>
										<td><?php echo ($address->postcode)?strtoupper($address->postcode):'N/A'; ?></td>
										<td><?php echo ($address->city)?strtoupper($address->city):'N/A'?></td>
										<td><?php echo ($address->state_name)?strtoupper($address->state_name):'N/A'; ?></td>
										<td><?php echo ($address->country_name)?strtoupper($address->country_name):'N/A'; ?></td>
										<td><?php echo ($address->contact_no)?strtoupper($address->contact_no):'N/A'; ?></td>
									</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- address -->

				<!-- family information -->
				<?php if($family_info){ ?>
				<div class="container">
					
					<div class="row">
						<div class="col">
							<h4><b>FAMILY INFORMATION</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">

							<table class="table table-bordered">
								<thead>
									<tr>
										<th>Detail</th>
										<th>Status</th>
									</tr>
								</thead>
								<tbody>
									<?php if(!empty($family_info)) foreach ($family_info as $key => $fmly_info): ?>
										<tr>
											<td>
												<b>NAME</b>: <?php echo ($fmly_info->name)?strtoupper($fmly_info->name):'N/A'; ?><br>
												<b>NRIC</b>: <?php echo ($fmly_info->ic_no)?strtoupper($fmly_info->ic_no):'N/A'; ?> <br>
												<b>RELATION</b>: <?php echo ($fmly_info->relations)?strtoupper($fmly_info->relations):'N/A'?> <br>
												<!-- <b>BIRTHDATE</b>: <?php echo ($fmly_info->birthdate)?strtoupper(date('d-F-Y',strtotime($fmly_info->birthdate))):'N/A'; ?> <br> -->
												<b>BIRTHDATE</b>: <?php echo (!empty(mysql_to_date_format($fmly_info->birthdate)))?strtoupper(mysql_to_date_format($fmly_info->birthdate)):'N/A'; ?> <br>

												<b>OCCUPATION</b>: <?php echo ($fmly_info->occupation)?strtoupper($fmly_info->occupation):'N/A'; ?> <br>
												<b>EMAIL</b>: <?php echo ($fmly_info->email)?$fmly_info->email:'N/A'; ?> <br>
												<b>CONTACT NO</b>: <?php echo ($fmly_info->phone_no)?strtoupper($fmly_info->phone_no):'N/A'; ?> <br>
												<b>ADDRESS</b>: <?php echo ($fmly_info->address)?strtoupper($fmly_info->address):'N/A'; ?> <br>
												<b>ACADEMIC LEVEL</b>: <?php echo ($fmly_info->level_academic)?strtoupper($fmly_info->level_academic):'N/A'; ?> <br>
												<b>ACADEMIC INSTITUTION</b>: <?php echo ($fmly_info->academic_institution)?strtoupper($fmly_info->academic_institution):'N/A'; ?>
											</td>
											<td>
												<b>OKU STATUS </b> <?php echo ($fmly_info->oku_status == 0)?'YES':'NO'; ?> <br>
												<b>STUDENT STATUS </b> <?php echo ($fmly_info->study_status == 0)?'YES':'NO'; ?>
											</td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- family information -->

				<!-- academic qualification -->
				<?php if($academic_qualification){ ?>
				<div class="container">
					
					<div class="row">
						<div class="col">
							<h4><b>ACADEMIC EDUCATION</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>LEVEL</th>
										<th>PROGRAM</th>
										<th>UNIVERSITY / INSTITUTION</th>
										<th>YEAR GRADUATED</th>
										<th>FINAL RESULTS / CGPA</th>
										<th>ATTACHMENTS</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($academic_qualification as $key => $row): ?>	
									<tr>
										<td><?php echo ($row->academic_level)? strtoupper($row->academic_level):'N/A'; ?></td>
										<td><?php echo ($row->program)? strtoupper($row->program):'N/A'; ?></td>
										<td><?php echo ($row->institution)? strtoupper($row->institution):'N/A'; ?></td>
										<td><?php echo ($row->year)? strtoupper($row->year):'N/A'; ?></td>
										<td><?php echo ($row->cgpa)?strtoupper($row->cgpa):'N/A'; ?></td>
										<td><?php echo ($row->attachment_name)?'<a href="'.base_url('hr/staffProfile/openAttachment/'.$row->mask_id.'/1').'" target="_blank">'.$row->attachment_name.'</a>':'N/A'; ?></td>
									</tr>
									<?php endforeach ?>

								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- academic qualification -->

				<!-- education in progress -->
				<?php if($pursuing_study){ ?>
				<div class="container">
					
					<div class="row">
						<div class="col">
							<h4><b>EDUCATION IN PROGRESS</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>PROGRAM</th>
										<th>UNIVERSITY / INSTITUTION</th>
										<th>PROGRESS PAPER IN HAND</th>
										<th>START DATE</th>
										<th>EXPECTED DATE OF COMPLETION</th>
										<th>STATUS</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($pursuing_study as $key => $row): $status = ($row->status == 1)?'Completed':'On Going'; ?>	
									<tr>
										<td><?php echo ($row->program)? strtoupper($row->program):'N/A'; ?></td>
										<td><?php echo ($row->institution)? strtoupper($row->institution):'N/A'; ?></td>
										<td><?php echo ($row->progress_paper)? strtoupper($row->progress_paper):'N/A'; ?></td>
										<td><?php echo (!empty(mysql_to_date_format($row->date_start)))?strtoupper(mysql_to_date_format($row->date_start)):'N/A'; ?></td>
										<td><?php echo (!empty(mysql_to_date_format($row->date_end)))?strtoupper(mysql_to_date_format($row->date_end)):'N/A'; ?></td>
										<td><?php echo strtoupper($status); ?></td>
									</tr>
									<?php endforeach ?>

								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- education in progress -->

				<!-- emergency contact -->
				<?php if($emergency_contact){ ?>
				<div class="container">
					
					<div class="row">
						<div class="col">
							<h4><b>EMERGENCY CONTACT</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>NAME</th>
										<th>RELATION</th>
										<th>CONTACT NUMBER</th>
										<th>EMAIL</th>
										<th>ADDRESS</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($emergency_contact as $key => $row): ?>	
									<tr>
										<td><?php echo ($row->name)? strtoupper($row->name):'N/A'; ?></td>
										<td><?php echo ($row->relation)? strtoupper($row->relation):'N/A'; ?></td>
										<td><?php echo ($row->phone_no)? strtoupper($row->phone_no):'N/A'; ?></td>
										<td><?php echo ($row->email)? strtoupper($row->email):'N/A'; ?></td>
										<td><?php echo ($row->address)? strtoupper($row->address):'N/A'; ?></td>
									</tr>
									<?php endforeach ?>

								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- emergency contact -->

				<!-- additional personal data -->
				<?php if($additional_personal_data){ ?>
				<div class="container">

					<div class="row">
						<div class="col">
							<h4><b>ADDITIONAL PERSONAL DATA</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>DETAIL</th>
										<th>DESCRIPTION</th>
										<th>Attachments</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($additional_personal_data as $key => $row): ?>	
									<tr>
										<td><?php echo ($row->detail)?strtoupper($row->detail):'N/A'; ?></td>
										<td><?php echo ($row->description)?strtoupper($row->description):'N/A'; ?></td>
										<td><?php echo ($row->attachment_name)?'<a href="'.base_url('/hr/staffProfile/openAttachment/'.$row->mask_id).'" target="_blank">'.$row->attachment_name.'</a>':''; ?></td>
									</tr>
									<?php endforeach ?>

								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- additional personal data -->

				<!-- previous employment detail -->
				<?php if($previous_employment_history){ ?>
				<div class="container">
					
					<div class="row">
						<div class="col">
							<h4><b>PREVIOUS EMPLOYMENT DETAIL</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">

							<table class="table table-bordered">
								<thead>
									<tr>
										<th>DATE JOIN</th>
										<th>DATE TO</th>
										<th>DETAILS</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($previous_employment_history as $key => $row): ?>
										<tr>
											<!-- <td><?php echo ($row->date_enter)?strtoupper(date('d-F-Y',strtotime($row->date_enter))):'N/A'; ?></td> -->
											<td><?php echo (!empty(mysql_to_date_format($row->date_enter)))?strtoupper(mysql_to_date_format($row->date_enter)):'N/A'; ?></td>

											<!-- <td><?php echo ($row->date_exit)?strtoupper(date('d-F-Y',strtotime($row->date_exit))):'N/A'; ?></td> -->
											<td><?php echo (mysql_to_date_format($row->date_exit))?strtoupper(mysql_to_date_format($row->date_exit)):'N/A'; ?></td>

											<td>
												<b>EMPLOYER NAME </b>: <?php echo($row->employer_name)?strtoupper($row->employer_name):'N/A'; ?> <br>
												<b>EMPLOYER ADDRESS </b>: <?php echo($row->employer_address)?strtoupper($row->employer_address):'N/A'; ?> <br>
												<b>POSITION </b>: <?php echo($row->position)?strtoupper($row->position):'N/A'; ?> <br>
												<b>LENGTH OF SERVICE </b>: <?php echo($row->length_of_service)?strtoupper($row->length_of_service):'N/A'; ?> <br>
												<b>DESCRIPTION </b>: <?php echo ($row->description)?strtoupper($row->description):'N/A'; ?>
											</td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- previous employment detail -->

				<!-- professional membership -->
				<?php if($professional_membership){ ?>
				<div class="container">
					
					<div class="row">
						<div class="col">
							<h4><b>PROFESSIONAL MEMBERSHIP</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>PROFESSIONAL BODIES</th>
										<th>NAME OF MEMBERSHIP</th>
										<th>TYPE OF MEMBERSHIP</th>
										<th>MEMBERSHIP NUMBER</th>
										<th>YEAR</th>
										<th>ATTACHMENT</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($professional_membership as $key => $row): ?>
									<tr>
										<td><?php echo ($row->professional_body)?$row->professional_body:'N/A'; ?></td>
										<td><?php echo ($row->certificate)?$row->certificate:'N/A'; ?></td>
										<td><?php echo ($row->membership)?$row->membership:'N/A';  ?></td>
										<td><?php echo ($row->membership_no)?$row->membership_no:'N/A'; ?></td>
										<td><?php echo ($row->year)?$row->year:'N/A';?></td>
										<td><?php echo ($row->attachment_name)?$row->attachment_name:'N/A'; ?></td>
									</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- professional membership -->

				<!-- professional licenses -->
				<?php if($professional_license){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>PROFESSIONAL LICENSES</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>NAME OF LICENSE</th>
										<th>LICENSE NO</th>
										<th>LICENSE BODY/AUTHORITY</th>
										<th>REGISTRATION DATE</th>
										<th>LATEST RENEWAL DATE</th>
										<th>NEXT RENEWAL DATE</th>
										<th>ATTACHMENT</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($professional_license as $key => $row): ?>	
									<tr>
										<td><?php echo ($row->profession)?strtoupper($row->profession):'N/A';?></td>
										<td><?php echo ($row->license_no)?strtoupper($row->license_no):'N/A';?></td>
										<td><?php echo ($row->license_body_authority)?strtoupper($row->license_body_authority):'N/A';?></td>
										<td><?php echo (!empty(mysql_to_date_format($row->register_date)))?strtoupper(mysql_to_date_format($row->register_date)):'N/A';?></td>
										<td><?php echo (!empty(mysql_to_date_format($row->renewal_date)))?strtoupper(mysql_to_date_format($row->renewal_date)):'N/A'; ?></td>
										<td><?php echo (!empty(mysql_to_date_format($row->next_renewal_date)))?strtoupper(mysql_to_date_format($row->next_renewal_date)):'N/A'; ?></td>
										<td><?php echo ($row->attachment_name)?strtoupper($row->attachment_name):'N/A'; ?></td>
									</tr>
									<?php endforeach ?>

								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- professional licenses -->

				<!-- professional education -->
				<?php if($professional_education){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>PROFESSIONAL EDUCATION</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>LEVEL</th>
										<th>NAME OF PROFESSIONAL ASSOCIATION</th>
										<th>NAME OF COURSE STUDY</th>
										<th>DATE GRADUATED</th>
										<th>FINAL RESULT</th>
										<th>ATTACHMENT</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($professional_education as $key => $row): ?>	
									<tr>
										<td><?php echo ($row->level)?strtoupper($row->level):'N/A';?></td>
										<td><?php echo ($row->associate_name)?strtoupper($row->associate_name):'N/A';?></td>
										<td><?php echo ($row->program)?strtoupper($row->program):'N/A';?></td>
										<td><?php echo (!empty(mysql_to_date_format($row->date_finish)))?strtoupper(mysql_to_date_format($row->date_finish)):'N/A';?></td>
										<td><?php echo ($row->result)?strtoupper($row->result):'N/A';?></td>
										<td><?php echo ($row->attachment_name)?strtoupper($row->attachment_name):'N/A'; ?></td>
									</tr>
									<?php endforeach ?>

								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- professional education -->

				<!-- professional certificate -->
				<?php if($professional_certificate){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>PROFESSIONAL EDUCATION</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>NAME OF CERTIFICATION BODY</th>
										<th>NAME OF CERTIFICATION PROGRAMME</th>
										<th>DATE FINISH</th>
										<th>RESULT</th>
										<th>ATTACHMENT</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($professional_certificate as $key => $row): ?>	
									<tr>
										<td><?php echo ($row->associate_name)?strtoupper($row->associate_name):'N/A';?></td>
										<td><?php echo ($row->program)?strtoupper($row->program):'N/A';?></td>
										<td><?php echo (!empty(mysql_to_date_format($row->date_finish)))?strtoupper(mysql_to_date_format($row->date_finish)):'N/A';?></td>
										<td><?php echo ($row->result)?strtoupper($row->result):'N/A';?></td>
										<td><?php echo ($row->attachment_name)?strtoupper($row->attachment_name):'N/A'; ?></td>
									</tr>
									<?php endforeach ?>

								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- professional certificate -->

				<!-- recognition -->
				<?php if($recognition){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>RECOGNITION</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col table-responsive">	
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>ACHIEVEMENT</th>
										<th>AWARD</th>
										<th>YEAR</th>
										<th>ATTACHMENT</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($recognition as $key => $row): ?>
										<tr>
											<td><?php echo ($row->achievement)?strtoupper($row->achievement):'N/A'; ?></td>
											<td><?php echo ($row->award)?strtoupper($row->award):'N/A'; ?></td>
											<td><?php echo ($row->year)?strtoupper($row->year):'N/A'; ?></td>
											<td><?php echo ($row->attachment_name)?strtoupper($row->attachment_name):'N/A'; ?></td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- recognition -->

				<!-- contract element -->
				<?php if($contract_element){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>CONTRACT ELEMENT</b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col">
							<div class="row">
								<div class="col-12 col-lg-6">
									<div class="row">
										<div class="col">
											<b>CONTRACT TYPE</b>
										</div>
										<div class="col">
											<P>: <?php echo ($contract_element->contract_type)?strtoupper($contract_element->contract_type):'N/A'; ?></P>
										</div>
									</div>
								</div>
								<div class="col-12 col-lg-6">
									<div class="row">
										<div class="col">
											<b>CONFIRMATION</b>
										</div>
										<div class="col">
											<p>: <?php echo ($contract_element->confirmation_type)?strtoupper($contract_element->confirmation_type):'N/A'; ?></p>
										</div>
									</div>
								</div>
							</div>

							<div class="row">
								<div class="col-12 col-lg-6">
									<div class="row">
										<div class="col">
											<b>CONFIRMATION DATE</b>
										</div>
										<div class="col">
											<P>: <?php echo (!empty(mysql_to_date_format($contract_element->confirmation_date)))?strtoupper(mysql_to_date_format($contract_element->confirmation_date)):'N/A';?></P>
										</div>
									</div>
								</div>
								<div class="col-12 col-lg-6">
									<div class="row">
										<div class="col-12 col-lg-6">
											<b>PROBATIONARY PERIOD</b>
										</div>
										<div class="col-12 col-lg-6">
											<p>: 
												<?php echo ($contract_element->probation)?strtoupper($contract_element->probation):'';?>
												<?php 
													if ($contract_element->probation_duration == 0) {
														echo strtoupper('days');
													}elseif ($contract_element->probation_duration == 1) {
														echo strtoupper('weeks');
													}elseif ($contract_element->probation_duration == 2) {
														echo strtoupper('months');
													}elseif ($contract_element->probation_duration == 3) {
														echo strtoupper('years');
													}
												?>
											</p>
										</div>
									</div>
								</div>
							</div>

							<div class="row">
								<div class="col-12 col-lg-6">
									<div class="row">
										<div class="col-12 col-lg-6">
											<b>EMPLOYER NOTICE PERIOD</b>
										</div>
										<div class="col-12 col-lg-6">
											<P>: 
												<?php echo ($contract_element->er_notice)?strtoupper($contract_element->er_notice):'';?>
												<?php 
													if ($contract_element->er_notice_duration == 0) {
														echo strtoupper('days');
													}elseif ($contract_element->er_notice_duration == 1) {
														echo strtoupper('weeks');
													}elseif ($contract_element->er_notice_duration == 2) {
														echo strtoupper('months');
													}elseif ($contract_element->er_notice_duration == 3) {
														echo strtoupper('years');
													}
												?>
											</P>
										</div>
									</div>
								</div>
								<div class="col-12 col-lg-6">
									<div class="row">
										<div class="col-12 col-lg-6">
											<b>EMPLOYEE NOTICE PERIOD</b>
										</div>
										<div class="col-12 col-lg-6">
											<p>: 
												<?php echo ($contract_element->ee_notice)?strtoupper($contract_element->ee_notice):'';?>
												<?php 
													if ($contract_element->ee_notice_duration == 0) {
														echo strtoupper('days');
													}elseif ($contract_element->ee_notice_duration == 1) {
														echo strtoupper('weeks');
													}elseif ($contract_element->ee_notice_duration == 2) {
														echo strtoupper('months');
													}elseif ($contract_element->ee_notice_duration == 3) {
														echo strtoupper('years');
													}
												?>
											</p>
										</div>
									</div>
								</div>
							</div>

							<div class="row">
								<div class="col">
									<div class="row">
										<div class="col">
											<b>RESIGN DATE</b>
										</div>
										<div class="col">
											<P>: <?php echo (!empty(mysql_to_date_format($contract_element->resign_date)))?strtoupper(mysql_to_date_format($contract_element->resign_date)):'N/A';?></P>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="row">
										<div class="col">
											<b>LAST WORKING DATE</b>
										</div>
										<div class="col">
											<P>: <?php echo (!empty(mysql_to_date_format($contract_element->last_working_date)))?strtoupper(mysql_to_date_format($contract_element->last_working_date)):'N/A';?></P>
										</div>
									</div>
								</div>
							</div>

							<div class="row">
								<div class="col">
									<div class="row">
										<div class="col">
											<b>PHYSICAL LAST WORKING DATE</b>
										</div>
										<div class="col">
											<P>: <?php echo (!empty(mysql_to_date_format($contract_element->phy_last_working_date)))?strtoupper(mysql_to_date_format($contract_element->phy_last_working_date)):'N/A';?></P>
										</div>
									</div>
								</div>
								<div class="col">
								</div>
							</div>

						</div>
					</div>
				</div>
				<?php } ?>
				<!-- contract element -->

				<!-- basic pay -->
				<?php if($basic_pay){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>BASIC PAY</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col">
							<div class="row">
								<div class="col">
									<div class="row">
										<div class="col">
											<b>PAY SCALE GROUP</b>
										</div>
										<div class="col">
											<P>: <?php echo ($basic_pay->scale_group)?$basic_pay->scale_group:null;?></P>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="row">
										<div class="col">
											<b>BASIC PAY AMOUNT</b>
										</div>
										<div class="col">
											<p>: <?php echo ($basic_pay->amount)?'RM'.number_format($basic_pay->amount,2):null;?></p>
										</div>
									</div>
								</div>
							</div>

							<div class="row">
								<div class="col">
									<div class="row">
										<div class="col">
											<b>START DATE</b>
										</div>
										<div class="col">
											<P>: <?php echo (!empty(mysql_to_date_format($basic_pay->start_date)))?strtoupper(mysql_to_date_format($basic_pay->start_date)):'N/A'?></P>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="row">
										<div class="col">
											<b>END DATE</b>
										</div>
										<div class="col">
											<p>: <?php echo (!empty(mysql_to_date_format($basic_pay->end_date)))?strtoupper(mysql_to_date_format($basic_pay->end_date)):'N/A';?></p>
										</div>
									</div>
								</div>
							</div>


							<div class="row">
								<div class="col">
									<div class="row">
										<div class="col">
											<b>REASON</b>
										</div>
										<div class="col">
											<P>: <?php echo ($basic_pay->reason)?strtoupper($basic_pay->reason):'N/A';?></P>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="row">
										<div class="col">
											<b>STATUS</b>
										</div>
										<div class="col">
											<p>: <?php echo ($basic_pay->status == 1)?'ACTIVE':'INACTIVE'; ?></p>
										</div>
									</div>
								</div>
							</div>

						</div>
					</div>
				</div>
				<?php } ?>
				<!-- basic pay -->

				<!-- bank details -->
				<?php if($bank_details){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>BANK DETAILS</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>BANK NAME</th>
										<th>BRANCH</th>
										<th>ACCOUNT NUMBER</th>
										<th>STATUS</th>
										<th>ATTACHMENT</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($bank_details as $key => $row): ?>
										<tr>
											<td><?php echo ($row->name)?strtoupper($row->name):'N/A';?></td>
											<td><?php echo ($row->branch)?strtoupper($row->branch):'N/A';?></td>
											<td><?php echo ($row->acc_no)?$row->acc_no:'N/A'; ?></td>
											<td><?php echo ($row->status)?strtoupper($row->status):'N/A';?></td>
											<td>
											<?php
												$list = explode('/',$row->location);
												$length = sizeof($list);
												if($length > 0)
												{	
													echo strtoupper($list[$length-1]);
												}else
												{
													echo 'N/A';
												}
											?>
											</td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- bank details -->

				<!-- statutory details -->
				<?php if ($statutory_details): ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>STATUTORY DETAILS</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col-lg-6">
							<div class="row">
								<div class="col">
									<b>EMPLOYEE EPF NUMBER </b>
								</div>
								<div class="col">
									<?php echo ($statutory_details->ee_epf_no)?': '.strtoupper($statutory_details->ee_epf_no):'N/A'; ?>
								</div>
							</div>
						</div>
					</div>
					<br>

					<div class="row">
						<div class="col">
							<div class="row">
								<div class="col">
									<b>EMPLOYER RATE</b>
								</div>
								<div class="col">
									<?php 
										if ($statutory_details->er_rate == 0) {
											echo ': STATUTORY RATE ('.$statutory_details->er_percent.' %)';
										}elseif ($statutory_details->er_rate == 1) {
											echo ': COMPANY RATE ('.$statutory_details->er_percent.' %)';
										}elseif ($statutory_details->er_rate == 2) {
											echo ': PERSONAL RATE ('.$statutory_details->er_percent.' %)';
										}
									?>
								</div>
							</div>
						</div>
						<div class="col">
							<div class="row">
								<div class="col">
									<b>EMPLOYEE RATE</b>
								</div>
								<div class="col">
									<?php 
										if ($statutory_details->ee_rate == 0) {
											echo ': STATUTORY RATE ('.$statutory_details->ee_percent.' %)';
										}elseif ($statutory_details->ee_rate == 1) {
											echo ': COMPANY RATE ('.$statutory_details->ee_percent.' %)';
										}elseif ($statutory_details->ee_rate == 2) {
											echo ': PERSONAL RATE ('.$statutory_details->ee_percent.' %)';
										}
									?>
								</div>
							</div>
						</div>
					</div>
					<br>

					<div class="row">
						<div class="col-lg-6">
							<div class="row">
								<div class="col">
									<b>EMPLOYEE SOCSO NO</b>
								</div>
								<div class="col">
									<?php echo ($statutory_details->ee_socso)?': '.strtoupper($statutory_details->ee_socso):'N/A'; ?>
								</div>
							</div>
						</div>
						<div class="col-lg-6">
							<div class="row">
								<div class="col">
									<b>INCOME TAX NO</b>
								</div>
								<div class="col">
									<?php echo($statutory_details->ee_income_tax)?': '.strtoupper($statutory_details->ee_income_tax):'N/A'; ?>
								</div>
							</div>
						</div>
					</div>
					<br>

					<div class="row">
						<div class="col-lg-6">
							<div class="row">
								<div class="col">
									<b>PCB DEDUCTION</b>
								</div>
								<div class="col">
									<?php echo($statutory_details->ee_pcb_deduction_percent)?': '.$statutory_details->ee_pcb_deduction_percent.'%':'N/A'; ?>
								</div>
							</div>
						</div>
						<div class="col">
							<div class="row">
								<div class="col">
									<b>ZAKAT DEDUCTION</b>
								</div>
								<div class="col">
									<?php echo($statutory_details->ee_zakat_deduction_percent)?': '.$statutory_details->ee_zakat_deduction_percent.'%':'N/A'; ?>
								</div>
							</div>
						</div>
					</div>
					<br>

					<div class="row">
						<div class="col">
							<div class="row">
								<div class="col">
									<b>STATUS</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($statutory_details->status))?'ACTIVE':'INACTIVE'; ?></p>
								</div>
							</div>
						</div>
						<div class="col">
							<div class="row">
								<div class="col">
									<b>YEAR</b>
								</div>
								<div class="col">
									<p>: <?php echo (!empty($statutory_details->year))?$statutory_details->year:'N/A'; ?></p>
								</div>
							</div>
						</div>
					</div>
				</div>
				<?php endif ?>
				<!-- statutory details -->

				<!-- recurring payments -->
				<?php if ($recurring_payments): ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>RECURRING PAYMENT </b></h4>
						</div>
					</div>

					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>DATE FROM</th>
										<th>DATE TO</th>
										<th>TYPE</th>
										<th>AMOUNT</th>
										<th>STATUS</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($recurring_payments as $key => $payment): ?>
										<tr>
											<td><?php echo(!empty(mysql_to_date_format($payment->date_start)))?strtoupper(mysql_to_date_format($payment->date_start)):'N/A'; ?></td>
											<td><?php echo(!empty(mysql_to_date_format($payment->date_end)))?strtoupper(mysql_to_date_format($payment->date_end)):'N/A'; ?></td>
											<td><?php echo($payment->type)?strtoupper($payment->type):'N/A'; ?></td>
											<td><?php echo($payment->amount)?'RM'.number_format($payment->amount,2):'N/A'; ?></td>
											<td><?php echo($payment->status == 0)?strtoupper('ONGOING'):strtoupper('end'); ?></td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php endif ?>
				<!-- recurring payments -->

				<!-- recurring deductions -->
				<?php if ($recurring_deductions): ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>RECURRING DEDUCTION </b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>DATE FROM</th>
										<th>DATE TO</th>
										<th>TYPE</th>
										<th>AMOUNT</th>
										<th>STATUS</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($recurring_deductions as $key => $deduction): ?>
										<tr>
											<!-- <td><?php echo($deduction->date_start)?strtoupper(date('d-F-Y',strtotime($deduction->date_start))):'N/A'; ?></td> -->
											<td><?php echo(!empty(mysql_to_date_format($deduction->date_start)))?strtoupper(mysql_to_date_format($deduction->date_start)):'N/A'; ?></td>

											<!-- <td><?php echo($deduction->date_end)?strtoupper(date('d-F-Y',strtotime($deduction->date_end))):'N/A'; ?></td> -->
											<td><?php echo(!empty(mysql_to_date_format($deduction->date_end)))?strtoupper(mysql_to_date_format($deduction->date_end)):'N/A'; ?></td>

											<td><?php echo($deduction->type)?strtoupper($deduction->type):'N/A'; ?></td>
											<td><?php echo($deduction->amount)?'RM'.number_format($deduction->amount,2):'N/A'; ?></td>
											<td><?php echo($deduction->status == 0)?strtoupper('ONGOING'):strtoupper('end'); ?></td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php endif ?>
				<!-- recurring deductions -->

				<!-- third party payment -->
				<?php if ($third_party_payments): ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>THIRD PARTY PAYMENT</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col table-responsive">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>DATE FROM</th>
										<th>DATE TO</th>
										<th>INSTITUTION / ORGANISATION</th>
										<th>AMOUNT</th>
										<th>STATUS</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($third_party_payments as $key => $third_party): ?>
										<tr>
											<!-- <td><?php echo ($third_party->date_start)?strtoupper(date('d-F-Y',strtotime($third_party->date_start))):'N/A'; ?></td> -->
											<td><?php echo (!empty(mysql_to_date_format($third_party->date_start)))?strtoupper(mysql_to_date_format($third_party->date_start)):'N/A'; ?></td>

											<!-- <td><?php echo ($third_party->date_end)?strtoupper(date('d-F-Y',strtotime($third_party->date_end))):'N/A'; ?></td> -->
											<td><?php echo (!empty(mysql_to_date_format($third_party->date_end)))?strtoupper(mysql_to_date_format($third_party->date_end)):'N/A'; ?></td>

											<td><?php echo ($third_party->type)?strtoupper($third_party->type):'N/A'; ?></td>
											<td><?php echo ($third_party->amount)?strtoupper('RM '.number_format($third_party->amount,2)):'N/A'; ?></td>
											<td><?php echo ($third_party->status == 0)?strtoupper('ongoing'):strtoupper('end'); ?></td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php endif ?>
				<!-- third party paymnet -->

				<!-- pcb consideration -->
				<?php if($pcb_consideration){ ?>
				<div class="container">
					<div class="row">
						<div class="col">
							<h4><b>PCB CONSIDERATION</b></h4>
						</div>
					</div>
					<div class="row">
						<div class="col">
							<table class="table table-bordered">
								<thead>
									<tr>
										<th>NAME</th>
										<th>NRIC</th>
										<th>AGE</th>
										<th>STATUS</th>
										<th>RESPONSIBILITY</th>
									</tr>
								</thead>
								<tbody>
									<?php foreach ($pcb_consideration as $key => $pcb): ?>
										<tr>
											<td><?php echo (!empty($pcb->name))?strtoupper($pcb->name):'N/A'; ?></td>
											<td><?php echo (!empty($pcb->ic_no))?$pcb->ic_no:'N/A'; ?></td>
											<td>
												<?php 
													$age = 0;
													if (!empty(mysql_to_date_format($pcb->birthdate))) {
														$birth = date('Y',strtotime($pcb->birthdate));
														$current = date('Y');
														$age = $current - $birth;
													}
													echo $age;
												?>
											</td>
											<td>
												<b>OKU STATUS</b>: <?php echo ($pcb->oku_status == 1)?'NO':'YES'; ?> <br>
												<b>STUDENT STATUS</b>: <?php echo ($pcb->study_status == 1)?'NO':'YES'; ?> <br>
											</td>
											<td>
												<?php echo ($pcb->responsible_id == 1)?'SPOUSE':'EMPLOYEE'; ?>
											</td>
										</tr>
									<?php endforeach ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<?php } ?>
				<!-- pcb consideration -->
			</div>
		</div>
	</div>
</div>

