monthlypayslip
This commit is contained in:
parent
4aded94607
commit
f5f7745a3a
@ -512,113 +512,148 @@ function phpAlert($msg) {
|
|||||||
// $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($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);
|
||||||
//print_r( $data['fresh']);
|
$employeeSalary = [];
|
||||||
// $employeeSalary = [];
|
|
||||||
// foreach($data['fresh'] as $value){
|
|
||||||
|
|
||||||
// //print_r($value);
|
|
||||||
// $NoofDays=$value->NoofDays;//Month day 30,31,28
|
|
||||||
// $HRA_Amount = $value->HRA_Amount;
|
|
||||||
// $Basic_Pay = $value->Basic_Pay;
|
|
||||||
// $TotalSalary = $value->TotalSalary;
|
|
||||||
// $Food_Allowances= $value->Food_Allowances;
|
|
||||||
// $Days_worked = $value->Days_worked; // working day
|
|
||||||
// $LOP_Days = $value->LOP_Days; // not working day
|
|
||||||
// $Paid_leave = $value->Paid_leave; // leave day
|
|
||||||
// $OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
|
||||||
// $Monthly_Due= $value->Monthly_Due;// loan due amt
|
|
||||||
|
|
||||||
// $MasterIncentives=$value->MasterIncentives;//Master values get
|
foreach($data['fresh'] as $value){
|
||||||
// // echo 'master'.$MasterIncentives;
|
|
||||||
|
|
||||||
// $Allowances =$value->Allowances;
|
//print_r($value);
|
||||||
// $HRA_Rate=$value->HRA_Rate;
|
//die();
|
||||||
// $PF_Rate=$value->PF_Rate;
|
|
||||||
// $ESI_Rate=$value->ESI_Rate;
|
|
||||||
|
|
||||||
// $MonthIncentive = $value->MonthlyIncentives;//T_Monthly_Pay_Inputs,for change month
|
$NoofDays=$value->NoofDays;//Month day 30,31,28
|
||||||
// //echo 'month'. $MonthIncentive;
|
$HRA_Amount = $value->HRA_Amount;
|
||||||
|
$Basic_Pay = $value->Basic_Pay;
|
||||||
|
$TotalSalary = $value->TotalSalary;
|
||||||
|
$Food_Allowances= $value->Food_Allowances;
|
||||||
|
$Days_worked = $value->Days_worked; // working day
|
||||||
|
$LOP_Days = $value->LOP_Days; // not working day
|
||||||
|
$Paid_leave = $value->Paid_leave; // leave day
|
||||||
|
$OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
||||||
|
$Monthly_Due = $value->Monthly_Due;// AUTO LOAN DUE
|
||||||
|
|
||||||
// $Incentive = 0;
|
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
||||||
|
|
||||||
// if(empty($MonthIncentive))
|
$MasterIncentives=$value->MasterIncentives;//Master values get
|
||||||
// {
|
// echo 'master'.$MasterIncentives;
|
||||||
|
$Loan_amount = $value->Loan_Amount;
|
||||||
|
$Paid_Amount = $value->Paid_Amount;
|
||||||
|
|
||||||
// $Incentive = $MasterIncentives;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// $Incentive = $MonthIncentive;
|
|
||||||
|
|
||||||
// }
|
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $daySalarys = $Days_worked + $Paid_leave;
|
$loan=0;
|
||||||
|
if($Loan_Recovered =='NA'){
|
||||||
// //echo "hra amount";print_r(array($HRA_Amount,$Basic_Pay,$totalsalary));
|
$loan=0.00;
|
||||||
// //$Allowances = $allowances * $values;
|
}
|
||||||
// $dayFood_Allowance = $Food_Allowances * $Days_worked;
|
else if($Loan_Recovered == 0.00)
|
||||||
|
{
|
||||||
// $daySalary = $Basic_Pay / $NoofDays;
|
$loan=$Monthly_Due;
|
||||||
// /**per day salary working hour**/
|
}
|
||||||
// //echo $daySalary.'<br/>';
|
else if($Loan_Recovered >= 0.00)
|
||||||
|
{
|
||||||
// $dayHra = $HRA_Amount / $NoofDays;
|
$loan = $Loan_Recovered;
|
||||||
// /** per day hra amount **/
|
}
|
||||||
// //echo $dayHra.'<br/>';
|
|
||||||
|
|
||||||
// $onehoursSalary = ($daySalary + $dayHra) / 8;
|
|
||||||
// /**one hour salay ot calculation**/
|
|
||||||
// if ($OT_Hrs_Worked != 0)
|
|
||||||
// {
|
|
||||||
// $totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// $totSalayOT = 0;
|
|
||||||
// }
|
|
||||||
// $currentDaySalary = $daySalary * $daySalarys;
|
|
||||||
// /** current day salary working days calculation**/
|
|
||||||
|
|
||||||
|
|
||||||
// $currentDayHra = $dayHra * $daySalarys;
|
if($Monthly_Due > $Balance_Amount)
|
||||||
// /** total working days hra calculations**/
|
{
|
||||||
// // echo $currentDayHra.'<br/>';
|
|
||||||
// $currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
|
||||||
// /** current date pf calculation**/
|
|
||||||
// if ($TotalSalary <= 20000)
|
|
||||||
// {
|
|
||||||
|
|
||||||
// $esiAmount = $currentDatePF * $ESI_Rate/ 100;
|
// current= Balance_Amount - autoLoan;
|
||||||
// /** esiamount not elgiable for 20000 **/
|
//alert('hi');
|
||||||
// }
|
$loan = $Balance_Amount;
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// $esiAmount = 0;
|
|
||||||
// }
|
|
||||||
// $pfAmount = $currentDaySalary * $PF_Rate/ 100;
|
|
||||||
// /** pf amount per day**/
|
|
||||||
|
|
||||||
// //echo $totalothour;die;
|
}
|
||||||
// $empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
|
||||||
|
|
||||||
// $empSalarySub = $esiAmount + $pfAmount + $Monthly_Due;
|
|
||||||
|
|
||||||
// $salaryInCurrentday= $empSalaryAdd - $empSalarySub;
|
|
||||||
// $employeeSalary []= round($salaryInCurrentday);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$Allowances =$value->Allowances;
|
||||||
|
$HRA_Rate=$value->HRA_Rate;
|
||||||
|
$PF_Rate=$value->PF_Rate;
|
||||||
|
$ESI_Rate=$value->ESI_Rate;
|
||||||
|
|
||||||
|
$MonthIncentive = $value->MonthlyIncentives;//T_Monthly_Pay_Inputs,for change month
|
||||||
|
|
||||||
|
$Incentive = 0;
|
||||||
|
|
||||||
|
if(empty($MonthIncentive))
|
||||||
|
{
|
||||||
|
|
||||||
|
$Incentive = $MasterIncentives;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$Incentive = $MonthIncentive;
|
||||||
|
|
||||||
|
}
|
||||||
|
// echo $Incentive;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$daySalarys = $Days_worked + $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/>';
|
||||||
|
|
||||||
|
$dayHra = $HRA_Amount / $NoofDays;
|
||||||
|
/** per day hra amount **/
|
||||||
|
//echo $dayHra.'<br/>';
|
||||||
|
|
||||||
|
$onehoursSalary = ($daySalary + $dayHra) / 8;
|
||||||
|
/**one hour salay ot calculation**/
|
||||||
|
if ($OT_Hrs_Worked != 0)
|
||||||
|
{
|
||||||
|
$totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$totSalayOT = 0;
|
||||||
|
}
|
||||||
|
$currentDaySalary = $daySalary * $daySalarys;
|
||||||
|
/** current day salary working days calculation**/
|
||||||
|
|
||||||
|
|
||||||
|
$currentDayHra = $dayHra * $daySalarys;
|
||||||
|
/** total working days hra calculations**/
|
||||||
|
// echo $currentDayHra.'<br/>';
|
||||||
|
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
||||||
|
/** current date pf calculation**/
|
||||||
|
if ($TotalSalary <= 20000)
|
||||||
|
{
|
||||||
|
|
||||||
|
$esiAmount = $currentDatePF * $ESI_Rate/ 100;
|
||||||
|
/** esiamount not elgiable for 20000 **/
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$esiAmount = 0;
|
||||||
|
}
|
||||||
|
$pfAmount = $currentDaySalary * $PF_Rate/ 100;
|
||||||
|
/** pf amount per day**/
|
||||||
|
|
||||||
|
//echo $totalothour;die;
|
||||||
|
$empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
||||||
|
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
||||||
|
|
||||||
|
$salaryInCurrentday= $empSalaryAdd - $empSalarySub;
|
||||||
|
|
||||||
|
|
||||||
|
$employeeSalary []= round($salaryInCurrentday);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
$data['empSalary'] = $employeeSalary;
|
||||||
|
|
||||||
// }
|
|
||||||
// $data['empSalary'] = $employeeSalary;
|
|
||||||
|
|
||||||
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
||||||
$this->global['pageTitle'] = 'Siddharth : Payroll Monthly Inputs';
|
$this->global['pageTitle'] = 'Siddharth : Payroll Monthly Inputs';
|
||||||
@ -641,7 +676,8 @@ function phpAlert($msg) {
|
|||||||
|
|
||||||
foreach($data['fresh'] as $value){
|
foreach($data['fresh'] as $value){
|
||||||
|
|
||||||
print_r($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;
|
||||||
@ -658,7 +694,11 @@ function phpAlert($msg) {
|
|||||||
|
|
||||||
$MasterIncentives=$value->MasterIncentives;//Master values get
|
$MasterIncentives=$value->MasterIncentives;//Master values get
|
||||||
// echo 'master'.$MasterIncentives;
|
// echo 'master'.$MasterIncentives;
|
||||||
// $Loan_amount = $value->Loan_Amount;
|
$Loan_amount = $value->Loan_Amount;
|
||||||
|
$Paid_Amount = $value->Paid_Amount;
|
||||||
|
|
||||||
|
|
||||||
|
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -676,7 +716,16 @@ function phpAlert($msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo 'Loan'. $loan ;
|
if($Monthly_Due > $Balance_Amount)
|
||||||
|
{
|
||||||
|
|
||||||
|
// current= Balance_Amount - autoLoan;
|
||||||
|
//alert('hi');
|
||||||
|
$loan = $Balance_Amount;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ if(strlen($month) == 6)
|
|||||||
//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_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_Payroll.Key,T_Monthly_Pay_Inputs.Incentives as MonthlyIncentives,T_Monthly_Pay_Inputs.Loan_Recovered
|
$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_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.Loan_Amount,T_Loan_Master.Paid_Amount,T_Payroll.Key,T_Monthly_Pay_Inputs.Incentives as MonthlyIncentives,T_Monthly_Pay_Inputs.Loan_Recovered,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 = ?
|
||||||
@ -107,6 +107,7 @@ if(strlen($month) == 6)
|
|||||||
left join T_Attendance on T_Emp_Pay_Data.EmpID = T_Attendance.EmpID
|
left join T_Attendance on T_Emp_Pay_Data.EmpID = T_Attendance.EmpID
|
||||||
left join T_Monthly_Pay_Inputs on T_Monthly_Pay_Inputs.EmpID = T_Emp_Pay_Data.EmpID and T_Monthly_Pay_Inputs.Month_Year = ?
|
left join T_Monthly_Pay_Inputs on T_Monthly_Pay_Inputs.EmpID = T_Emp_Pay_Data.EmpID and T_Monthly_Pay_Inputs.Month_Year = ?
|
||||||
left join T_Loan_Master on T_Emp_Pay_Data.EmpID = T_Loan_Master.EmpID and T_Loan_Master.is_Active = 1
|
left join T_Loan_Master on T_Emp_Pay_Data.EmpID = T_Loan_Master.EmpID and T_Loan_Master.is_Active = 1
|
||||||
|
left join T_Loan_History on T_Loan_History .Loan_ID = T_Loan_Master.Loan_ID
|
||||||
where T_Employee_Details.DateofJoining <= ?
|
where T_Employee_Details.DateofJoining <= ?
|
||||||
and month(T_Attendance.Month_Year) = month(?) and year(T_Attendance.Month_Year) = year(?)
|
and month(T_Attendance.Month_Year) = month(?) and year(T_Attendance.Month_Year) = year(?)
|
||||||
order by T_Employee_Details.EmpID";
|
order by T_Employee_Details.EmpID";
|
||||||
|
|||||||
@ -101,7 +101,7 @@ if(!empty($MaintEdit))
|
|||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>Nature of Maintenance:</label></br>
|
<label>Nature of Maintenance:</label></br>
|
||||||
<input type="radio" id="radiobtn1" name="radiobtn" value="0" >Maintenance
|
<input type="radio" id="radiobtn1" name="radiobtn" value="0" >Preventive
|
||||||
<input type="radio" id="radiobtn2" name="radiobtn" value="1" >Breakdown
|
<input type="radio" id="radiobtn2" name="radiobtn" value="1" >Breakdown
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -2,18 +2,18 @@
|
|||||||
$sample = array_merge($month,$fresh);
|
$sample = array_merge($month,$fresh);
|
||||||
$show_hide_column_value = true;
|
$show_hide_column_value = true;
|
||||||
|
|
||||||
// foreach($sample as $s)
|
foreach($sample as $s)
|
||||||
// {
|
{
|
||||||
// if(!empty($s->Key))
|
if(!empty($s->Key))
|
||||||
// {
|
{
|
||||||
// $show_hide_column_value = false;
|
$show_hide_column_value = false;
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// $show_hide_column_value = true;
|
$show_hide_column_value = true;
|
||||||
// }
|
}
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
|
|
||||||
$ex = explode('-',$dropdownvalue);
|
$ex = explode('-',$dropdownvalue);
|
||||||
|
|
||||||
@ -287,6 +287,8 @@ $('html').bind('keypress', function(e)
|
|||||||
<input type="hidden" id = "eslRate<?php echo $index?>" value="<?php echo $record->ESI_Rate?>">
|
<input type="hidden" id = "eslRate<?php echo $index?>" value="<?php echo $record->ESI_Rate?>">
|
||||||
<input type="hidden" id = "hraAmt<?php echo $index?>" value="<?php echo $record->HRA_Amount?>">
|
<input type="hidden" id = "hraAmt<?php echo $index?>" value="<?php echo $record->HRA_Amount?>">
|
||||||
|
|
||||||
|
<input type="hidden" id = "loanamt<?php echo $index?>" value="<?php echo $record->Loan_amount?>">
|
||||||
|
<input type="hidden" id = "paidamt<?php echo $index?>" value="<?php echo $record->Paid_Amount?>">
|
||||||
|
|
||||||
<!-- <input type="hidden" id = "eid" value="<?php echo $record->TotalSalary?>">
|
<!-- <input type="hidden" id = "eid" value="<?php echo $record->TotalSalary?>">
|
||||||
<input type="hidden" id = "eid" value="<?php echo $record->LOP_Days?>">
|
<input type="hidden" id = "eid" value="<?php echo $record->LOP_Days?>">
|
||||||
@ -462,7 +464,7 @@ function isCheckKeyCode(event){
|
|||||||
{
|
{
|
||||||
if(year == 1)
|
if(year == 1)
|
||||||
{
|
{
|
||||||
// $("#savebutton").hide();
|
// $("#savebutton").hide();
|
||||||
$("#savebutton").show();
|
$("#savebutton").show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -480,7 +482,7 @@ function isCheckKeyCode(event){
|
|||||||
}
|
}
|
||||||
else if(year == 0)
|
else if(year == 0)
|
||||||
{
|
{
|
||||||
// $("#savebutton").hide();
|
//$("#savebutton").hide();
|
||||||
$("#savebutton").show();
|
$("#savebutton").show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -537,9 +539,16 @@ function isCheckKeyCode(event){
|
|||||||
var pfRate =parseFloat(document.getElementById('pfRate'+sno).value);
|
var pfRate =parseFloat(document.getElementById('pfRate'+sno).value);
|
||||||
var eslRate =parseFloat(document.getElementById('eslRate'+sno).value);
|
var eslRate =parseFloat(document.getElementById('eslRate'+sno).value);
|
||||||
var hraAmt =parseFloat(document.getElementById('hraAmt'+sno).value);
|
var hraAmt =parseFloat(document.getElementById('hraAmt'+sno).value);
|
||||||
|
// var Balance_Amount =parseFloat(document.getElementById('Balance'+sno).value);
|
||||||
|
var loanamt =parseFloat(document.getElementById('loanamt'+sno).value);
|
||||||
|
var paidamt =parseFloat(document.getElementById('paidamt'+sno).value);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//con(incentie);
|
|
||||||
|
|
||||||
var dayWorkPaid=dayWorks+paidLeave;
|
var dayWorkPaid=dayWorks+paidLeave;
|
||||||
// console.log("day"+dayWorkPaid);
|
// console.log("day"+dayWorkPaid);
|
||||||
@ -600,10 +609,19 @@ function isCheckKeyCode(event){
|
|||||||
current_loan_amt = manualLoan;
|
current_loan_amt = manualLoan;
|
||||||
//alert('manual');
|
//alert('manual');
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
current_loan_amt = manualLoan;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
var Balance_Amount = loanamt - paidamt;
|
||||||
|
|
||||||
|
if(autoLoan > Balance_Amount) {
|
||||||
|
|
||||||
|
// current= Balance_Amount - autoLoan;
|
||||||
|
current_loan_amt = Balance_Amount;
|
||||||
|
|
||||||
|
|
||||||
|
//alert('HI');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// console.log(current_loan_amt);
|
// console.log(current_loan_amt);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user