File: /home/cafsindia/groups_cafsindia_com/application/models/Increment_calculation_model.php
<?php class Increment_calculation_model extends CI_Model{
public function increment_calculation($trans_array,$employee_code){
foreach($trans_array as $trans){
$trans['fixed_basic'] = round($trans['fixed_gross']*(40/100));
$trans['fixed_hra'] = round(($trans['fixed_gross']*(30/100)));
$trans['fixed_da'] = round($trans['fixed_basic']*(50/100));
$trans['fo_allowance'] = round(($trans['fixed_da']*(50/100)));
$x = round($trans['yearly_ctc']/12);
$trans['fixed_gross'] = $x;
$a = $trans['pf']+$trans['esi']+$trans['professional_tax']+$trans['other_deduction']+$trans['emp_esi']+$trans['employer_pf'];
$trans['total_deductions'] = $a;
$b= $trans['fixed_gross'] - ($trans['pf']+$trans['other_deduction']+$trans['professional_tax']+$trans['esi']+$trans['emp_esi']+$trans['employer_pf']);
$trans['net_pay'] = $b;
$trans_array[$employee_code] = $trans;
} return $trans_array;
}
}?>