CHANGE in pay roll : GWM
This commit is contained in:
parent
a6620b84e8
commit
3c1fd63aa9
@ -138,6 +138,7 @@ class Monthlypay extends BaseController
|
|||||||
}
|
}
|
||||||
$begin->modify('+1 day');
|
$begin->modify('+1 day');
|
||||||
}
|
}
|
||||||
|
// dd( $sundayarray);
|
||||||
$noofsundays = count($sundayarray);
|
$noofsundays = count($sundayarray);
|
||||||
|
|
||||||
$publicholidaysarray = $this->monthlypay_model->getPublicHoldays($current);
|
$publicholidaysarray = $this->monthlypay_model->getPublicHoldays($current);
|
||||||
@ -150,6 +151,7 @@ class Monthlypay extends BaseController
|
|||||||
$data['datefordropdown'] = $current;
|
$data['datefordropdown'] = $current;
|
||||||
$data['attendance'] = $this->monthlypay_model->monthlyAttendance($current);
|
$data['attendance'] = $this->monthlypay_model->monthlyAttendance($current);
|
||||||
$data['emppay'] = $this->monthlypay_model->getEmpPayDetails($current, $string);
|
$data['emppay'] = $this->monthlypay_model->getEmpPayDetails($current, $string);
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Monthly Attendance';
|
$this->global['pageTitle'] = 'Monthly Attendance';
|
||||||
$this->loadViews("attendance", $this->global, $data, NULL);
|
$this->loadViews("attendance", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
@ -264,6 +266,7 @@ class Monthlypay extends BaseController
|
|||||||
$paidleave = $data['Paid Leave'];
|
$paidleave = $data['Paid Leave'];
|
||||||
$daysworked = $data['Days Worked'];
|
$daysworked = $data['Days Worked'];
|
||||||
$absent = $data['Absent'];
|
$absent = $data['Absent'];
|
||||||
|
$sundayCount = $data['Total Sunday'];
|
||||||
|
|
||||||
$monthattendance = array(
|
$monthattendance = array(
|
||||||
'Month_Year' => $Month_Year, 'NoofDays' => $NoofDays, 'EmpID' => $EmpID, 'WH1' => $W1H, 'OT1' => $W1OT, 'WH2' => $W2H, 'OT2' => $W2OT, 'WH3' => $W3H, 'OT3' => $W3OT,
|
'Month_Year' => $Month_Year, 'NoofDays' => $NoofDays, 'EmpID' => $EmpID, 'WH1' => $W1H, 'OT1' => $W1OT, 'WH2' => $W2H, 'OT2' => $W2OT, 'WH3' => $W3H, 'OT3' => $W3OT,
|
||||||
@ -272,7 +275,7 @@ class Monthlypay extends BaseController
|
|||||||
'WH17' => $W17H, 'OT17' => $W17OT, 'WH18' => $W18H, 'OT18' => $W18OT, 'WH19' => $W19H, 'OT19' => $W19OT, 'WH20' => $W20H, 'OT20' => $W20OT, 'WH21' => $W21H, 'OT21' => $W21OT, 'WH22' => $W22H, 'OT22' => $W22OT,
|
'WH17' => $W17H, 'OT17' => $W17OT, 'WH18' => $W18H, 'OT18' => $W18OT, 'WH19' => $W19H, 'OT19' => $W19OT, 'WH20' => $W20H, 'OT20' => $W20OT, 'WH21' => $W21H, 'OT21' => $W21OT, 'WH22' => $W22H, 'OT22' => $W22OT,
|
||||||
'WH23' => $W23H, 'OT23' => $W23OT, 'WH24' => $W24H, 'OT24' => $W24OT, 'WH25' => $W25H, 'OT25' => $W25OT, 'WH26' => $W26H, 'OT26' => $W26OT, 'WH27' => $W27H, 'OT27' => $W27OT, 'WH28' => $W28H, 'OT28' => $W28OT,
|
'WH23' => $W23H, 'OT23' => $W23OT, 'WH24' => $W24H, 'OT24' => $W24OT, 'WH25' => $W25H, 'OT25' => $W25OT, 'WH26' => $W26H, 'OT26' => $W26OT, 'WH27' => $W27H, 'OT27' => $W27OT, 'WH28' => $W28H, 'OT28' => $W28OT,
|
||||||
'WH29' => $W29H, 'OT29' => $W29OT, 'WH30' => $W30H, 'OT30' => $W30OT, 'WH31' => $W31H, 'OT31' => $W31OT, 'Total_WHrs' => $totalworkinghrs, 'Total_OTHrs' => $totalothrs, 'Paid_Leave' => $paidleave,
|
'WH29' => $W29H, 'OT29' => $W29OT, 'WH30' => $W30H, 'OT30' => $W30OT, 'WH31' => $W31H, 'OT31' => $W31OT, 'Total_WHrs' => $totalworkinghrs, 'Total_OTHrs' => $totalothrs, 'Paid_Leave' => $paidleave,
|
||||||
'Days_Worked' => $daysworked, 'Absent' => $absent, 'Created_by' => $CreateBy
|
'Days_Worked' => $daysworked, 'Absent' => $absent, 'sunday_count' => $sundayCount , 'Created_by' => $CreateBy
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -504,15 +504,16 @@ class Payslip extends BaseController
|
|||||||
public function monthlyInputs()
|
public function monthlyInputs()
|
||||||
{
|
{
|
||||||
$current = date("m-Y");
|
$current = date("m-Y");
|
||||||
// echo $current;
|
|
||||||
|
|
||||||
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
||||||
// $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($current);
|
|
||||||
$data['dropdownvalue'] = $current;
|
$data['dropdownvalue'] = $current;
|
||||||
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
||||||
// dd($data['fresh']);
|
|
||||||
$employeeSalary = [];
|
$employeeSalary = [];
|
||||||
|
$esi = [];
|
||||||
|
$pf = [];
|
||||||
|
$ot = [];
|
||||||
foreach ($data['fresh'] as $value) {
|
foreach ($data['fresh'] as $value) {
|
||||||
|
|
||||||
|
|
||||||
@ -526,28 +527,21 @@ class Payslip extends BaseController
|
|||||||
$Paid_leave = $value->Paid_leave; // leave day
|
$Paid_leave = $value->Paid_leave; // leave day
|
||||||
$OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
$OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
||||||
$Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE
|
$Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE
|
||||||
|
$Sunday = $value->sunday_count; // Sunday count
|
||||||
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
||||||
|
|
||||||
$MasterIncentives = $value->MasterIncentives; //Master values get
|
$MasterIncentives = $value->MasterIncentives; //Master values get
|
||||||
// echo 'master'.$MasterIncentives;
|
|
||||||
|
|
||||||
|
|
||||||
$due_start_date = $value->DueDate;
|
$due_start_date = $value->DueDate;
|
||||||
$paydate = $current; //From POST parm
|
$paydate = $current; //From POST parm
|
||||||
|
|
||||||
$pmonth = substr($paydate, 0, 2);
|
$pmonth = substr($paydate, 0, 2);
|
||||||
$pyear = substr($paydate, -4);
|
$pyear = substr($paydate, -4);
|
||||||
|
|
||||||
$pday = cal_days_in_month(CAL_GREGORIAN, $pmonth, $pyear);
|
$pday = cal_days_in_month(CAL_GREGORIAN, $pmonth, $pyear);
|
||||||
$paymonth = $pyear . '-' . $pmonth . '-' . $pday;
|
$paymonth = $pyear . '-' . $pmonth . '-' . $pday;
|
||||||
|
|
||||||
$Loan_amount = $value->Loan_Amount;
|
$Loan_amount = $value->Loan_Amount;
|
||||||
$Paid_Amount = $value->Paid_Amount;
|
$Paid_Amount = $value->Paid_Amount;
|
||||||
|
|
||||||
|
|
||||||
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$loan = 0;
|
$loan = 0;
|
||||||
if ($Loan_Recovered == 'NA') {
|
if ($Loan_Recovered == 'NA') {
|
||||||
$loan = 0.00;
|
$loan = 0.00;
|
||||||
@ -563,86 +557,76 @@ class Payslip extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
if ($Monthly_Due > $Balance_Amount) {
|
if ($Monthly_Due > $Balance_Amount) {
|
||||||
|
|
||||||
// current= Balance_Amount - autoLoan;
|
|
||||||
//alert('hi');
|
|
||||||
$loan = $Balance_Amount;
|
$loan = $Balance_Amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$Allowances = $value->Allowances;
|
$Allowances = $value->Allowances;
|
||||||
$HRA_Rate = $value->HRA_Rate;
|
$HRA_Rate = $value->HRA_Rate;
|
||||||
$PF_Rate = $value->PF_Rate;
|
$PF_Rate = $value->PF_Rate;
|
||||||
$ESI_Rate = $value->ESI_Rate;
|
$ESI_Rate = $value->ESI_Rate;
|
||||||
|
|
||||||
$MonthIncentive = $value->MonthlyIncentives; //t_monthly_pay_inputs,for change month
|
$MonthIncentive = $value->MonthlyIncentives; //t_monthly_pay_inputs,for change month
|
||||||
|
|
||||||
$Incentive = 0;
|
$Incentive = 0;
|
||||||
|
|
||||||
if (empty($MonthIncentive)) {
|
if (empty($MonthIncentive)) {
|
||||||
|
|
||||||
$Incentive = $MasterIncentives;
|
$Incentive = $MasterIncentives;
|
||||||
} else {
|
} else {
|
||||||
$Incentive = $MonthIncentive;
|
$Incentive = $MonthIncentive;
|
||||||
}
|
}
|
||||||
// echo $Incentive;
|
|
||||||
|
|
||||||
|
|
||||||
|
$dayFood_Allowance = $Food_Allowances * ($Days_worked + $Sunday);
|
||||||
|
|
||||||
$daySalarys = $Days_worked + $Paid_leave;
|
$totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave;
|
||||||
|
|
||||||
//echo "hra amount";print_r(array($HRA_Amount,$Basic_Pay,$totalsalary));
|
|
||||||
//$Allowances = $allowances * $values;
|
|
||||||
$dayFood_Allowance = $Food_Allowances * $Days_worked;
|
|
||||||
|
|
||||||
$daySalary = $Basic_Pay / $NoofDays;
|
|
||||||
/**per day salary working hour**/
|
|
||||||
//echo $daySalary.'<br/>';
|
|
||||||
|
|
||||||
|
$dayBasic = $Basic_Pay / $NoofDays;
|
||||||
$dayHra = $HRA_Amount / $NoofDays;
|
$dayHra = $HRA_Amount / $NoofDays;
|
||||||
/** per day hra amount **/
|
$onehoursSalary = ($dayBasic + $dayHra) / 8;
|
||||||
//echo $dayHra.'<br/>';
|
|
||||||
|
|
||||||
$onehoursSalary = ($daySalary + $dayHra) / 8;
|
|
||||||
/**one hour salay ot calculation**/
|
/**one hour salay ot calculation**/
|
||||||
if ($OT_Hrs_Worked != 0) {
|
if ($OT_Hrs_Worked != 0) {
|
||||||
$totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
$totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
||||||
} else {
|
} else {
|
||||||
$totSalayOT = 0;
|
$totSalayOT = 0;
|
||||||
}
|
}
|
||||||
$currentDaySalary = $daySalary * $daySalarys;
|
|
||||||
/** current day salary working days calculation**/
|
|
||||||
|
|
||||||
|
|
||||||
$currentDayHra = $dayHra * $daySalarys;
|
//current day basic and hra salary
|
||||||
/** total working days hra calculations**/
|
$currentDayBasic = $dayBasic * $totalDaysWorked;
|
||||||
// echo $currentDayHra.'<br/>';
|
$currentDayHra = $dayHra * $totalDaysWorked;
|
||||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
|
||||||
/** current date pf calculation**/
|
|
||||||
if ($TotalSalary <= 20000) {
|
|
||||||
|
|
||||||
$esiAmount = $currentDatePF * $ESI_Rate / 100;
|
|
||||||
/** esiamount not elgiable for 20000 **/
|
//$totalSalary = $currentDayBasic + $currentDayHra + $totSalayOT;
|
||||||
} else {
|
|
||||||
$esiAmount = 0;
|
|
||||||
}
|
if ($TotalSalary <= 20000) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0;}
|
||||||
$pfAmount = $currentDaySalary * $PF_Rate / 100;
|
$pfAmount = $currentDayBasic * $PF_Rate / 100;
|
||||||
/** pf amount per day**/
|
/** pf amount per day**/
|
||||||
|
|
||||||
//echo $totalothour;die;
|
//echo $totalothour;die;
|
||||||
$empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
$empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT + $dayFood_Allowance + $Allowances + $Incentive;
|
||||||
|
// echo $totalDaysWorked .'</br>';
|
||||||
|
// echo $currentDayBasic .'</br>';
|
||||||
|
// echo $currentDayHra .'</br>';
|
||||||
|
// echo $totSalayOT .'</br>';
|
||||||
|
// echo $dayFood_Allowance .'</br>';
|
||||||
|
// echo $Allowances .'</br>';
|
||||||
|
// echo $Incentive .'</br>';
|
||||||
|
// die;
|
||||||
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
||||||
|
|
||||||
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
||||||
|
|
||||||
|
|
||||||
$employeeSalary[] = round($salaryInCurrentday);
|
$employeeSalary[] = round($salaryInCurrentday);
|
||||||
|
$esi[] = number_format($esiAmount,2);
|
||||||
|
$pf[] = number_format($pfAmount,2);
|
||||||
|
$ot[] = number_format($totSalayOT,2);
|
||||||
}
|
}
|
||||||
$data['empSalary'] = $employeeSalary;
|
$data['empSalary'] = $employeeSalary;
|
||||||
|
$data['esi'] = $esi;
|
||||||
|
$data['pf'] = $pf;
|
||||||
|
$data['over_time'] = $ot;
|
||||||
|
|
||||||
|
|
||||||
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
||||||
@ -657,19 +641,17 @@ class Payslip extends BaseController
|
|||||||
$current = $this->request->getPost('monthyear');
|
$current = $this->request->getPost('monthyear');
|
||||||
|
|
||||||
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
||||||
//print_r($data['month']);
|
|
||||||
$data['dropdownvalue'] = $current;
|
$data['dropdownvalue'] = $current;
|
||||||
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
||||||
|
|
||||||
// dd($data['fresh']);
|
|
||||||
|
|
||||||
$employeeSalary = [];
|
$employeeSalary = [];
|
||||||
|
$esi = [];
|
||||||
|
$pf = [];
|
||||||
|
$ot = [];
|
||||||
foreach ($data['fresh'] as $value) {
|
foreach ($data['fresh'] as $value) {
|
||||||
|
|
||||||
//print_r($value);
|
|
||||||
//die();
|
|
||||||
|
|
||||||
$NoofDays = $value->NoofDays; //Month day 30,31,28
|
$NoofDays = $value->NoofDays; //Month day 30,31,28
|
||||||
$HRA_Amount = $value->HRA_Amount;
|
$HRA_Amount = $value->HRA_Amount;
|
||||||
@ -681,6 +663,9 @@ class Payslip extends BaseController
|
|||||||
$Paid_leave = $value->Paid_leave; // leave day
|
$Paid_leave = $value->Paid_leave; // leave day
|
||||||
$OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
$OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
||||||
$Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE
|
$Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE
|
||||||
|
$Sunday = $value->sunday_count; // Sunday count
|
||||||
|
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
||||||
|
$MasterIncentives = $value->MasterIncentives; //Master values get
|
||||||
$due_start_date = $value->DueDate;
|
$due_start_date = $value->DueDate;
|
||||||
$paydate = $current; //From POST parm
|
$paydate = $current; //From POST parm
|
||||||
|
|
||||||
@ -693,18 +678,10 @@ class Payslip extends BaseController
|
|||||||
$pday = cal_days_in_month(CAL_GREGORIAN, $pmonth, $pyear);
|
$pday = cal_days_in_month(CAL_GREGORIAN, $pmonth, $pyear);
|
||||||
$paymonth = $pyear . '-' . $pmonth . '-' . $pday;
|
$paymonth = $pyear . '-' . $pmonth . '-' . $pday;
|
||||||
|
|
||||||
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
|
||||||
|
|
||||||
$MasterIncentives = $value->MasterIncentives; //Master values get
|
|
||||||
// echo 'master'.$MasterIncentives;
|
|
||||||
$Loan_amount = $value->Loan_Amount;
|
$Loan_amount = $value->Loan_Amount;
|
||||||
$Paid_Amount = $value->Paid_Amount;
|
$Paid_Amount = $value->Paid_Amount;
|
||||||
|
|
||||||
|
|
||||||
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$loan = 0;
|
$loan = 0;
|
||||||
if ($Loan_Recovered == 'NA') {
|
if ($Loan_Recovered == 'NA') {
|
||||||
$loan = 0.00;
|
$loan = 0.00;
|
||||||
@ -713,7 +690,6 @@ class Payslip extends BaseController
|
|||||||
$loan = $Monthly_Due;
|
$loan = $Monthly_Due;
|
||||||
}
|
}
|
||||||
} else if ($Loan_Recovered >= 0.00) {
|
} else if ($Loan_Recovered >= 0.00) {
|
||||||
|
|
||||||
if (strtotime($due_start_date) <= strtotime($paymonth)) {
|
if (strtotime($due_start_date) <= strtotime($paymonth)) {
|
||||||
$loan = $Loan_Recovered;
|
$loan = $Loan_Recovered;
|
||||||
}
|
}
|
||||||
@ -721,86 +697,76 @@ class Payslip extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
if ($Monthly_Due > $Balance_Amount) {
|
if ($Monthly_Due > $Balance_Amount) {
|
||||||
|
|
||||||
// current= Balance_Amount - autoLoan;
|
|
||||||
//alert('hi');
|
|
||||||
$loan = $Balance_Amount;
|
$loan = $Balance_Amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$Allowances = $value->Allowances;
|
$Allowances = $value->Allowances;
|
||||||
$HRA_Rate = $value->HRA_Rate;
|
$HRA_Rate = $value->HRA_Rate;
|
||||||
$PF_Rate = $value->PF_Rate;
|
$PF_Rate = $value->PF_Rate;
|
||||||
$ESI_Rate = $value->ESI_Rate;
|
$ESI_Rate = $value->ESI_Rate;
|
||||||
|
|
||||||
$MonthIncentive = $value->MonthlyIncentives; //t_monthly_pay_inputs,for change month
|
$MonthIncentive = $value->MonthlyIncentives; //t_monthly_pay_inputs,for change month
|
||||||
|
|
||||||
$Incentive = 0;
|
$Incentive = 0;
|
||||||
|
|
||||||
if (empty($MonthIncentive)) {
|
if (empty($MonthIncentive)) {
|
||||||
|
|
||||||
$Incentive = $MasterIncentives;
|
$Incentive = $MasterIncentives;
|
||||||
} else {
|
} else {
|
||||||
$Incentive = $MonthIncentive;
|
$Incentive = $MonthIncentive;
|
||||||
}
|
}
|
||||||
// echo $Incentive;
|
|
||||||
|
|
||||||
|
|
||||||
|
$dayFood_Allowance = $Food_Allowances * ($Days_worked + $Sunday);
|
||||||
|
|
||||||
$daySalarys = $Days_worked + $Paid_leave;
|
$totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave;
|
||||||
|
|
||||||
//echo "hra amount";print_r(array($HRA_Amount,$Basic_Pay,$totalsalary));
|
|
||||||
//$Allowances = $allowances * $values;
|
|
||||||
$dayFood_Allowance = $Food_Allowances * $Days_worked;
|
|
||||||
|
|
||||||
$daySalary = $Basic_Pay / $NoofDays;
|
|
||||||
/**per day salary working hour**/
|
|
||||||
//echo $daySalary.'<br/>';
|
|
||||||
|
|
||||||
|
$dayBasic = $Basic_Pay / $NoofDays;
|
||||||
$dayHra = $HRA_Amount / $NoofDays;
|
$dayHra = $HRA_Amount / $NoofDays;
|
||||||
/** per day hra amount **/
|
$onehoursSalary = ($dayBasic + $dayHra) / 8;
|
||||||
//echo $dayHra.'<br/>';
|
|
||||||
|
|
||||||
$onehoursSalary = ($daySalary + $dayHra) / 8;
|
|
||||||
/**one hour salay ot calculation**/
|
/**one hour salay ot calculation**/
|
||||||
if ($OT_Hrs_Worked != 0) {
|
if ($OT_Hrs_Worked != 0) {
|
||||||
$totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
$totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
||||||
} else {
|
} else {
|
||||||
$totSalayOT = 0;
|
$totSalayOT = 0;
|
||||||
}
|
}
|
||||||
$currentDaySalary = $daySalary * $daySalarys;
|
|
||||||
/** current day salary working days calculation**/
|
|
||||||
|
|
||||||
|
|
||||||
$currentDayHra = $dayHra * $daySalarys;
|
//current day basic and hra salary
|
||||||
/** total working days hra calculations**/
|
$currentDayBasic = $dayBasic * $totalDaysWorked;
|
||||||
// echo $currentDayHra.'<br/>';
|
$currentDayHra = $dayHra * $totalDaysWorked;
|
||||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
|
||||||
/** current date pf calculation**/
|
|
||||||
if ($TotalSalary <= 20000) {
|
|
||||||
|
|
||||||
$esiAmount = $currentDatePF * $ESI_Rate / 100;
|
|
||||||
/** esiamount not elgiable for 20000 **/
|
//$totalSalary = $currentDayBasic + $currentDayHra + $totSalayOT;
|
||||||
} else {
|
|
||||||
$esiAmount = 0;
|
|
||||||
}
|
if ($TotalSalary <= 20000) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0;}
|
||||||
$pfAmount = $currentDaySalary * $PF_Rate / 100;
|
$pfAmount = $currentDayBasic * $PF_Rate / 100;
|
||||||
/** pf amount per day**/
|
/** pf amount per day**/
|
||||||
|
|
||||||
//echo $totalothour;die;
|
//echo $totalothour;die;
|
||||||
$empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
$empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT + $dayFood_Allowance + $Allowances + $Incentive;
|
||||||
|
// echo $totalDaysWorked .'</br>';
|
||||||
|
// echo $currentDayBasic .'</br>';
|
||||||
|
// echo $currentDayHra .'</br>';
|
||||||
|
// echo $totSalayOT .'</br>';
|
||||||
|
// echo $dayFood_Allowance .'</br>';
|
||||||
|
// echo $Allowances .'</br>';
|
||||||
|
// echo $Incentive .'</br>';
|
||||||
|
// die;
|
||||||
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
||||||
|
|
||||||
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
||||||
|
|
||||||
|
|
||||||
$employeeSalary[] = round($salaryInCurrentday);
|
$employeeSalary[] = round($salaryInCurrentday);
|
||||||
|
$esi[] = number_format($esiAmount,2);
|
||||||
|
$pf[] = number_format($pfAmount,2);
|
||||||
|
$ot[] = number_format($totSalayOT,2);
|
||||||
}
|
}
|
||||||
$data['empSalary'] = $employeeSalary;
|
$data['empSalary'] = $employeeSalary;
|
||||||
|
$data['esi'] = $esi;
|
||||||
|
$data['pf'] = $pf;
|
||||||
|
$data['over_time'] = $ot;
|
||||||
|
|
||||||
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
||||||
$this->global['pageTitle'] = 'Payroll Monthly Inputs';
|
$this->global['pageTitle'] = 'Payroll Monthly Inputs';
|
||||||
|
|||||||
@ -915,7 +915,7 @@ class User extends BaseController
|
|||||||
|
|
||||||
$data['roles'] = $this->user_model->getUserRoles();
|
$data['roles'] = $this->user_model->getUserRoles();
|
||||||
|
|
||||||
$data['Department'] = $this->costcenter_model->getDepartment();
|
// $data['Department'] = $this->costcenter_model->getDepartment();
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Add New User';
|
$this->global['pageTitle'] = 'Add New User';
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,7 @@ class Monthlypay_model extends Model
|
|||||||
//echo $lastdate;
|
//echo $lastdate;
|
||||||
|
|
||||||
//left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?)
|
//left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?)
|
||||||
$sql = "select t_emp_pay_data.EmpID, t_emp_pay_data.Incentives as MasterIncentives,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.LastName,t_employee_details.DateofJoining,t_employee_details.Designation,t_attendance.Days_Worked as Days_worked,t_attendance.Absent as LOP_Days,t_attendance.Paid_Leave as Paid_leave,t_attendance.Total_OTHrs as OT_Hrs_Worked,t_attendance.NoofDays,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Key,t_monthly_pay_inputs.Incentives as MonthlyIncentives,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_loan_history .Balance_Amount
|
$sql = "select t_emp_pay_data.EmpID, t_emp_pay_data.Incentives as MasterIncentives,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.LastName,t_employee_details.DateofJoining,t_employee_details.Designation,t_attendance.Days_Worked as Days_worked,t_attendance.Absent as LOP_Days,t_attendance.Paid_Leave as Paid_leave,t_attendance.Total_OTHrs as OT_Hrs_Worked,t_attendance.NoofDays,t_attendance.sunday_count,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Key,t_monthly_pay_inputs.Incentives as MonthlyIncentives,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_loan_history .Balance_Amount
|
||||||
from t_emp_pay_data
|
from t_emp_pay_data
|
||||||
left join t_employee_details on t_employee_details.EmpID = t_emp_pay_data.EmpID
|
left join t_employee_details on t_employee_details.EmpID = t_emp_pay_data.EmpID
|
||||||
left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and t_payroll.PayOn = ?
|
left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and t_payroll.PayOn = ?
|
||||||
|
|||||||
@ -329,6 +329,7 @@ $currentday = date('d');
|
|||||||
<th class="celda_encabezado_general" >Paid Leave</th>
|
<th class="celda_encabezado_general" >Paid Leave</th>
|
||||||
<th class="celda_encabezado_general" >Days Worked</th>
|
<th class="celda_encabezado_general" >Days Worked</th>
|
||||||
<th class="celda_encabezado_general" >Absent</th>
|
<th class="celda_encabezado_general" >Absent</th>
|
||||||
|
<th class="celda_encabezado_general" >Total Sunday</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -391,6 +392,7 @@ $currentday = date('d');
|
|||||||
<td class="celda_normal" id="<?php echo $row.'PL';?>"><?php if(!empty($a->Paid_Leave)){echo number_format($a->Paid_Leave,2,'.','.');}else{echo "0.00";}?></td>
|
<td class="celda_normal" id="<?php echo $row.'PL';?>"><?php if(!empty($a->Paid_Leave)){echo number_format($a->Paid_Leave,2,'.','.');}else{echo "0.00";}?></td>
|
||||||
<td class="celda_normal" id="<?php echo $row.'DW';?>"><?php if(!empty($a->Days_Worked)){echo $a->Days_Worked;}else{echo "0.00";}?></td>
|
<td class="celda_normal" id="<?php echo $row.'DW';?>"><?php if(!empty($a->Days_Worked)){echo $a->Days_Worked;}else{echo "0.00";}?></td>
|
||||||
<td class="celda_normal"id="<?php echo $row.'AB';?>"><?php if(!empty($a->Absent)){echo $a->Absent;}else{echo "0.00";}?></td>
|
<td class="celda_normal"id="<?php echo $row.'AB';?>"><?php if(!empty($a->Absent)){echo $a->Absent;}else{echo "0.00";}?></td>
|
||||||
|
<td class="celda_normal"id="<?php echo $row.'TS';?>"><?php if(!empty($noofsundays)){echo $noofsundays;}else{echo "0";}?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
@ -428,23 +430,22 @@ $currentday = date('d');
|
|||||||
|
|
||||||
//alert(s);
|
//alert(s);
|
||||||
if(s == 0){
|
if(s == 0){
|
||||||
|
|
||||||
resetFinalValues();
|
resetFinalValues();
|
||||||
var Totalnoofdays = <?php echo $monthdays?>;
|
var Totalnoofdays = <?php echo $monthdays?>;
|
||||||
var alldata = $("#attendance").tableToJSON();
|
var alldata = $("#attendance").tableToJSON();
|
||||||
// alert(JSON.stringify(alldata));
|
|
||||||
alldata=JSON.stringify(alldata);
|
alldata=JSON.stringify(alldata);
|
||||||
// alert(alldata);
|
|
||||||
|
|
||||||
|
|
||||||
var month = $('#month').val();
|
var month = $('#month').val();
|
||||||
var currentmonth = month.substr(0,3);
|
var currentmonth = month.substr(0,3);
|
||||||
var currentyear = month.substr(4,4);
|
var currentyear = month.substr(4,4);
|
||||||
// alert(currentyear);
|
|
||||||
var montharray = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
|
var montharray = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
|
||||||
var currentmonth = jQuery.inArray(currentmonth,montharray);//!== -1
|
var currentmonth = jQuery.inArray(currentmonth,montharray);//!== -1
|
||||||
currentmonth++;
|
currentmonth++;
|
||||||
|
|
||||||
//alert(currentmonth);
|
|
||||||
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
||||||
|
|
||||||
var totaldata = 0;
|
var totaldata = 0;
|
||||||
@ -643,11 +644,13 @@ function myFunction(p,i,v)
|
|||||||
|
|
||||||
|
|
||||||
var totalworkingHrs=0;
|
var totalworkingHrs=0;
|
||||||
|
var sundayWorkingHr=0;
|
||||||
var totalOTHrs = 0;
|
var totalOTHrs = 0;
|
||||||
var paidleave = 0;
|
var paidleave = 0;
|
||||||
var totalDaysWorked=0;
|
var totalDaysWorked=0;
|
||||||
var absent = 0;
|
var absent = 0;
|
||||||
var sundays = <?php echo $noofsundays?>;
|
var sundays = <?php echo $noofsundays?>;
|
||||||
|
var sundaysArray = <?php echo json_encode($sundayarray); ?>;
|
||||||
var publicholidays = <?php echo $noofpublicholidays?>;
|
var publicholidays = <?php echo $noofpublicholidays?>;
|
||||||
|
|
||||||
var totaldays = <?php echo $monthdays?>;
|
var totaldays = <?php echo $monthdays?>;
|
||||||
@ -682,11 +685,29 @@ function myFunction(p,i,v)
|
|||||||
var str2 = str.substr(-2);
|
var str2 = str.substr(-2);
|
||||||
var str3 = str.substr(-3);
|
var str3 = str.substr(-3);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(str1 == 'W')
|
if(str1 == 'W')
|
||||||
{
|
{
|
||||||
|
sundayValidation = false;
|
||||||
|
let dateInt = +str3.replace(/\D/g, '');
|
||||||
|
sundaysArray.forEach(element => {
|
||||||
|
if(+element == dateInt){
|
||||||
|
sundayValidation = true;
|
||||||
|
var current = value.textContent == '' ? 0:parseFloat(value.textContent);
|
||||||
|
sundayWorkingHr += current;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(sundayValidation == false){
|
||||||
var current = value.textContent == '' ? 0:parseFloat(value.textContent);
|
var current = value.textContent == '' ? 0:parseFloat(value.textContent);
|
||||||
totalworkingHrs += current;
|
totalworkingHrs += current;
|
||||||
|
}
|
||||||
|
|
||||||
if(current == 0){absent++;}
|
if(current == 0){absent++;}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -722,8 +743,9 @@ function myFunction(p,i,v)
|
|||||||
// paidleave = 0;
|
// paidleave = 0;
|
||||||
// alert('else');
|
// alert('else');
|
||||||
// }
|
// }
|
||||||
|
TotalOT = totalOTHrs + sundayWorkingHr;
|
||||||
document.getElementById(totalhrsid).textContent = parseFloat(totalworkingHrs).toFixed(2);// == ''?0:parseFloat(totalworkingHrs));
|
document.getElementById(totalhrsid).textContent = parseFloat(totalworkingHrs).toFixed(2);// == ''?0:parseFloat(totalworkingHrs));
|
||||||
document.getElementById(totalothrsid).textContent = parseFloat(totalOTHrs).toFixed(2);// == ''?0:parseFloat(totalOTHrs));
|
document.getElementById(totalothrsid).textContent = parseFloat(TotalOT).toFixed(2);// == ''?0:parseFloat(totalOTHrs));
|
||||||
document.getElementById(paidleaveid).textContent = parseFloat(paidleave).toFixed(2);
|
document.getElementById(paidleaveid).textContent = parseFloat(paidleave).toFixed(2);
|
||||||
document.getElementById(daysworkedid).textContent = parseFloat((totalworkingHrs/8)).toFixed(2);
|
document.getElementById(daysworkedid).textContent = parseFloat((totalworkingHrs/8)).toFixed(2);
|
||||||
document.getElementById(absentid).textContent = parseFloat(absent).toFixed(2);
|
document.getElementById(absentid).textContent = parseFloat(absent).toFixed(2);
|
||||||
|
|||||||
@ -157,18 +157,37 @@ $('html').bind('keypress', function(e)
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div style="overflow-x:scroll;">
|
||||||
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px" >
|
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px" >
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>S.No</th>
|
<th>S.No</th>
|
||||||
|
<th>Emp ID </th>
|
||||||
<th>Employee </th>
|
<th>Employee </th>
|
||||||
<!-- <th>Employee Name</th> -->
|
<th>DOJ</th>
|
||||||
|
<th>Designation</th>
|
||||||
|
<th>Total Days</th>
|
||||||
<th>Days Worked</th>
|
<th>Days Worked</th>
|
||||||
<th>LOP Days</th>
|
<th>LOP Days</th>
|
||||||
<th>Paid Leave</th>
|
<th>Paid Leave</th>
|
||||||
<th>OT Hrs</th>
|
<th>OT Hrs</th>
|
||||||
|
|
||||||
|
<th>Basic Salary</th>
|
||||||
|
<th>Pre Day Salary</th>
|
||||||
|
<th>Worked Salary</th>
|
||||||
|
<th>Pre hr Salary</th>
|
||||||
|
<th>Earned Salary</th>
|
||||||
|
<th>Basic Salary(0.7)</th>
|
||||||
|
<th>HRA Salary(0.3)</th>
|
||||||
|
<th>Gross Salary</th>
|
||||||
|
<th>ESI</th>
|
||||||
|
<th>PF</th>
|
||||||
|
<th>Over Time</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<th>Auto Loan Due ₹</th>
|
<th>Auto Loan Due ₹</th>
|
||||||
|
|
||||||
<th>Manual Loan Due ₹</th>
|
<th>Manual Loan Due ₹</th>
|
||||||
@ -185,55 +204,62 @@ $('html').bind('keypress', function(e)
|
|||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
$index=0;
|
$index=0;
|
||||||
$testarray=array();
|
$testarray=array();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!empty($sample))
|
if(!empty($sample))
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
//print_r($sample); die;
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
foreach($sample as $i=> $record)
|
foreach($sample as $i=> $record)
|
||||||
{
|
{
|
||||||
//echo 'PAY'.$record->Key;
|
|
||||||
$index++;
|
$index++;
|
||||||
|
|
||||||
if(in_array($record->EmpID,$testarray))
|
if(in_array($record->EmpID,$testarray))
|
||||||
{
|
{
|
||||||
$index--;
|
$index--;
|
||||||
|
}else{
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
|
|
||||||
|
|
||||||
array_push($testarray,$record->EmpID);
|
array_push($testarray,$record->EmpID);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="lastvalue">
|
<tr class="lastvalue">
|
||||||
<td style="text-align:right;" style="background-color:blue;"><?php echo $index; ?></td>
|
<td style="text-align:right;" style="background-color:blue;"><?php echo $index; ?></td>
|
||||||
<!-- <td style="text-align:right;"><?php echo $record->EmpID ?></td> -->
|
<td style="max-width:80px"><?php echo $record->EmpID ; ?></td>
|
||||||
<td style="max-width:80px"><?php echo $record->EmpID ."-".$record->FirstName ."". $record->LastName ?></td>
|
<td style="max-width:80px"><?php echo $record->FirstName; ?></td>
|
||||||
|
<td style="max-width:80px">
|
||||||
|
<?php
|
||||||
<td id="dayWork<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Days_worked)){echo $record->Days_worked;}else{echo "0.00";}?></td>
|
$date = DateTime::createFromFormat('Y-m-d H:i:s', $record->DateofJoining);
|
||||||
|
$newDateFormat = $date->format('d-m-Y');
|
||||||
|
echo $newDateFormat;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
<td style="max-width:80px"><?php echo $record->Designation; ?></td>
|
||||||
|
<td style="max-width:80px"><?php echo $record->NoofDays; ?></td>
|
||||||
|
<td id="dayWork<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Days_worked)){echo $record->Days_worked+$record->sunday_count;}else{echo "0.00";}?></td>
|
||||||
<td id="lopDay<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?></td>
|
<td id="lopDay<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?></td>
|
||||||
|
|
||||||
<td id="paidLeave<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?></td>
|
<td id="paidLeave<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?></td>
|
||||||
|
|
||||||
<td id="otHrsWork<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?></td>
|
<td id="otHrsWork<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?></td>
|
||||||
|
|
||||||
|
<td style="max-width:80px"><?php echo $record->TotalSalary; ?></td>
|
||||||
|
<td style="max-width:80px"><?php $perDaySalary = $record->TotalSalary / $record->NoofDays; echo number_format($perDaySalary, 2); ?></td>
|
||||||
|
<td style="max-width:80px"><?php $workedSalary = $perDaySalary * ($record->Days_worked+$record->sunday_count); echo number_format($workedSalary, 2); ?></td>
|
||||||
|
<td style="max-width:80px"><?php $perHrSalary = $perDaySalary / 8; echo number_format($perHrSalary, 2); ?></td>
|
||||||
|
<td style="max-width:80px"><?php echo number_format($workedSalary, 2); ?></td>
|
||||||
|
<td style="max-width:80px"><?php $basicWorked = $workedSalary * 70 / 100; echo number_format($basicWorked, 2); ?></td>
|
||||||
|
<td style="max-width:80px"><?php $hraWorked = $workedSalary * 30 / 100; echo number_format($hraWorked, 2); ?></td>
|
||||||
|
<td style="max-width:80px"><?php echo number_format($basicWorked+$hraWorked, 2); ?></td>
|
||||||
|
<td style="max-width:80px"> <?php echo $esi[$i]; ?> </td>
|
||||||
|
<td style="max-width:80px"> <?php echo $pf[$i]; ?> </td>
|
||||||
|
<td style="max-width:80px"> <?php echo $over_time[$i]; ?> </td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<td id="monthDue<?php echo $index?>" <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Monthly_Due)){echo $record->Monthly_Due; $totalmonthloan []=$record->Monthly_Due;}else { echo number_format(0.00,2,'.','');} ?></td>
|
<td id="monthDue<?php echo $index?>" <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Monthly_Due)){echo $record->Monthly_Due; $totalmonthloan []=$record->Monthly_Due;}else { echo number_format(0.00,2,'.','');} ?></td>
|
||||||
|
|
||||||
|
|
||||||
@ -272,8 +298,13 @@ $('html').bind('keypress', function(e)
|
|||||||
|
|
||||||
<?php $totalfestival [] = isset($Festival_Bonus) ? $Festival_Bonus : [];?>
|
<?php $totalfestival [] = isset($Festival_Bonus) ? $Festival_Bonus : [];?>
|
||||||
|
|
||||||
<td id="empsal<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php }?>> <?php if(!empty($record->Estimate)){echo $record->Estimate; $estTotal [] = $record->Estimate; }else { echo $empSalary[$i]; $estTotal [] = $empSalary[$i];
|
<td id="empsal<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php }?>>
|
||||||
}?></td>
|
<?php if(!empty($record->Estimate)){
|
||||||
|
echo $record->Estimate; $estTotal [] = $record->Estimate;
|
||||||
|
}else {
|
||||||
|
echo $empSalary[$i]; $estTotal [] = $empSalary[$i];
|
||||||
|
}?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -282,7 +313,7 @@ $('html').bind('keypress', function(e)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <input type="hidden" id = "eid" value="<?php echo $record->EmpID?>">
|
<!--<input type="hidden" id = "eid" value="<?php echo $record->EmpID?>">
|
||||||
<input type="hidden" id = "inv" value="<?php echo $record->Incentives?>">
|
<input type="hidden" id = "inv" value="<?php echo $record->Incentives?>">
|
||||||
<input type="hidden" id = "pdi" value="<?php echo $record->Pay_Data_ID?>"> -->
|
<input type="hidden" id = "pdi" value="<?php echo $record->Pay_Data_ID?>"> -->
|
||||||
<input type="hidden" id = "bPay<?php echo $index?>" value="<?php echo $record->Basic_Pay?>">
|
<input type="hidden" id = "bPay<?php echo $index?>" value="<?php echo $record->Basic_Pay?>">
|
||||||
@ -334,7 +365,7 @@ $('html').bind('keypress', function(e)
|
|||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3" id="savebutton">
|
<div class="col-md-3" id="savebutton">
|
||||||
@ -428,7 +459,9 @@ $('html').bind('keypress', function(e)
|
|||||||
"info": true,
|
"info": true,
|
||||||
"paging": false,
|
"paging": false,
|
||||||
"autoWidth": true,
|
"autoWidth": true,
|
||||||
"order": [[ 1, 'asc' ]]
|
|
||||||
|
// "scrollX": true,
|
||||||
|
"order": [[ 1, 'asc' ]],
|
||||||
} );
|
} );
|
||||||
|
|
||||||
t.on( 'order.dt search.dt', function () {
|
t.on( 'order.dt search.dt', function () {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user