?
Current Path : /home1/savoy/public_html/savoyglobal.net/sibs_draft/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/sibs_draft/system/application/views/HR/viewcompay.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php /* $target =0; foreach($comset as $comdata) { $target+=$comdata['target']; }*/ $premium = 0; foreach($premiumgen as $prem) { $premium+=$prem['premium']; } $amount = 0; foreach($premiumpay as $prempa) { $amount+=$prempa['amount']; } $stf=$this->mastermodel->get_data_srow('staffpersonaldetails',$staffid,'id'); ?> <?php $stfper=$this->mastermodel->get_data_srow('staffpersonaldetails',$staffid,'id'); $stfemp=$this->mastermodel->get_data_srow('staffemployeedetails',$staffid,'staffid'); $desg = $this->mastermodel->get_data_srow('designation',$stfemp->designationid,'id'); $dept= $this->mastermodel->get_data_srow('department',$stfemp->deptid,'id'); ?> <li id="stfinfodet"> <fieldset><ul><li><label>Employee No</label><label><?=$stfper->employeeid;?></label></li> <li><label>Designation</label><label><?=$desg->designation;?></label></li> <li><label>Department</label><label><?=$dept->departmentname;?></label></li> </ul> </fieldset> </li> <li><label class="salary">Premium Generated </label><?php echo $premium; ?> <input name="premiumgenerated" value="<?php echo $premium; ?>" type="hidden"> </li> <li><label class="salary">Premium Payment Received </label><?php echo $amount; ?> <input name="premiumpayrec" value="<?php echo $amount; ?>" type="hidden"> </li> <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>Commission on </th> <th>Commision Amount</th> </tr> <?php $i=1; $totalpremium = 0; $flag = 0; $premiumgenpaid=$this->hrmodel->get_com_premgen_paid($staffid,$date); foreach($premiumgenpaid as $prem) { $covername=$this->mastermodel->get_data_srow('covers',$prem['cover_id'],'id'); $premiumpaid=$this->hrmodel->get_com_prempay_placinglsip($staffid,$date,$prem['placing_slip_id']); $amountpla = 0; foreach($premiumpaid as $prempai) { $amountpla+=$prempai['amount']; } ?> <tr> <td width="200px"><?=$covername->cover;?><input type="hidden" value ="<?= $prem['cover_id'];?>" name="cover_id_<?=$i;?>"> </td><td><?= $prem['percentage'];?> <input type="hidden" value ="<?= $prem['percentage'];?>" name="comperc_<?=$i;?>"></td></td> <td><input type="text" name="comon_<?=$i;?>" value="<?= $prem['amount'];?>"> </td> <td><input type="text" name="comamt_<?=$i;?>" value="<?php if ($prem['amount'] > 0){ echo $finprem = round($prem['amount']*$prem['percentage']/100); } else $finprem = 0;?>"> </td> </tr> <?php $i++; if($prem['amount']>0) $flag=1; $totalpremium += $finprem; } ?> <tr><td colspan="3">Total Commision</td><td><?= $totalpremium;?></td></tr> </table> <input type="hidden" name="totalpremium" value="<?=$totalpremium;?>"> </li> <li>