Merge branch 'CI4-Application' of bitbucket.org:venbainformationtechnology/ria into CI4-Application

This commit is contained in:
VE10-Sanjeev 2024-08-20 04:52:05 +00:00
commit 66e2abb72c
3 changed files with 32 additions and 19 deletions

View File

@ -523,11 +523,11 @@ class Payslip extends BaseController
$TotalSalary = $value->TotalSalary; $TotalSalary = $value->TotalSalary;
$Food_Allowances = $value->Food_Allowances; $Food_Allowances = $value->Food_Allowances;
$Days_worked = $value->Days_worked; // working day $Days_worked = $value->Days_worked; // working day
$LOP_Days = $value->LOP_Days; // not working day $Sunday = $value->sunday_count; // Sunday count
$LOP_Days = $value->NoofDays - ($Days_worked + $Sunday); // not working day
$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
$due_start_date = $value->DueDate; $due_start_date = $value->DueDate;
@ -562,11 +562,10 @@ class Payslip extends BaseController
$Allowances = $value->Allowances; $Allowances = $value->Allowances;
$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;
$Incentive = 0; $Incentive = 0;
if (empty($MonthIncentive)) { if (empty($MonthIncentive)) {
$Incentive = $MasterIncentives; $Incentive = $MasterIncentives;
@ -592,15 +591,22 @@ class Payslip extends BaseController
//current day basic and hra salary //current day basic and hra salary
if ($value->is_management_team == 1)
{
$currentDayBasic = $dayBasic * $NoofDays;
$currentDayHra = $dayHra * $NoofDays;
} else {
$currentDayBasic = $dayBasic * $totalDaysWorked; $currentDayBasic = $dayBasic * $totalDaysWorked;
$currentDayHra = $dayHra * $totalDaysWorked; $currentDayHra = $dayHra * $totalDaysWorked;
}
//$totalSalary = $currentDayBasic + $currentDayHra + $totSalayOT; //$totalSalary = $currentDayBasic + $currentDayHra + $totSalayOT;
if ($TotalSalary <= 20000) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0;} if ($value->esi_applicable == 1) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0; }
$pfAmount = $currentDayBasic * $PF_Rate / 100; if ($value->pf_applicable == 1) { $pfAmount = $currentDayBasic * $PF_Rate / 100; } else { $pfAmount = 0; }
/** pf amount per day**/ /** pf amount per day**/
//echo $totalothour;die; //echo $totalothour;die;
@ -614,7 +620,6 @@ class Payslip extends BaseController
// echo $Incentive .'</br>'; // echo $Incentive .'</br>';
// die; // die;
$empSalarySub = $esiAmount + $pfAmount + $loan; $empSalarySub = $esiAmount + $pfAmount + $loan;
$salaryInCurrentday = $empSalaryAdd - $empSalarySub; $salaryInCurrentday = $empSalaryAdd - $empSalarySub;
@ -643,7 +648,7 @@ class Payslip extends BaseController
$data['month'] = $this->monthlypay_model->monthlyListing($current); $data['month'] = $this->monthlypay_model->monthlyListing($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 = [];
@ -659,11 +664,11 @@ class Payslip extends BaseController
$TotalSalary = $value->TotalSalary; $TotalSalary = $value->TotalSalary;
$Food_Allowances = $value->Food_Allowances; $Food_Allowances = $value->Food_Allowances;
$Days_worked = $value->Days_worked; // working day $Days_worked = $value->Days_worked; // working day
$LOP_Days = $value->LOP_Days; // not working day $Sunday = $value->sunday_count; // Sunday count
$LOP_Days = $value->NoofDays - ($Days_worked + $Sunday); // not working day
$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
$due_start_date = $value->DueDate; $due_start_date = $value->DueDate;
@ -732,15 +737,23 @@ class Payslip extends BaseController
//current day basic and hra salary //current day basic and hra salary
if ($value->is_management_team == 1)
{
$currentDayBasic = $dayBasic * $NoofDays;
$currentDayHra = $dayHra * $NoofDays;
} else {
$currentDayBasic = $dayBasic * $totalDaysWorked; $currentDayBasic = $dayBasic * $totalDaysWorked;
$currentDayHra = $dayHra * $totalDaysWorked; $currentDayHra = $dayHra * $totalDaysWorked;
}
//$totalSalary = $currentDayBasic + $currentDayHra + $totSalayOT; //$totalSalary = $currentDayBasic + $currentDayHra + $totSalayOT;
if ($TotalSalary <= 20000) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0;} if ($value->esi_applicable == 1) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0;}
$pfAmount = $currentDayBasic * $PF_Rate / 100; if ($value->pf_applicable == 1) { $pfAmount = $currentDayBasic * $PF_Rate / 100; } else { $pfAmount = 0;}
/** pf amount per day**/ /** pf amount per day**/
//echo $totalothour;die; //echo $totalothour;die;

View File

@ -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_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 $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.DateofJoining,t_employee_details.Designation,t_employee_details.esi_applicable,t_employee_details.pf_applicable,t_employee_details.is_management_team,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 = ?

View File

@ -193,7 +193,7 @@ $('html').bind('keypress', function(e)
<th>Manual Loan Due </th> <th>Manual Loan Due </th>
<th>Incentives in </th> <th>Incentives in </th>
<th>Other Deductions in </th> <th>TDS Deductions in </th>
<th>Festival Bonus in </th> <th>Festival Bonus in </th>
<th>Estimate in </th> <th>Estimate in </th>