<section class="container">
	<div class="row">
		<div class="table">
			<div class="container" style="border: 1px solid black">
					 

				<div class="row mt-5 ml-3 mr-3 pl-0" style="border:1px solid #dedede;">	
					<div class="col-4 pt-4">
						<img  src="<?php echo base_url().'assets/images/logo/salihin-logo.png'; ?>" alt="company logo"  class="img img-full"/>
					</div>
					<div class="col text-right pt-4 pb-4" style="border-left: 1px solid #dedede;">	
						<b><?php echo $this->input->get('company_name')?></b>
						<br><?php echo $this->input->get('company_address')?>
                        <br><?php echo $this->input->get('postcode')?>
                        <?php echo $this->input->get('city')?>
                       <br><?php echo $this->input->get('state')?>
                        <br><?php echo $this->input->get('country')?>
					</div>
				</div>

				<div class="row ml-3 mr-3">	
					<div class="col-4 pt-4 pb-4" style="border-left: 1px solid #dedede;border-bottom: 1px solid #dedede;">	
								<b>Salary/Wages Month:</b>
                                <?php 
                                $wages = explode('/', $this->input->get('salary_wage'));
                                echo date('M',mktime(0,0,0,intval($wages[0]),10)).' '.$wages[1];
                                ?> 
					</div>
					<div class="col-4 pt-4 pb-4" style="border-left: 1px solid #dedede;border-right: 1px solid #dedede;border-bottom: 1px solid #dedede;">	
								<b>IC No:</b> <?php echo $this->input->get('B');?>
					</div>
					<div class="col-4 pt-4 pb-4" style="border-right:1px solid #dedede;border-bottom: 1px solid #dedede;">	
								<b>Department:</b> <?php echo $this->input->get('E');?>							
					</div>
				</div>

				<div class="row ml-3 mr-3">	
					<div class="col-4 pt-4 pb-4" style="border-left: 1px solid #dedede;border-bottom: 1px solid #dedede;">	
								<b>Name:</b> <?php echo $this->input->get('C');?>	
					</div>
					<div class="col-4 pt-4 pb-4" style="border-left: 1px solid #dedede;border-right: 1px solid #dedede;border-bottom: 1px solid #dedede;">	
								<b>Employee ID:</b> <?php echo $this->input->get('A');?>
					</div>
					<div class="col-4 pt-4 pb-4" style="border-right:1px solid #dedede;border-bottom: 1px solid #dedede;">	
								<b>Designation:</b> <?php echo $this->input->get('D');?>	
					</div>
				</div>

			<div class="row" >
				<div class="col-12">
					<table width="100%">				
						<tbody>
							<tr class="row">
									<td class="col col-4 ml-4 border-0">
										
  											<div class="panel panel-default" style="height: 100%">
    											<div class="panel-heading">Salary summary</div>
    											<div class="panel-body pt-0">
    												<table border="0" width="100%">
    													
    													
    													<tr class="p-0 m-0">
    														<td class="border-0 p-0 m-0">Basic Pay</td>
    														<td class="border-0 p-0 m-0 pull-right"><?php echo number_format($this->input->get('F'),2);?></td>
    														<td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>

    													</tr>
    													<?php
    													$total_allowance =  floatval($this->input->get('G')) + 
    																		floatval($this->input->get('H')) + 
    																		floatval($this->input->get('I')) + 
    																		floatval($this->input->get('J')) + 
    																		floatval($this->input->get('K')) +
    																		floatval($this->input->get('L')) +
    																		floatval($this->input->get('M')) +
    																		floatval($this->input->get('N')) +
                                                                            floatval($this->input->get('O')) +
                                                                            floatval($this->input->get('P')) +
                                                                            floatval($this->input->get('Q')) +
                                                                            floatval($this->input->get('R'));
    													?>
                                                        <tr class="p-0 m-0">
                                                            <td class="border-0 p-0 m-0">Allowance</td>
                                                            <td class="border-0 p-0 m-0 pull-right"><?php echo number_format($total_allowance,2)?></td>
                                                            <td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>

                                                        </tr>

    													<tr class="p-0 m-0">
    														<td class="col-9 border-0 pl-0 m-0">Gross Pay</td>
    														<td class="border-1 border-bottom m-0 pr-0 text-right"><?php echo number_format($this->input->get('S'),2);?></td>
    														<td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>
    													</tr>
                                                        <tr>
                                                            <td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>
                                                            <td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>
                                                            <td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>
                                                        </tr>
    													
                                                        <tr class="p-0 m-0">
                                                            <td class="border-0 p-0 m-0">Deduction</td>
                                                            <td class="border-0 p-0 m-0 pull-right"><?php echo number_format(floatval($this->input->get('AG')),2)?></td>
                                                            <td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>
                                                        </tr>
    													<tr class="p-0 m-0">
    														<td class="col-9 border-0 pl-0 m-0">Nett Pay</td>
    														<td class="border-1 border-bottom m-0 pr-0 pull-right"><?php echo number_format($this->input->get('AH'),2);?></td>
    														<td class="border-0 p-0 m-0">&nbsp;&nbsp;</td>
    													</tr>
    												</table>
    											</div>
  											</div>
										
									</td>
									<td class="col border-0">
										
  											<div class="panel panel-default" style="height: 100%">
    											<div class="panel-heading">ALLOWANCE</div>
    											<div class="panel-body pt-0">
    												<table border="0" width="100%">

    													

    													<?php if (intval($this->input->get('G')) != 0): ?>
    														<tr class="m-0 p-0">
	    														<td class="border-0 p-0 m-0">
	    															Fixed Allowance
	    														</td>
	    														<td class="border-0 p-0 m-0" align="right">
	    															<?php echo number_format(floatval($this->input->get('G')),2); ?>
	    														</td>
	    													</tr>
    													<?php endif ?>

                                                        <?php if (intval($this->input->get('H')) != 0): ?>
                                                            <tr class="m-0 p-0">
                                                                <td class="border-0 p-0 m-0">
                                                                    HOD Allowance
                                                                </td>
                                                                <td class="border-0 p-0 m-0" align="right">
                                                                    <?php echo number_format(floatval($this->input->get('H')),2); ?>
                                                                </td>
                                                            </tr>
                                                        <?php endif ?>

                                                        <?php if (intval($this->input->get('I')) != 0): ?>
                                                            <tr class="m-0 p-0">
                                                                <td class="border-0 p-0 m-0">
                                                                    Branch Allowance
                                                                </td>
                                                                <td class="border-0 p-0 m-0" align="right">
                                                                    <?php echo number_format(floatval($this->input->get('I')),2); ?>
                                                                </td>
                                                            </tr>
                                                        <?php endif ?>

    													<?php if (intval($this->input->get('J')) != 0): ?>
    														<tr class="m-0 p-0">
	    														<td class="border-0 p-0 m-0">
	    															Phone Allowance
	    														</td>
	    														<td class="border-0 p-0 m-0" align="right">
	    															<?php echo number_format(floatval($this->input->get('J')),2); ?>
	    														</td>
	    													</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('K')) != 0): ?>
    														<tr class="m-0 p-0">
	    														<td class="border-0 p-0 m-0">
	    															Parking Allowance
	    														</td>
	    														<td class="border-0 p-0 m-0" align="right">
	    															<?php echo number_format(floatval($this->input->get('K')),2); ?>
	    														</td>
	    													</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('L')) != 0): ?>
    														<tr class="m-0 p-0">
	    														<td class="border-0 p-0 m-0">
	    															Professional Allowance
	    														</td>
	    														<td class="border-0 p-0 m-0" align="right">
	    															<?php echo number_format(floatval($this->input->get('L')),2); ?>
	    														</td>
	    													</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('M')) != 0): ?>
    														<tr class="m-0 p-0">
	    														<td class="border-0 p-0 m-0">
	    															License Allowance
	    														</td>
	    														<td class="border-0 p-0 m-0" align="right">
	    															<?php echo number_format(floatval($this->input->get('M')),2); ?>
	    														</td>
	    													</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('N')) != 0): ?>
    														<tr class="m-0 p-0">
	    														<td class="border-0 p-0 m-0">
	    															Acting Allowance
	    														</td>
	    														<td class="border-0 p-0 m-0" align="right">
	    															<?php echo number_format(floatval($this->input->get('N')),2); ?>
	    														</td>
	    													</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('O')) != 0): ?>
    														<tr class="m-0 p-0">
	    														<td class="border-0 p-0 m-0">
	    															Travelling Allowance
	    														</td>
	    														<td class="border-0 p-0 m-0" align="right">
	    															<?php echo number_format(floatval($this->input->get('O')),2); ?>
	    														</td>
	    													</tr>
    													<?php endif ?>


                                                        <?php if (intval($this->input->get('P')) != 0): ?>
                                                            <tr class="m-0 p-0">
                                                                <td class="border-0 p-0 m-0">
                                                                    Vehicle Allowance
                                                                </td>
                                                                <td class="border-0 p-0 m-0" align="right">
                                                                    <?php echo number_format(floatval($this->input->get('P')),2); ?>
                                                                </td>
                                                            </tr>
                                                        <?php endif ?>

                                                        <?php if (intval($this->input->get('Q')) != 0): ?>
                                                            <tr class="m-0 p-0">
                                                                <td class="border-0 p-0 m-0">
                                                                    Special Allowance
                                                                </td>
                                                                <td class="border-0 p-0 m-0" align="right">
                                                                    <?php echo number_format(floatval($this->input->get('Q')),2); ?>
                                                                </td>
                                                            </tr>
                                                        <?php endif ?>

                                                        <?php if (intval($this->input->get('R')) != 0): ?>
                                                            <tr class="m-0 p-0">
                                                                <td class="border-0 p-0 m-0">
                                                                    Fuel Allowance
                                                                </td>
                                                                <td class="border-0 p-0 m-0" align="right">
                                                                    <?php echo number_format(floatval($this->input->get('R')),2); ?>
                                                                </td>
                                                            </tr>
                                                        <?php endif ?>
                                                        

    													<tr class="m-0 p-0">
    														<td class="col-9 border-0 pl-0 m-0">
    															Total Allowance
    														</td>
    														<td class="border-1 border-bottom m-0 pr-0" align="right">
    															<?php echo number_format($total_allowance,2)?> 
    														</td>
    													</tr>
    												</table>
    											</div>
  											</div>
										
									</td>
									<td class="col mr-4 border-0">
										
  											<div class="panel panel-default" style="height: 100%">
    											<div class="panel-heading">DEDUCTION</div>
    											<div class="panel-body pt-0">
    												<table border="0" width="100%">

    													<?php if ((intval($this->input->get('T')) != 0) || (intval($this->input->get('AI')) != 0)):?>
    														<tr>
    															<td class="border-0 p-0">
    																EPF 'Yee
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('T')),2)?></td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AI')),2)?></td>
    															<td class="border-0 p-0 m-0 pr-0 text-right">
    																'Yer
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('U')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																SOCSO 'Yee
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('U')),2)?></td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AJ')),2)?></td>
    															<td class="border-0 p-0 m-0 pr-0 text-right">
    																'Yer
    															</td>
    														</tr>
    													<?php endif ?>
    													
    													<?php if (intval($this->input->get('V')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																SIP 'Yee
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('V')),2)?></td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AK')),2)?></td>
    															<td class="border-0 p-0 m-0 pr-0 text-right">
    																'Yer
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('W')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																Zakat
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('W')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('X')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																PCB
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('X')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('Y')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																Loan / Advance
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('Y')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('Z')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																Wakaf
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('Z')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('AA')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																YaPEIM
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AA')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('AB')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																Club Fee
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AB')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('AC')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																PTPTN
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AC')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('AD')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																Tabung Haji
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AD')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>
														
														<?php if (intval($this->input->get('AE')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																CP38
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AE')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('AF')) != 0):?>
    														<tr>
    															<td class="border-0 p-0">
    																Other Deduction
    															</td>
    															<td class="border-0 p-0 pr-0 text-right"><?php echo number_format(floatval($this->input->get('AF')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    													<?php if (intval($this->input->get('AG')) != 0):?>
    														<tr>
    															<td class="border-0 pl-0">
    																Total Deduction
    															</td>
    															<td class="border-1 border-bottom pr-0 text-right"><?php echo number_format(floatval($this->input->get('AG')),2)?></td>
    															<td class="border-0 p-0"></td>
    															<td class="border-0 p-0 m-0">
    																
    															</td>
    														</tr>
    													<?php endif ?>

    												</table>
    											</div>
  											</div>									
									</td>									
							</tr>
		
							<tr class="row">
								<td class="col ml-4 mr-4 pb-5 border-0">
                                    <div class="panel panel-default mb-2" style="height: 65%">
                                        <div class="panel-body">
                                            <div class="pt-0">                      
                                            <b><?php echo strtoupper(num_to_word($this->input->get('AH'),$this->lang->line('dictionary'),'Ringgit Malaysia'));?><b>
                                            </div>
                                        </div>
                                    </div>
									<div class="text-center">
										<small> This is a computer generate pay advice printout. No signature is required.</small>
									</div>
								</td>
							</tr>		
					</div>
					</tbody>

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

</section> 