?
Current Path : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/HR/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/drafthr/system/application/views/HR/editsalarypayment.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ foreach($viewinfo as $updata) { $staffid =$updata['staffid']; $date = $updata['date']; $basicsalary = $updata['basicsalary']; $staffsalaryid=$updata['id']; $premiumtarget = $updata['premiumtarget']; $premiumgenerated = $updata['premiumgenerated']; $premiumpayrec = $updata['premiumpayrec']; $comenton = $updata['comenton']; } $stf=$this->mastermodel->get_data_srow('staffpersonaldetails',$staffid,'id'); $allowded=$this->mastermodel->get_data('salarypaymentallowdeduc',$staffsalaryid,'salarypaymentid'); $premiumgen=$this->mastermodel->get_data('salarypaymentcomdetails',$staffsalaryid,'salarypaymentid'); $date=$this->mastermodel->convdatformat($date); ?> <div class="select-bar"> <label> <img src="<?=base_url()?>/assets/images/backbutton.png" title="Back" class="clickimage" onclick="loadsalarypayment()" alt="Back" align = "center" width="25" height="25" /></label> </div> <fieldset> <legend>Staff-Salary Settings</legend> <?php $attributes = array('id' => 'customForm'); echo form_open('hr/editsalarypayment',$attributes); echo form_hidden('staffsalaryid',$staffsalaryid); ?> <ul> <li> </li> <li> <label for="date">Employee Name</label> <?=$stf->name;?> </li> <li> <label>Date</label> <input class="one" name="date" id="date" readonly="true" value="<?=$date;?>" title="For the Month Of" type="text" style="background-image: url(../../../../assets/images/datefocus.gif);"> <span id="dateInfo" class="red_bold">*</span> </li> <?php $gross=0; ?> <li> <label>Basic Salary</label> <?=$basicsalary;?> <?php $gross += $basicsalary; ?> </li> <li> <table align="left" width="700px"><tr><td valign="top"> <table class="sort" cellpadding="0" cellspacing="0" align="left" ><caption>Allowance Details</caption> <thead><tr> <th>Allowance Type</th> <th>Amount</th> </tr> <?php $i=1; $totalallow=0; foreach($allowded as $alde) { if($alde['allowdeductype'] == "1") { $data = array( 'name' => 'newpolicy_'.$i, 'id' => 'newpolicy_'.$i, 'style' => 'width:80%', 'value' => $alde['amount'], ); $allowdeducname=$this->mastermodel->get_data_srow('allowdeduc',$alde['allowdeducid'],'id'); ?> <tr> <td width="200px"><?=$allowdeducname->allowdeducname;?> </td><td width="100px"> <?php echo $alde['amount']; $gross+= $alde['amount']; $totalallow+=$alde['amount']; ?> </td> </tr> <?php $i++; }} ?> <tr><td><font color="a4bde8">Total Allowance</font></td><td><strong><?=$totalallow;?></strong></td></tr> </tbody></table> </td><td width="20px" valign="top"></td><td valign="top"> <table class="sort" cellpadding="0" cellspacing="0" align="right" ><caption>Deduction Details</caption> <thead><tr> <th>Deduction Type</th> <th>Amount</th> </tr> <?php $i=1; $totaldeduc=0; foreach($allowded as $alde) { if($alde['allowdeductype'] == "0") { $allowdeducname=$this->mastermodel->get_data_srow('allowdeduc',$alde['allowdeducid'],'id'); ?> <tr> <td width="200px"><?=$allowdeducname->allowdeducname;?> </td><td width="100px"> <?php echo $alde['amount']; $totaldeduc+=$alde['amount']; $gross-= $alde['amount']; ?> </td> </tr> <?php $i++; }} ?> <tr><td><font color="a4bde8">Total Deduction</font></td><td><font color="a4bde8"><strong><?=$totaldeduc;?></strong></font></td></tr> </tbody></table></td></tr></table> </li> <li><label class="salary">Premium Target </label><label class="salary"><?php echo $premiumtarget; ?></label> </li> <li><label class="salary">Premium Generated </label><label class="salary"><?php echo $premiumgenerated; ?></label> </li> <li><label class="salary">Premium Payment Received </label><label class="salary"><?php echo $premiumpayrec; ?></label> </li> <li>Commission Entitlement on <?php echo $comenton;?> <li> <table class="sort" cellpadding="0" cellspacing="0" align="right" ><caption>Commission Earnings</caption> <thead><tr> <th>Type of Cover</th> <th>Commision(%)</th> <th>Amount Received</th> <th>Commission on (Amount Received - Target)</th> <th>Commision Amount</th> </tr><?php $i=1; $totalpremium = 0; $flag = 0; foreach($premiumgen as $prem) { $covername=$this->mastermodel->get_data_srow('covers',$prem['cover_id'],'id'); ?> <tr> <td width="200px"><?=$covername->cover;?></td> <td><?= $prem['comperc'];?></td> <td><?= $prem['amtrec'];?></td> <td><?= $prem['comon'];?></td> <td><?= $prem['comamt'];?></td> </tr> <?php $i++; $totalpremium += $prem['comamt']; } ?> <tr><td colspan="4">Total Commisions</td><td><?= $totalpremium;?></td></tr> </table></li> <li> <label>Gross Salary</label> <?=$gross+$totalpremium;?> </li> </ul> <?php echo form_close();?> </fieldset>