CHANGE_INWARD_RIASE_CONFLICT_COMMIT
This commit is contained in:
commit
de44e11467
@ -203,36 +203,7 @@ class Employeedetails extends BaseController
|
|||||||
function AddNewEmployee()
|
function AddNewEmployee()
|
||||||
{
|
{
|
||||||
|
|
||||||
$validation = \Config\Services::validation();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// $this->validator->setRules([
|
|
||||||
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
|
|
||||||
// 'emailid'=> 'trim|required|valid_email',
|
|
||||||
// 'gender'=> 'callback_Gender_validate',
|
|
||||||
// 'MartialStatus'=> 'callback_Martial_validate',
|
|
||||||
// 'bloodgroup'=>'callback_Blood_validate',
|
|
||||||
// 'emergencycontactnumber'=> 'trim|required|min_length[10]|max_length[10]',
|
|
||||||
// 'desigination'=> 'callback_Des_validate',
|
|
||||||
// 'departmentname'=> 'callback_Dep_validate',
|
|
||||||
// 'eduqualifaction'=> 'callback_select_validate',
|
|
||||||
// 'referrercontno'=> 'trim|min_length[10]|max_length[10]',
|
|
||||||
// 'aadharno'=> 'trim|min_length[14]|max_length[14]',
|
|
||||||
// 'panno'=> 'trim|min_length[10]|max_length[10]',
|
|
||||||
// 'passportno'=> 'trim|min_length[9]|max_length[9]',
|
|
||||||
// 'accountno'=> 'trim|min_length[10]|max_length[20]',
|
|
||||||
// 'pfno'=> 'trim|min_length[22]|max_length[22]',
|
|
||||||
// 'esino'=> 'trim|min_length[10]|max_length[10]']);
|
|
||||||
|
|
||||||
// if ($this->validator->run() == FALSE) {
|
|
||||||
// $this->addemployee();
|
|
||||||
// //echo 'Validate method called';
|
|
||||||
// } else {
|
|
||||||
//echo 'Validate not method called';
|
|
||||||
$photo = $this->request->getFile('photo');
|
$photo = $this->request->getFile('photo');
|
||||||
$Picture = "";
|
$Picture = "";
|
||||||
if ($photo->isValid() && !$photo->hasMoved()) {
|
if ($photo->isValid() && !$photo->hasMoved()) {
|
||||||
@ -371,15 +342,11 @@ class Employeedetails extends BaseController
|
|||||||
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
||||||
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
||||||
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
||||||
|
|
||||||
$Allowances = $this->request->getPost('Allowances');
|
|
||||||
$PF_Rate = $this->request->getPost('PF_Rate');
|
$PF_Rate = $this->request->getPost('PF_Rate');
|
||||||
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
||||||
$Food_Allowances = $this->request->getPost('Food_Allowances');
|
|
||||||
$Incentives = $this->request->getPost('Incentives');
|
|
||||||
$CreateBy = $this->session->get('userId');
|
$CreateBy = $this->session->get('userId');
|
||||||
|
|
||||||
$emppay = array('EmpID' => $EmpID, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Created_By' => $CreateBy);
|
$emppay = array('EmpID' => $EmpID, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Created_By' => $CreateBy);
|
||||||
|
|
||||||
|
|
||||||
$this->emppaydate_model->addNewemppay($emppay);
|
$this->emppaydate_model->addNewemppay($emppay);
|
||||||
@ -803,34 +770,21 @@ class Employeedetails extends BaseController
|
|||||||
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
||||||
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
||||||
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
||||||
$Allowances = $this->request->getPost('Allowances');
|
|
||||||
$PF_Rate = $this->request->getPost('PF_Rate');
|
$PF_Rate = $this->request->getPost('PF_Rate');
|
||||||
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
||||||
$Food_Allowances = $this->request->getPost('Food_Allowances');
|
|
||||||
$Incentives = $this->request->getPost('Incentives');
|
|
||||||
$CreateBy = $this->session->get('userId');
|
$CreateBy = $this->session->get('userId');
|
||||||
$emppay = array('EmpID' => $EmpId, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Created_By' => $CreateBy);
|
$emppay = array('EmpID' => $EmpId, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Created_By' => $CreateBy);
|
||||||
|
|
||||||
|
|
||||||
$empPayUpdate = $this->emppaydate_model->editemppay($emppay);
|
$empPayUpdate = $this->emppaydate_model->editemppay($emppay);
|
||||||
|
|
||||||
if ($result + $empPayUpdate > 0) {
|
if ($result + $empPayUpdate > 0) {
|
||||||
|
|
||||||
|
|
||||||
// $this->session->set_flashdata('Success', $EmpId.'Employee Updated successfully!');
|
|
||||||
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
||||||
// echo "<script>alert('You Have Successfully updated the Employee Record!');</script>";
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// $this->session->set_flashdata('Error', $EmpId . 'Employee details not saved');
|
|
||||||
$this->session->setFlashdata('error', 'Record Not Updated!');
|
$this->session->setFlashdata('error', 'Record Not Updated!');
|
||||||
// echo "<script>alert('Record Not Updated!');</script>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return redirect()->route('employeeListing');
|
return redirect()->route('employeeListing');
|
||||||
// redirect('employeeListing');
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportemployee()
|
function exportemployee()
|
||||||
|
|||||||
@ -56,13 +56,9 @@ class Emppaydate extends BaseController
|
|||||||
*/
|
*/
|
||||||
function emppayListing()
|
function emppayListing()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$data['userRecords'] = $this->emppaydate_model->emppayListing();
|
$data['userRecords'] = $this->emppaydate_model->emppayListing();
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Employee Pay List';
|
$this->global['pageTitle'] = 'Employee Loan List';
|
||||||
|
|
||||||
$this->loadViews("emppayListing", $this->global, $data, NULL);
|
$this->loadViews("emppayListing", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,12 +67,8 @@ class Emppaydate extends BaseController
|
|||||||
*/
|
*/
|
||||||
function addemppaydate()
|
function addemppaydate()
|
||||||
{
|
{
|
||||||
$q = "addemppaydate";
|
|
||||||
|
|
||||||
|
|
||||||
$result['empdetails'] = $this->payroll_model->getEmpID($q);
|
|
||||||
|
|
||||||
|
|
||||||
|
$result['empdetails'] = $this->payroll_model->getEmpID();
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Add Employee Pay';
|
$this->global['pageTitle'] = 'Add Employee Pay';
|
||||||
|
|
||||||
@ -88,71 +80,29 @@ class Emppaydate extends BaseController
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
helper('form'); //$this->load->library('form_validation');
|
|
||||||
$EmpID = $this->request->getPost('EmpID');
|
|
||||||
// $this->validator->setRules([
|
|
||||||
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
|
|
||||||
// 'EmpID'=> 'trim|required',
|
|
||||||
// 'HRA_Rate'=> 'trim|required',
|
|
||||||
// 'HRA_Amount'=> 'trim|required',
|
|
||||||
// 'Basic_Pay'=> 'trim|required',
|
|
||||||
// 'Total_salary'=> 'trim|required',
|
|
||||||
// 'Allowances'=> 'trim|required',
|
|
||||||
// 'PF_Rate'=> 'trim|required',
|
|
||||||
// 'ESI_Rate'=> 'trim|required',
|
|
||||||
// 'Food_Allowances'=> 'trim|required',
|
|
||||||
// 'Incentives'=> 'trim|required']);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if ($this->validator->run() == FALSE || $EmpID == -1) {
|
|
||||||
// $this->addemppaydate();
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
$EmpID = $this->request->getPost('EmpID');
|
$EmpID = $this->request->getPost('EmpID');
|
||||||
$Total_Salary = $this->request->getPost('Total_salary');
|
|
||||||
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
|
||||||
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
|
||||||
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
|
||||||
|
|
||||||
$Allowances = $this->request->getPost('Allowances');
|
|
||||||
$PF_Rate = $this->request->getPost('PF_Rate');
|
|
||||||
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
|
||||||
$Food_Allowances = $this->request->getPost('Food_Allowances');
|
|
||||||
$Incentives = $this->request->getPost('Incentives');
|
|
||||||
|
|
||||||
$Loan_Amount = $this->request->getPost('Loan_Amount');
|
$Loan_Amount = $this->request->getPost('Loan_Amount');
|
||||||
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
||||||
if (!empty($Load_Issued_date)) {
|
if (!empty($Load_Issued_date)) { $Load_Issued_date = format_date($Load_Issued_date); } else { $Load_Issued_date = null; }
|
||||||
$Load_Issued_date = $Load_Issued_date = format_date($Load_Issued_date);
|
|
||||||
} else {
|
|
||||||
$Load_Issued_date = null;
|
|
||||||
}
|
|
||||||
$Due_Amount = $this->request->getPost('monthly_due');
|
$Due_Amount = $this->request->getPost('monthly_due');
|
||||||
$Due_Started = $this->request->getPost('due_started');
|
$Due_Started = $this->request->getPost('due_started');
|
||||||
if (!empty($Due_Started)) {
|
if (!empty($Due_Started)) {$Due_Started = format_date($Due_Started);} else { $Due_Started = null; }
|
||||||
$Due_Started = $Due_Started = format_date($Due_Started);
|
|
||||||
} else {
|
|
||||||
$Due_Started = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$No_Of_Dues = $this->request->getPost('no_of_due');
|
$No_Of_Dues = $this->request->getPost('no_of_due');
|
||||||
$Paid_due = $this->request->getPost('paid_due');
|
$Paid_due = $this->request->getPost('paid_due');
|
||||||
$Remaining_Due = $this->request->getPost('remaining_due');
|
$Remaining_Due = $this->request->getPost('remaining_due');
|
||||||
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$CreateBy = $this->session->get('userId');
|
$CreateBy = $this->session->get('userId');
|
||||||
$chked = $this->request->getPost('is_Active');
|
|
||||||
$IsActive = '1';
|
|
||||||
|
|
||||||
$emppay = array('EmpID' => $EmpID, 'TotalSalary' => $Total_Salary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Created_By' => $CreateBy);
|
|
||||||
|
|
||||||
$loandetails = array('EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Created_By' => $CreateBy);
|
$loandetails = array('EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Created_By' => $CreateBy);
|
||||||
|
|
||||||
|
|
||||||
$result = $this->emppaydate_model->addNewemppay($emppay);
|
|
||||||
if ($Loan_Amount != 0) {
|
if ($Loan_Amount != 0) {
|
||||||
$result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'add');
|
$result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'add');
|
||||||
if ($result2 > 0) {
|
if ($result2 > 0) {
|
||||||
@ -161,17 +111,8 @@ class Emppaydate extends BaseController
|
|||||||
echo "<script>alert('Something Went Wrong..! Loan Information Not Saved. Try later..!');</script>";
|
echo "<script>alert('Something Went Wrong..! Loan Information Not Saved. Try later..!');</script>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($result > 0) {
|
|
||||||
echo "<script type='text/javascript'>alert('Employee Pay List Created successfully!');
|
|
||||||
window.location = '".base_url()."emppayListings';</script>";
|
|
||||||
} else {
|
|
||||||
echo "<script type='text/javascript'>alert('Employee Pay List Not Created!');
|
|
||||||
window.location = '".base_url()."emppayListings';</script>";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//}
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -197,72 +138,26 @@ class Emppaydate extends BaseController
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
helper('form'); //$this->load->library('form_validation');
|
|
||||||
|
|
||||||
$Pay_Data_ID = $this->request->getPost('Pay_Data_ID');
|
|
||||||
|
|
||||||
//'Pay_Data_ID'=>'trim|required';
|
|
||||||
// $this->validator->setRules([
|
|
||||||
// 'EmpID'=> 'trim|required',
|
|
||||||
// 'Total_Salary'=> 'trim|required',
|
|
||||||
// 'Basic_Pay'=> 'trim|required',
|
|
||||||
// 'HRA_Rate'=> 'trim|required',
|
|
||||||
// 'Allowances'=> 'trim|required',
|
|
||||||
// 'PF_Rate'=> 'trim|required',
|
|
||||||
// 'ESI_Rate'=> 'trim|required',
|
|
||||||
// 'Food_Allowances'=> 'trim|required',
|
|
||||||
// 'Incentives'=> 'trim|required']);
|
|
||||||
|
|
||||||
// if ($this->validator->run() == FALSE) {
|
|
||||||
|
|
||||||
// $this->editOldemppay($Pay_Data_ID);
|
|
||||||
// } else {
|
|
||||||
|
|
||||||
$Pay_Data_ID = $this->request->getPost('Pay_Data_ID');
|
|
||||||
$EmpID = $this->request->getPost('EmpID');
|
$EmpID = $this->request->getPost('EmpID');
|
||||||
$TotalSalary = $this->request->getPost('Total_Salary');
|
|
||||||
$Basic_Pay = $this->request->getPost('Basic_Pay');
|
|
||||||
$HRA_Rate = $this->request->getPost('HRA_Rate');
|
|
||||||
$HRA_Amount = $this->request->getPost('HRA_Amount');
|
|
||||||
|
|
||||||
$Allowances = $this->request->getPost('Allowances');
|
|
||||||
$PF_Rate = $this->request->getPost('PF_Rate');
|
|
||||||
$ESI_Rate = $this->request->getPost('ESI_Rate');
|
|
||||||
$loan_ID = $this->request->getPost('loanid');
|
$loan_ID = $this->request->getPost('loanid');
|
||||||
$Loan_Amount = $this->request->getPost('Loan_Amount');
|
$Loan_Amount = $this->request->getPost('Loan_Amount');
|
||||||
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
||||||
if (!empty($Load_Issued_date)) {
|
if (!empty($Load_Issued_date)) {$Load_Issued_date = format_date($Load_Issued_date);} else { $Load_Issued_date = null; }
|
||||||
$Load_Issued_date = format_date($Load_Issued_date);
|
|
||||||
} else {
|
|
||||||
$Load_Issued_date = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$Due_Amount = $this->request->getPost('monthly_due');
|
$Due_Amount = $this->request->getPost('monthly_due');
|
||||||
$Due_Started = $this->request->getPost('due_started');
|
$Due_Started = $this->request->getPost('due_started');
|
||||||
if (!empty($Due_Started)) {
|
if (!empty($Due_Started)) {$Due_Started = format_date($Due_Started); } else { $Due_Started = null; }
|
||||||
$Due_Started = format_date($Due_Started);
|
|
||||||
} else {
|
|
||||||
$Due_Started = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//echo $Load_Issued_date. "-" . $Due_Started;die();
|
|
||||||
$No_Of_Dues = $this->request->getPost('no_of_due');
|
$No_Of_Dues = $this->request->getPost('no_of_due');
|
||||||
$Paid_due = $this->request->getPost('paid_due');
|
$Paid_due = $this->request->getPost('paid_due');
|
||||||
$Remaining_Due = $this->request->getPost('remaining_due');
|
$Remaining_Due = $this->request->getPost('remaining_due');
|
||||||
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
||||||
$is_Active = $this->request->getPost('is_Active');
|
|
||||||
$Last_Mod_By = $this->session->get('userId');
|
$Last_Mod_By = $this->session->get('userId');
|
||||||
$Last_Mod_Time = date('d-m-Y h:i:sa');
|
|
||||||
$Food_Allowances = $this->request->getPost('Food_Allowances');
|
|
||||||
$Incentives = $this->request->getPost('Incentives');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$emppay = array('Pay_Data_ID' => $Pay_Data_ID, 'EmpID' => $EmpID, 'TotalSalary' => $TotalSalary, 'Basic_Pay' => $Basic_Pay, 'HRA_Rate' => $HRA_Rate, 'HRA_Amount' => $HRA_Amount, 'Allowances' => $Allowances, 'PF_Rate' => $PF_Rate, 'ESI_Rate' => $ESI_Rate, 'Food_Allowances' => $Food_Allowances, 'Incentives' => $Incentives, 'Last_Mod_By' => $Last_Mod_By);
|
|
||||||
|
|
||||||
$loandetails = array('Loan_ID' => $loan_ID, 'EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Last_Mod_By' => $Last_Mod_By);
|
$loandetails = array('Loan_ID' => $loan_ID, 'EmpID' => $EmpID, 'Loan_Amount' => $Loan_Amount, 'Loan_Issued_Date' => $Load_Issued_date, 'Monthly_Due' => $Due_Amount, 'Due_Start_Date' => $Due_Started, 'No_of_Dues' => $No_Of_Dues, 'Paid_Due' => $Paid_due, 'Remaining_Due' => $Remaining_Due, 'Paid_Amount' => $Paid_Amount, 'is_Active' => 1, 'Last_Mod_By' => $Last_Mod_By);
|
||||||
|
|
||||||
|
|
||||||
@ -284,18 +179,8 @@ class Emppaydate extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$result = $this->emppaydate_model->editemppay($emppay);
|
|
||||||
if ($result == true) {
|
|
||||||
echo "<script type='text/javascript'>alert('Employee Status Updated Sucessfully..!');
|
|
||||||
window.location = '".base_url()."emppayListings';</script>";
|
|
||||||
} else {
|
|
||||||
echo "<script type='text/javascript'>alert('Update Failed..!';
|
|
||||||
window.location = '".base_url()."emppayListings';</script>";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// redirect('emppaydate/emppayListing');
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) {
|
||||||
|
|
||||||
|
|
||||||
@ -520,34 +521,25 @@ class Payslip extends BaseController
|
|||||||
$HRA_Amount = $value->HRA_Amount;
|
$HRA_Amount = $value->HRA_Amount;
|
||||||
$Basic_Pay = $value->Basic_Pay;
|
$Basic_Pay = $value->Basic_Pay;
|
||||||
$TotalSalary = $value->TotalSalary;
|
$TotalSalary = $value->TotalSalary;
|
||||||
$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
|
||||||
|
|
||||||
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
||||||
|
|
||||||
$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,89 +555,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;
|
|
||||||
$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
|
|
||||||
|
|
||||||
$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;
|
$totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave;
|
||||||
/**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**/
|
if ($value->is_management_team == 1)
|
||||||
// echo $currentDayHra.'<br/>';
|
{
|
||||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
$currentDayBasic = $dayBasic * $NoofDays;
|
||||||
/** current date pf calculation**/
|
$currentDayHra = $dayHra * $NoofDays;
|
||||||
if ($TotalSalary <= 20000) {
|
|
||||||
|
|
||||||
$esiAmount = $currentDatePF * $ESI_Rate / 100;
|
|
||||||
/** esiamount not elgiable for 20000 **/
|
|
||||||
} else {
|
} else {
|
||||||
$esiAmount = 0;
|
$currentDayBasic = $dayBasic * $totalDaysWorked;
|
||||||
|
$currentDayHra = $dayHra * $totalDaysWorked;
|
||||||
}
|
}
|
||||||
$pfAmount = $currentDaySalary * $PF_Rate / 100;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($value->esi_applicable == 1) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0; }
|
||||||
|
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;
|
||||||
$empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
$empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT;
|
||||||
|
|
||||||
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
||||||
|
|
||||||
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
||||||
|
// echo $esiAmount .'</br>';
|
||||||
|
// echo $pfAmount .'</br>';
|
||||||
|
// echo $loan .'</br>';
|
||||||
|
// echo $empSalarySub .'</br>';
|
||||||
|
// echo $empSalaryAdd .'</br>';
|
||||||
|
// echo $salaryInCurrentday .'</br>';
|
||||||
|
// die;
|
||||||
|
|
||||||
$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;
|
||||||
|
|
||||||
|
// dd($data);
|
||||||
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
|
||||||
$this->global['pageTitle'] = 'Payroll Monthly Inputs';
|
$this->global['pageTitle'] = 'Payroll Monthly Inputs';
|
||||||
$this->loadViews("monthlypayinputs", $this->global, $data, NULL);
|
$this->loadViews("monthlypayinputs", $this->global, $data, NULL);
|
||||||
}
|
}
|
||||||
@ -657,30 +636,29 @@ 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']);
|
//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;
|
||||||
$Basic_Pay = $value->Basic_Pay;
|
$Basic_Pay = $value->Basic_Pay;
|
||||||
$TotalSalary = $value->TotalSalary;
|
$TotalSalary = $value->TotalSalary;
|
||||||
$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
|
||||||
|
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
||||||
$due_start_date = $value->DueDate;
|
$due_start_date = $value->DueDate;
|
||||||
$paydate = $current; //From POST parm
|
$paydate = $current; //From POST parm
|
||||||
|
|
||||||
@ -693,18 +671,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 +683,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,87 +690,75 @@ 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;
|
|
||||||
$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
|
|
||||||
|
|
||||||
$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;
|
$totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave;
|
||||||
/**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**/
|
if ($value->is_management_team == 1)
|
||||||
// echo $currentDayHra.'<br/>';
|
{
|
||||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
$currentDayBasic = $dayBasic * $NoofDays;
|
||||||
/** current date pf calculation**/
|
$currentDayHra = $dayHra * $NoofDays;
|
||||||
if ($TotalSalary <= 20000) {
|
|
||||||
|
|
||||||
$esiAmount = $currentDatePF * $ESI_Rate / 100;
|
|
||||||
/** esiamount not elgiable for 20000 **/
|
|
||||||
} else {
|
} else {
|
||||||
$esiAmount = 0;
|
$currentDayBasic = $dayBasic * $totalDaysWorked;
|
||||||
|
$currentDayHra = $dayHra * $totalDaysWorked;
|
||||||
}
|
}
|
||||||
$pfAmount = $currentDaySalary * $PF_Rate / 100;
|
|
||||||
|
|
||||||
|
|
||||||
|
//$totalSalary = $currentDayBasic + $currentDayHra + $totSalayOT;
|
||||||
|
|
||||||
|
|
||||||
|
if ($value->esi_applicable == 1) { $esiAmount = $currentDayBasic * $ESI_Rate / 100; } else { $esiAmount = 0;}
|
||||||
|
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;
|
||||||
$empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
$empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT;
|
||||||
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
||||||
|
|
||||||
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
$salaryInCurrentday = $empSalaryAdd - $empSalarySub;
|
||||||
|
|
||||||
|
// echo $esiAmount .'</br>';
|
||||||
|
// echo $pfAmount .'</br>';
|
||||||
|
// echo $loan .'</br>';
|
||||||
|
// echo $empSalarySub .'</br>';
|
||||||
|
// echo $empSalaryAdd .'</br>';
|
||||||
|
// echo $salaryInCurrentday .'</br>';
|
||||||
|
// die;
|
||||||
|
|
||||||
$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;
|
||||||
|
// dd($data);
|
||||||
//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';
|
||||||
$this->loadViews("monthlypayinputs", $this->global, $data, NULL);
|
$this->loadViews("monthlypayinputs", $this->global, $data, NULL);
|
||||||
@ -847,9 +804,9 @@ class Payslip extends BaseController
|
|||||||
|
|
||||||
$ErrorFlag = 0;
|
$ErrorFlag = 0;
|
||||||
|
|
||||||
$Emp = $j['Employee'];
|
|
||||||
|
|
||||||
$EmpID = substr($Emp, 0, 4);
|
|
||||||
|
$EmpID = $j['Emp ID'];
|
||||||
|
|
||||||
//$Name = $j['Employee Name'];
|
//$Name = $j['Employee Name'];
|
||||||
//echo $EmpID; die;
|
//echo $EmpID; die;
|
||||||
@ -858,10 +815,10 @@ class Payslip extends BaseController
|
|||||||
$LOP_Days = $j['LOP Days'];
|
$LOP_Days = $j['LOP Days'];
|
||||||
$Paid_leave = $j['Paid Leave'];
|
$Paid_leave = $j['Paid Leave'];
|
||||||
$OT_Hrs_Worked = $j['OT Hrs'];
|
$OT_Hrs_Worked = $j['OT Hrs'];
|
||||||
$Loan_Recovered = $j['Manual Loan Due ₹'];
|
$Loan_Recovered = $j['Auto Loan Due ₹'];
|
||||||
$Incentives = $j['Incentives in ₹'];
|
// $Incentives = $j['Incentives in ₹'];
|
||||||
$Festival_Bonus = $j['Festival Bonus in ₹'];
|
$Festival_Bonus = $j['Festival Bonus in ₹'];
|
||||||
$Other_Deductions = $j['Other Deductions in ₹'];
|
$Other_Deductions = $j['TDS Deductions in ₹'];
|
||||||
$Estimate = $j['Estimate in ₹'];
|
$Estimate = $j['Estimate in ₹'];
|
||||||
$Created_By = $this->session->get('userId');
|
$Created_By = $this->session->get('userId');
|
||||||
|
|
||||||
@ -906,11 +863,11 @@ class Payslip extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$Incentives_first = explode(".", $Incentives);
|
// $Incentives_first = explode(".", $Incentives);
|
||||||
if (!is_numeric($Incentives) || (strlen((string)$Incentives)) > 8 || (strlen((string)$Incentives_first[0])) > 5) {
|
// if (!is_numeric($Incentives) || (strlen((string)$Incentives)) > 8 || (strlen((string)$Incentives_first[0])) > 5) {
|
||||||
//echo $EmpID . "-Loan Recoverd Invalid Data!";
|
// //echo $EmpID . "-Loan Recoverd Invalid Data!";
|
||||||
$ErrorFlag++;
|
// $ErrorFlag++;
|
||||||
}
|
// }
|
||||||
|
|
||||||
$Festivalbonus_first = explode(".", $Festival_Bonus);
|
$Festivalbonus_first = explode(".", $Festival_Bonus);
|
||||||
if (!is_numeric($Festival_Bonus) || (strlen((string)$Festival_Bonus)) > 8 || (strlen((string)$Festivalbonus_first[0])) > 5) {
|
if (!is_numeric($Festival_Bonus) || (strlen((string)$Festival_Bonus)) > 8 || (strlen((string)$Festivalbonus_first[0])) > 5) {
|
||||||
@ -944,29 +901,24 @@ class Payslip extends BaseController
|
|||||||
|
|
||||||
foreach ($json as $index => $j) {
|
foreach ($json as $index => $j) {
|
||||||
|
|
||||||
$Emp = $j['Employee'];
|
|
||||||
|
|
||||||
// $EmpID = substr($Emp, 0, 4);
|
|
||||||
$parts = explode("-", $Emp);
|
|
||||||
$EmpID = $parts[0];
|
|
||||||
|
|
||||||
//$Name = $j['Employee'];
|
|
||||||
|
|
||||||
|
$EmpID = $j['Emp ID'];
|
||||||
$DaysWorked = $j['Days Worked'];
|
$DaysWorked = $j['Days Worked'];
|
||||||
$LOP_Days = $j['LOP Days'];
|
$LOP_Days = isset($j['LOP Days']) ? $j['LOP Days'] : 0.00;
|
||||||
$Paid_leave = $j['Paid Leave'];
|
$Paid_leave = isset($j['Paid Leave']) ? $j['Paid Leave'] : 0.00;
|
||||||
$OT_Hrs_Worked = $j['OT Hrs'];
|
$OT_Hrs_Worked = isset($j['OT Hrs']) ? $j['OT Hrs'] : 0.00;
|
||||||
$Loan_Recovered = isset($j['Manual Loan Due ₹']) ? $j['Manual Loan Due ₹'] : 0.00;
|
$Loan_Recovered = isset($j['Auto Loan Due ₹']) ? $j['Auto Loan Due ₹'] : 0.00;
|
||||||
if (is_string($Loan_Recovered)) {
|
// if (is_string($Loan_Recovered)) {
|
||||||
$Loan_Recovered = strtoupper($Loan_Recovered);
|
// $Loan_Recovered = strtoupper($Loan_Recovered);
|
||||||
}
|
// }
|
||||||
$Incentives = isset($j['Incentives in ₹']) ? $j['Incentives in ₹'] : 0.00 ;
|
// $Incentives = isset($j['Incentives in ₹']) ? $j['Incentives in ₹'] : 0.00 ;
|
||||||
$Festival_Bonus = isset($j['Festival Bonus in ₹']) ? $j['Festival Bonus in ₹'] : 0.00;
|
$Festival_Bonus = isset($j['Festival Bonus in ₹']) ? $j['Festival Bonus in ₹'] : 0.00;
|
||||||
$Other_Deductions = isset($j['Other Deductions in ₹']) ? $j['Other Deductions in ₹'] : 0.00;
|
$tds_Deductions = isset($j['TDS Deductions in ₹']) ? $j['TDS Deductions in ₹'] : 0.00;
|
||||||
$Estimate = isset($j['Estimate in ₹']) ? $j['Estimate in ₹'] : 0.00;
|
$Estimate = isset($j['Estimate in ₹']) ? $j['Estimate in ₹'] : 0.00;
|
||||||
$Created_By = $this->session->get('userId');
|
$Created_By = $this->session->get('userId');
|
||||||
|
|
||||||
$monthlypaydata = array('Month_Year' => $month, 'EmpID' => $EmpID, 'Days_worked' => $DaysWorked, 'LOP_Days' => $LOP_Days, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OT_Hrs_Worked, 'Loan_Recovered' => $Loan_Recovered, 'Incentives' => $Incentives, 'Festival_Bonus' => $Festival_Bonus, 'Other_Deductions' => $Other_Deductions, 'Estimate' => $Estimate, 'Created_By' => $Created_By);
|
$monthlypaydata = array('Month_Year' => $month, 'EmpID' => $EmpID, 'Days_worked' => $DaysWorked, 'LOP_Days' => $LOP_Days, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OT_Hrs_Worked, 'Festival_Bonus' => $Festival_Bonus, 'Other_Deductions' => $tds_Deductions, 'Estimate' => $Estimate, 'Created_By' => $Created_By ,'Loan_Recovered'=>$Loan_Recovered);
|
||||||
// print_r($monthlypaydata); die;
|
// print_r($monthlypaydata); die;
|
||||||
$result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata);
|
$result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata);
|
||||||
$total = $total + $result;
|
$total = $total + $result;
|
||||||
@ -1016,8 +968,6 @@ class Payslip extends BaseController
|
|||||||
|
|
||||||
$Data['Payon'] = $this->payroll_model->getPayOn();
|
$Data['Payon'] = $this->payroll_model->getPayOn();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Payroll Generater';
|
$this->global['pageTitle'] = 'Payroll Generater';
|
||||||
|
|
||||||
$this->loadViews("payslipgenerate", $this->global, $Data, NULL);
|
$this->loadViews("payslipgenerate", $this->global, $Data, NULL);
|
||||||
@ -1038,6 +988,7 @@ class Payslip extends BaseController
|
|||||||
$id = $this->request->getPost('id1');
|
$id = $this->request->getPost('id1');
|
||||||
|
|
||||||
$result = $this->payroll_model->getEmployeelist2($id);
|
$result = $this->payroll_model->getEmployeelist2($id);
|
||||||
|
|
||||||
$HTML = "";
|
$HTML = "";
|
||||||
|
|
||||||
if (count($result) > 0) {
|
if (count($result) > 0) {
|
||||||
|
|||||||
@ -15,9 +15,10 @@ class Emppaydate_model extends Model
|
|||||||
*/
|
*/
|
||||||
function emppayListing()
|
function emppayListing()
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_emp_pay_data')
|
$builder = $this->db->table('t_loan_master')
|
||||||
->select('t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.LastName')
|
->select('t_loan_master.*,t_emp_pay_data.*,t_employee_details.FirstName')
|
||||||
->join('t_employee_details','t_emp_pay_data.EmpID=t_employee_details.EmpID');
|
->join('t_employee_details','t_loan_master.EmpID = t_employee_details.EmpID','LEFT')
|
||||||
|
->join('t_emp_pay_data','t_loan_master.EmpID = t_emp_pay_data.EmpID','LEFT');
|
||||||
$query =$builder->get();
|
$query =$builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@ -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.*,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 = ?
|
||||||
@ -206,7 +206,7 @@ class Monthlypay_model extends Model
|
|||||||
|
|
||||||
$count = $res[0]['count'];
|
$count = $res[0]['count'];
|
||||||
}
|
}
|
||||||
// print_r($data);die;
|
|
||||||
|
|
||||||
if ($count == 0) {
|
if ($count == 0) {
|
||||||
$builder = $this->db->table('t_monthly_pay_inputs');
|
$builder = $this->db->table('t_monthly_pay_inputs');
|
||||||
|
|||||||
@ -373,14 +373,12 @@ class Payroll_model extends Model
|
|||||||
$this->db->table('t_payroll')->delete(['PayOn' => $PayOn]);
|
$this->db->table('t_payroll')->delete(['PayOn' => $PayOn]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEmpID($q = '')
|
function getEmpID()
|
||||||
{
|
{
|
||||||
|
|
||||||
$builder = $this->db->table('t_employee_details')
|
$builder = $this->db->table('t_employee_details')
|
||||||
->select('EmpID,FirstName,LastName');
|
->select('EmpID,FirstName,LastName');
|
||||||
if ($q == "addemppaydate") {
|
|
||||||
$builder->where('EmpID NOT IN (SELECT EmpID from t_emp_pay_data)', NULL, FALSE);
|
|
||||||
}
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1660,12 +1660,10 @@ Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,Tax.*,
|
|||||||
Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem
|
Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem
|
||||||
join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO
|
join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO
|
||||||
join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||||
|
left join t_import_tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||||
join t_import_tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
|
||||||
join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
||||||
left join t_employee_details emp on Req.Requestedby = emp.EmpID
|
left join t_employee_details emp on Req.Requestedby = emp.EmpID
|
||||||
|
left join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode where LineItem.PONO =?';
|
||||||
join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode where LineItem.PONO =?';
|
|
||||||
//print_r($subQuery);
|
//print_r($subQuery);
|
||||||
|
|
||||||
$query = $this->db->query($subQuery, array($PONO));
|
$query = $this->db->query($subQuery, array($PONO));
|
||||||
@ -1720,7 +1718,7 @@ left join t_employee_details emp on Req.Requestedby = emp.EmpID
|
|||||||
Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem
|
Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem
|
||||||
join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO
|
join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO
|
||||||
join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||||
join t_service_tax ServiceTax on ServiceTax.LineItemNo = LineItem.LineItemNo
|
left join t_service_tax ServiceTax on ServiceTax.LineItemNo = LineItem.LineItemNo
|
||||||
join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
||||||
join t_employee_details emp on Req.Requestedby = emp.EmpID
|
join t_employee_details emp on Req.Requestedby = emp.EmpID
|
||||||
|
|
||||||
|
|||||||
@ -394,7 +394,7 @@ function onlyAlphabets(evt) {
|
|||||||
|
|
||||||
|
|
||||||
function validatePF() {
|
function validatePF() {
|
||||||
var regpf = /^([a-zA-Z]){5}([0-9]){17}$/;
|
var regpf = /^\d{12}$/;
|
||||||
|
|
||||||
|
|
||||||
var PF = $('#pfno').val();
|
var PF = $('#pfno').val();
|
||||||
@ -906,44 +906,7 @@ legend {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Allowances">Allowances</span>
|
|
||||||
<input type="text" name="Allowances"
|
|
||||||
value="<?php echo set_value('Allowances'); ?>"
|
|
||||||
class="form-control num" style="text-transform:uppercase;"
|
|
||||||
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
|
|
||||||
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Food_Allowances">Food Allowances(Per Day)</span>
|
|
||||||
<input type="text" name="Food_Allowances"
|
|
||||||
value="<?php echo set_value('Food_Allowances'); ?>"
|
|
||||||
class="form-control num"
|
|
||||||
pattern="([0-9]{1,3}([.][0-9]{1,2})?)"
|
|
||||||
onfocusout="validateFood();"
|
|
||||||
title="Enter the Valid Food Allowances, Minimum 1 Digit, Maximum 3 Digits" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Incentives">Incentives</span>
|
|
||||||
<input type="text" name="Incentives"
|
|
||||||
value="<?php echo set_value('Incentives'); ?>"
|
|
||||||
class="form-control num" style="text-transform:uppercase;"
|
|
||||||
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
|
|
||||||
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@ -1005,8 +968,8 @@ legend {
|
|||||||
<input type="text" id="pfno" name="pfno" maxlength="22"
|
<input type="text" id="pfno" name="pfno" maxlength="22"
|
||||||
onchange="validatePF();" class="form-control"
|
onchange="validatePF();" class="form-control"
|
||||||
style="text-transform:uppercase"
|
style="text-transform:uppercase"
|
||||||
pattern="([a-zA-Z]){5}([0-9]){17}"
|
pattern="\d{12}"
|
||||||
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
|
title="12 Digit number"
|
||||||
onkeypress="return alpha(event);">
|
onkeypress="return alpha(event);">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -5,16 +5,21 @@ $(document).ready(function(){
|
|||||||
$("#loan_issued_date").datepicker({
|
$("#loan_issued_date").datepicker({
|
||||||
minDate: 'now',
|
minDate: 'now',
|
||||||
// maxDate : 'now',
|
// maxDate : 'now',
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
dateFormat: 'dd-mm-yy',
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true,
|
||||||
|
yearRange: '-100:+0'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#due_started").datepicker({
|
$("#due_started").datepicker({
|
||||||
minDate: 'now',
|
minDate: 'now',
|
||||||
//maxDate : 'now',
|
//maxDate : 'now',
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+1'
|
dateFormat: 'dd-mm-yy',
|
||||||
|
changeMonth: true,
|
||||||
|
changeYear: true,
|
||||||
|
yearRange: '-100:+1'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -27,7 +32,9 @@ $("#due_started").datepicker({
|
|||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<center><b><h3 class="box-title">Add Employee Pay</h3></b></center>
|
<center><b>
|
||||||
|
<h3 class="box-title">Add Employee Pay</h3>
|
||||||
|
</b></center>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
@ -44,197 +51,15 @@ $("#due_started").datepicker({
|
|||||||
|
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
|
|
||||||
<form role="form" id="addemppaydate" action="<?php echo base_url() ?>emppaydate/addNewemppay" method="post" name="addform" >
|
<form role="form" id="addemppaydate" action="<?php echo base_url() ?>emppaydate/addNewemppay"
|
||||||
|
method="post" name="addform">
|
||||||
|
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="col-md-12">
|
|
||||||
<legend>Pay Details</legend>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<!--<div class="col-md-4">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="Pay_Data_ID">Pay Data ID:</label><font color="Red">*</font>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
$data = array('name' => 'Pay_Data_ID','value' => set_value('Pay_Data_ID'), 'class' => 'form-control' ,'style'=>'text-transform:uppercase;');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="EmpID">Employee ID</span><font color="Red">*</font>
|
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$Employee = array("-1"=>'Select Employee');
|
|
||||||
|
|
||||||
if(!empty($empdetails)){
|
|
||||||
|
|
||||||
foreach($empdetails as $emp){
|
|
||||||
$EmpID=$emp->EmpID;
|
|
||||||
$Employee+= array($EmpID => $emp->EmpID . "-" . $emp->FirstName . "-" . $emp->LastName);
|
|
||||||
// $Employee = array_merge($Employee,$Employee1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//$data=array('name'=>'EmpID','value'=>$Employee,'id'=>'EmpID','class' => 'form-control');
|
|
||||||
$js = array('id'=> 'emp');
|
|
||||||
echo form_dropdown('EmpID', $Employee,set_value('EmpID'),'class="form-control"',$js);
|
|
||||||
//echo form_dropdown($data);
|
|
||||||
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Basic_Pay">Total Salary</span><font color="Red">*</font>
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'Total_salary','id' => 'Total_salary','value' => set_value('Total_salary'),'pattern' => '([0-9]{1,8}([.][0-9]{1,2})?)', 'class' => 'form-control num', 'style'=>'text-transform:uppercase;','title' => 'Enter Valid Total salary Amount,Minimum Four Digit Positive Number','onchange'=>'calculalteHRA();');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Basic_Pay">Basic Pay</span><font color="Red">*</font>
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'Basic_Pay','id' => 'Basic_Pay','value' => set_value('Basic_Pay'),'pattern' => '[0-9]{4,6}', 'class' => 'form-control num', 'style'=>'text-transform:uppercase;','title' => 'Enter Valid Basic Pay Amount,Minimum Four Digit Positive Number','readonly'=>'readonly');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="HRA_Rate">HRA Rate(%)</span><font color="Red">*</font>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'HRA_Rate','id'=>'HRA_Rate','value' => set_value('HRA_Rate'), 'class' => 'form-control num','style'=>'text-transform:uppercase;','pattern'=>'([0-9]{1,2}([.][0-9]{1,2})?)', 'title'=>'Enter the Valid HRA Rate,Minimum 1 digit,Maximum 2 digit','onfocusout'=>'validateHRA();','onchange'=>'calculalteHRA();');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div><!--row completed div-->
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="HRA_Rate">HRA Amount</span><font color="Red">*</font>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'HRA_Amount','id'=>'HRA_Amount','value' => set_value('HRA_Amount'), 'class' => 'form-control num','style'=>'text-transform:uppercase;','readonly'=>'readonly');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Allowances">Allowances</span><font color="Red">*</font>
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'Allowances','value' => set_value('Allowances'), 'class' => 'form-control num' ,'style'=>'text-transform:uppercase;','pattern'=>'([0-9]{1,5}([.][0-9]{1,2})?)','title'=>'Enter the Valid Allowances,Minimum 1 digit , Maximum 5 digit ');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="PF_Rate">PF Rate(%)</span><font color="Red">*</font>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'PF_Rate','value' => set_value('PF_Rate'),'class' => 'form-control num' ,'style'=>'text-transform:uppercase;','pattern'=>'([0-9]{1,2}([.][0-9]{1,2})?)', 'title'=>'Enter the valid PF Rate,Minimum 1 digit,Maximum 2 digit');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="ESI_Rate">ESI Rate(%)</span><font color="Red">*</font>
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'ESI_Rate','value' => set_value('ESI_Rate'), 'class' => 'form-control num' ,'style'=>'text-transform:uppercase;','pattern'=>'([0-9]{1,2}([.][0-9]{1,2})?)','title'=>'Enter the Valid ESI Rate,Minimum 1 digit,Maximum 2 digit');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div><!--row completed div-->
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--for food allowances-->
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Food_Allowances">Food Allowances(Per Day)</span><font color="Red">*</font>
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'Food_Allowances','value' => set_value('Food_Allowances'), 'class' => 'form-control num','pattern'=>'([0-9]{1,3}([.][0-9]{1,2})?)','onfocusout'=>'validateFood();', 'title'=>'Enter the Valid Food Allowances,Minimun 1 Digit,Maximum 3 Digit');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Incentives">Incentives</span><font color="Red">*</font>
|
|
||||||
<div class="form-group">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$data = array('name' => 'Incentives','value' => set_value('Incentives'), 'class' => 'form-control num' ,'style'=>'text-transform:uppercase;','pattern'=>'([0-9]{1,5}([.][0-9]{1,2})?)','title'=>'Enter the Valid Allowances,Minimum 1 digit , Maximum 5 digit ');
|
|
||||||
echo form_input($data);
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--row completed div-->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -243,13 +68,41 @@ $("#due_started").datepicker({
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<span for="EmpID">Employee ID</span>
|
||||||
|
<font color="Red">*</font>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$Employee = array("-1"=>'Select Employee');
|
||||||
|
|
||||||
|
if(!empty($empdetails)){
|
||||||
|
foreach($empdetails as $emp){
|
||||||
|
$EmpID=$emp->EmpID;
|
||||||
|
$Employee+= array($EmpID => $emp->EmpID . "-" . $emp->FirstName);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$js = array('id'=> 'emp');
|
||||||
|
echo form_dropdown('EmpID', $Employee,set_value('EmpID'),'class="form-control"',$js);
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
|
|
||||||
<span for="Pay_Data_ID">Loan Amount</span>
|
<span for="Pay_Data_ID">Loan Amount</span>
|
||||||
<input type="text" class="form-control num" id="Loan_Amount" name="Loan_Amount" value="0.00" pattern="([0-9]{1,7}([.][0-9]{1,2})?)" title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
<input type="text" class="form-control num" id="Loan_Amount"
|
||||||
|
name="Loan_Amount" value="0.00" pattern="([0-9]{1,7}([.][0-9]{1,2})?)"
|
||||||
|
title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -261,7 +114,8 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="EmpID">Loan Issue(d) Date</span>
|
<span for="EmpID">Loan Issue(d) Date</span>
|
||||||
<input type="text" class="form-control num" id="loan_issued_date" name="loan_issued_date" value="" onchange="dateCalulation();">
|
<input type="text" class="form-control num" id="loan_issued_date"
|
||||||
|
name="loan_issued_date" value="" onchange="dateCalulation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -271,7 +125,9 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="Basic_Pay">Monthly Due</span>
|
<span for="Basic_Pay">Monthly Due</span>
|
||||||
<input type="text" value="0.00" class="form-control num" id="monthly_due" name="monthly_due" value="" pattern="([0-9]{1,7}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 6 Digit" onchange="duecalculation();">
|
<input type="text" value="0.00" class="form-control num" id="monthly_due"
|
||||||
|
name="monthly_due" value="" pattern="([0-9]{1,7}([.][0-9]{1,2})?)"
|
||||||
|
title="Minimum 1 digit,Maximum 6 Digit" onchange="duecalculation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -279,7 +135,8 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="Basic_Pay">Due Started</span>
|
<span for="Basic_Pay">Due Started</span>
|
||||||
<input type="text" class="form-control requried num" id="due_started" name="due_started" value="" onchange="dateCalulation();">
|
<input type="text" class="form-control requried num" id="due_started"
|
||||||
|
name="due_started" value="" onchange="dateCalulation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -287,7 +144,9 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="Basic_Pay">No Of Due(s)</span>
|
<span for="Basic_Pay">No Of Due(s)</span>
|
||||||
<input type="text" value="0" class="form-control requried num" id="no_of_due" name="no_of_due" value="" pattern="[0-9]{1,2}" title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
<input type="text" value="0" class="form-control requried num"
|
||||||
|
id="no_of_due" name="no_of_due" value="" pattern="[0-9]{1,2}"
|
||||||
|
title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -295,7 +154,10 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="Basic_Pay">Paid Amount</span>
|
<span for="Basic_Pay">Paid Amount</span>
|
||||||
<input type="text" value="0.00" class="form-control requried num" id="Paid_Amount" name="Paid_Amount" value="0" pattern="([0-9]{1,7}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
<input type="text" value="0.00" class="form-control requried num"
|
||||||
|
id="Paid_Amount" name="Paid_Amount" value="0"
|
||||||
|
pattern="([0-9]{1,7}([.][0-9]{1,2})?)"
|
||||||
|
title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -303,7 +165,8 @@ $("#due_started").datepicker({
|
|||||||
<input type="hidden" id="paid_due" name="paid_due" value="0">
|
<input type="hidden" id="paid_due" name="paid_due" value="0">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-footer" style="text-align:right">
|
<div class="box-footer" style="text-align:right">
|
||||||
<input type="submit" class="btn btn-success" value="Submit" onmouseover="finalCheck();"/>
|
<input type="submit" class="btn btn-success" value="Submit"
|
||||||
|
onmouseover="finalCheck();" />
|
||||||
<input type="reset" class="btn btn-success" value="Reset" />
|
<input type="reset" class="btn btn-success" value="Reset" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -341,17 +204,18 @@ $("#due_started").datepicker({
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?> </div>
|
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- first row closed-->
|
</div> <!-- first row closed-->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div><!--content-wrapper closed-->
|
</div>
|
||||||
|
<!--content-wrapper closed-->
|
||||||
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
||||||
<script>
|
<script>
|
||||||
function calculalteHRA()
|
function calculalteHRA() {
|
||||||
{
|
|
||||||
//var empid=document.getElementById('emp').value;
|
//var empid=document.getElementById('emp').value;
|
||||||
//alert(empid);
|
//alert(empid);
|
||||||
var Totalsalary = document.getElementById('Total_salary').value;
|
var Totalsalary = document.getElementById('Total_salary').value;
|
||||||
@ -363,8 +227,7 @@ function calculalteHRA()
|
|||||||
} else if (Totalsalary == '') {
|
} else if (Totalsalary == '') {
|
||||||
alert("Please Enter Total Salary..");
|
alert("Please Enter Total Salary..");
|
||||||
document.getElementById('total_salary').focus();
|
document.getElementById('total_salary').focus();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
var temp = (Totalsalary * (HRA / 100));
|
var temp = (Totalsalary * (HRA / 100));
|
||||||
var basic = Totalsalary - temp;
|
var basic = Totalsalary - temp;
|
||||||
document.getElementById('Basic_Pay').value = basic;
|
document.getElementById('Basic_Pay').value = basic;
|
||||||
@ -374,32 +237,25 @@ function calculalteHRA()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function duecalculation()
|
function duecalculation() {
|
||||||
{
|
|
||||||
var totaldue = 0;
|
var totaldue = 0;
|
||||||
var loan = document.getElementById('Loan_Amount').value;
|
var loan = document.getElementById('Loan_Amount').value;
|
||||||
var due = document.getElementById('monthly_due').value;
|
var due = document.getElementById('monthly_due').value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(loan != 0)
|
if (loan != 0) {
|
||||||
{
|
if (due == 0) {
|
||||||
if(due == 0)
|
|
||||||
{
|
|
||||||
alert("Enter Monthly Due Amount....!");
|
alert("Enter Monthly Due Amount....!");
|
||||||
$('#monthly_due').focus();
|
$('#monthly_due').focus();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
totaldue = loan / due;
|
totaldue = loan / due;
|
||||||
|
|
||||||
if(totaldue < 1)
|
if (totaldue < 1) {
|
||||||
{
|
|
||||||
alert("Please Enter Correct Due Amount..!");
|
alert("Please Enter Correct Due Amount..!");
|
||||||
$('#monthly_due').focus();
|
$('#monthly_due').focus();
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
document.getElementById('no_of_due').value = Math.ceil(totaldue);
|
document.getElementById('no_of_due').value = Math.ceil(totaldue);
|
||||||
var noofdues = document.getElementById('no_of_due').value;
|
var noofdues = document.getElementById('no_of_due').value;
|
||||||
$('#remaining_due').val(noofdues);
|
$('#remaining_due').val(noofdues);
|
||||||
@ -414,12 +270,10 @@ function duecalculation()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function dateCalulation()
|
function dateCalulation() {
|
||||||
{
|
|
||||||
//alert('j');
|
//alert('j');
|
||||||
var loanamount = document.getElementById('Loan_Amount').value;
|
var loanamount = document.getElementById('Loan_Amount').value;
|
||||||
if(loanamount == 0.00 || loanamount == "")
|
if (loanamount == 0.00 || loanamount == "") {
|
||||||
{
|
|
||||||
$('#loan_issued_date').val("");
|
$('#loan_issued_date').val("");
|
||||||
$('#due_started').val("");
|
$('#due_started').val("");
|
||||||
$('#monthly_due').val("0.00");
|
$('#monthly_due').val("0.00");
|
||||||
@ -435,11 +289,9 @@ function dateCalulation()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function finalCheck()
|
function finalCheck() {
|
||||||
{
|
|
||||||
var loanamount = document.getElementById('Loan_Amount').value;
|
var loanamount = document.getElementById('Loan_Amount').value;
|
||||||
if(loanamount != "" && loanamount != 0.00)
|
if (loanamount != "" && loanamount != 0.00) {
|
||||||
{
|
|
||||||
var idate = document.getElementById('loan_issued_date').value;
|
var idate = document.getElementById('loan_issued_date').value;
|
||||||
var due = document.getElementById('monthly_due').value;
|
var due = document.getElementById('monthly_due').value;
|
||||||
var dsdate = document.getElementById('due_started').value;
|
var dsdate = document.getElementById('due_started').value;
|
||||||
@ -448,9 +300,4 @@ function finalCheck()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -69,14 +69,7 @@
|
|||||||
<div class="error" id="error"></div>
|
<div class="error" id="error"></div>
|
||||||
</form>
|
</form>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<table id="view_inward_gate_register" class="table dt-responsive nowrap w-100">
|
|
||||||
<thead>
|
|
||||||
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;font-size:12px;">
|
<table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -494,7 +494,7 @@ function validateESI() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function validatePF() {
|
function validatePF() {
|
||||||
var regpf = /^([a-zA-Z]){5}([0-9]){17}?$/;
|
var regpf = /^\d{12}$/;
|
||||||
|
|
||||||
var PF = $('#pfno').val();
|
var PF = $('#pfno').val();
|
||||||
|
|
||||||
@ -1198,47 +1198,6 @@ legend {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Allowances">Allowances</span>
|
|
||||||
<input type="text" name="Allowances"
|
|
||||||
value="<?php echo $empPay->Allowances; ?>"
|
|
||||||
class="form-control num"
|
|
||||||
style="text-transform:uppercase;"
|
|
||||||
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
|
|
||||||
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Food_Allowances">Food Allowances(Per Day)</span>
|
|
||||||
<input type="text" name="Food_Allowances"
|
|
||||||
value="<?php echo $empPay->Food_Allowances; ?>"
|
|
||||||
class="form-control num"
|
|
||||||
pattern="([0-9]{1,3}([.][0-9]{1,2})?)"
|
|
||||||
onfocusout="validateFood();"
|
|
||||||
title="Enter the Valid Food Allowances, Minimum 1 Digit, Maximum 3 Digits" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Incentives">Incentives</span>
|
|
||||||
<input type="text" name="Incentives"
|
|
||||||
value="<?php echo $empPay->Incentives; ?>"
|
|
||||||
class="form-control num"
|
|
||||||
style="text-transform:uppercase;"
|
|
||||||
pattern="([0-9]{1,5}([.][0-9]{1,2})?)"
|
|
||||||
title="Enter the Valid Allowances, Minimum 1 digit, Maximum 5 digits" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1307,8 +1266,8 @@ legend {
|
|||||||
value="<?php echo $pfno; ?>"
|
value="<?php echo $pfno; ?>"
|
||||||
onchange="validatePF();" class="form-control"
|
onchange="validatePF();" class="form-control"
|
||||||
style="text-transform:uppercase"
|
style="text-transform:uppercase"
|
||||||
pattern="([a-zA-Z]){5}([0-9]){17}"
|
pattern="\d{12}"
|
||||||
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
|
title="12 Digit number"
|
||||||
onkeypress="return alpha(event);">
|
onkeypress="return alpha(event);">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -145,7 +145,7 @@ if(!empty($emppay))
|
|||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<!--title-->
|
<!--title-->
|
||||||
<center>Edit Salary Payment Details</center>
|
<center>Edit Loan Details</center>
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
@ -165,14 +165,14 @@ if(!empty($emppay))
|
|||||||
|
|
||||||
<form role="form" id="edit" action="<?php echo base_url() ?>emppaydate/editemppay" method="post">
|
<form role="form" id="edit" action="<?php echo base_url() ?>emppaydate/editemppay" method="post">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<legend>Pay Details</legend>
|
<legend>Loan Details</legend>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<input type="hidden" readonly id="Pay_Data_ID" name="Pay_Data_ID" value="<?php echo $Pay_Data_ID; ?>">
|
<input type="hidden" readonly id="Pay_Data_ID" name="Pay_Data_ID" value="<?php echo $Pay_Data_ID; ?>">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -184,117 +184,6 @@ if(!empty($emppay))
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for ="Employee">Employee Name</span>
|
|
||||||
<input type="text" class="form-control" id="Empname" name="Empname" value="<?php echo $Empname; ?>" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Basic_Pay">Total Salary</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control requried num" id="Total_Salary" name="Total_Salary" value="<?php echo number_format($TotalSalary,0,'',''); ?>" pattern="([0-9]{1,8}([.][0-9]{1,2})?)" title="Minimum 4 digit,Maximum 6 Digit" onchange="calculateBasic();">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Basic_Pay">Basic Pay</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control requried num" id="Basic_Pay" name="Basic_Pay" value="<?php echo $Basic_Pay; ?>" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="HRA_Rate">HRA_Rate(%)</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control required num" id="HRA_Rate" name="HRA_Rate" value="<?php echo $HRA_Rate; ?>" pattern="([0-9]{1,2}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 2 Digit" onchange="calculateBasic();">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="HRA_Rate">HRA_Amount</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control required num" id="HRA_Amount" name="HRA_Amount" value="<?php echo number_format($HRA_Amount,0,'',''); ?>" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Allowances">Allowances</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control required num" id="Allowances" name="Allowances" value="<?php echo $Allowances; ?>" pattern="([0-9]{1,5}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 4 Digit">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="PF_Rate">PF_Rate(%)</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control required num" id="PF_Rate" name="PF_Rate" value="<?php echo $PF_Rate; ?>" pattern="([0-9]{1,2}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 2 Digit">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="ESI_Rate">ESI_Rate(%)</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control required num" id="ESI_Rate" name="ESI_Rate" value="<?php echo $ESI_Rate; ?>" pattern="([0-9]{1,2}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 2 Digit">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for ="Food_Allowances">Food Allowances(Per Day)</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control required num" id="Food_Allowances" name="Food_Allowances" value="<?php echo $Food_Allowances; ?>" pattern="([0-9]{1,3}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 3 Digit">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="form-group">
|
|
||||||
<span for="Incentives">Incentives</span><font color="Red">*</font>
|
|
||||||
<input type="text" class="form-control required num" id="Incentives" name="Incentives" value="<?php echo ($Incentives) ?>" pattern="([0-9]{1,5}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 5 Digit">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-12">
|
|
||||||
<legend>Loan Details</legend>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
|
|||||||
@ -4,14 +4,14 @@
|
|||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center>Employee Salary Details</center>
|
<center>Employee Loan Details</center>
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-right">
|
<div class="col-xs-12 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<a class="btn btn-success" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Add New Employee Pay List</a>
|
<a class="btn btn-success" href="<?php echo base_url(); ?>emppaydate/addemppaydate">Create New Loan</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,49 +25,39 @@
|
|||||||
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align: right;" >
|
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align: right;" >
|
||||||
<thead style="background-color: #ddd;">
|
<thead style="background-color: #ddd;">
|
||||||
<tr >
|
<tr >
|
||||||
<th width="7%">Emp ID</th>
|
<th width="15%">Employee</th>
|
||||||
<th width="8%">Emp Name</th>
|
<th width="7%"> Total Sal in ₹</th>
|
||||||
<th width="8%"> Total Sal in ₹</th>
|
<th width="7%"> Loan Amt in ₹</th>
|
||||||
<th width="8%">Basic Pay in ₹</th>
|
<th width="7%"> Loan Issued Date</th>
|
||||||
<th width="8%">HRA Rate in %</th>
|
<th width="7%"> Monthly Due Amt in ₹</th>
|
||||||
<th width="8%">HRA Amt in ₹</th>
|
<th width="7%"> No Of Dues</th>
|
||||||
|
<th width="7%"> Paid Dues</th>
|
||||||
<th width="9%">Allowances in ₹</th>
|
<th width="7%"> Remaining Dues</th>
|
||||||
<th width="8%">PF Ratein %</th>
|
<th width="7%"> Paid Amt in ₹</th>
|
||||||
<th width="8%">ESI Rate in %</th>
|
|
||||||
<th width="8%">Food Allow in ₹</th>
|
|
||||||
<th width="7%">Action</th>
|
<th width="7%">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if(!empty($userRecords))
|
if(!empty($userRecords)) { foreach($userRecords as $record) { ?>
|
||||||
{
|
|
||||||
//print_r($userRecords);
|
|
||||||
foreach($userRecords as $record)
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: left;"><?php echo $record->EmpID ?></td>
|
<td style="text-align: left;"><?php echo $record->EmpID ?>-<?php echo $record->FirstName;?></td>
|
||||||
<td style="text-align: left;"><?php echo $record->FirstName ." ". $record->LastName?></td>
|
|
||||||
<td><?php echo $record->TotalSalary; ?></td>
|
<td><?php echo $record->TotalSalary; ?></td>
|
||||||
<td><?php echo $record->Basic_Pay ?></td>
|
<td><?php echo $record->Loan_Amount; ?></td>
|
||||||
<td><?php echo $record->HRA_Rate ?></td>
|
<td><?php echo $record->Loan_Issued_Date; ?></td>
|
||||||
<td><?php echo $record->HRA_Amount; ?></td>
|
<td><?php echo $record->Monthly_Due; ?></td>
|
||||||
|
<td><?php echo $record->No_of_Dues; ?></td>
|
||||||
|
<td><?php echo $record->Paid_Due; ?></td>
|
||||||
|
<td><?php echo $record->Remaining_Due; ?></td>
|
||||||
|
<td><?php echo $record->Paid_Amount; ?></td>
|
||||||
|
|
||||||
<td><?php echo $record->Allowances ?></td>
|
|
||||||
<td><?php echo $record->PF_Rate ?></td>
|
|
||||||
<td><?php echo $record->ESI_Rate ?></td>
|
|
||||||
<td><?php echo $record->Food_Allowances ?></td>
|
|
||||||
<td>
|
<td>
|
||||||
<a href="<?php echo base_url().'emppaydate/editOldemppay/'.$record->Pay_Data_ID; ?>"><i class="btn btn-success">EDIT</i></a>
|
<a href="<?php echo base_url().'emppaydate/editOldemppay/'.$record->Pay_Data_ID; ?>"><i class="btn btn-success">EDIT</i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
|
||||||
}
|
<?php } }?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
|
|||||||
@ -71,6 +71,28 @@
|
|||||||
top: 7px;
|
top: 7px;
|
||||||
}
|
}
|
||||||
/* Select2 Height End */
|
/* Select2 Height End */
|
||||||
|
/* .navbar-custom{
|
||||||
|
height: 55px;
|
||||||
|
}
|
||||||
|
.logo-box .logo {
|
||||||
|
line-height: 55px;
|
||||||
|
}
|
||||||
|
.navbar-custom .topnav-menu .nav-link{
|
||||||
|
max-height: 55px;
|
||||||
|
line-height: 55px;
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.topnav {
|
||||||
|
height: 45px;
|
||||||
|
margin-top: 55px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.topnav .navbar-nav .nav-link{
|
||||||
|
line-height: 15px;
|
||||||
|
} */
|
||||||
|
.navbar-custom {
|
||||||
|
background-color: #4f7c97 !important;
|
||||||
|
}
|
||||||
th{
|
th{
|
||||||
background-color: #ddd !important;
|
background-color: #ddd !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,16 +39,12 @@
|
|||||||
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
$('html').bind('keypress', function(e) {
|
||||||
$('html').bind('keypress', function(e)
|
|
||||||
{
|
|
||||||
//alert('Key Pressed');
|
//alert('Key Pressed');
|
||||||
if(e.keyCode == 13)
|
if (e.keyCode == 13) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -73,10 +69,13 @@ $('html').bind('keypress', function(e)
|
|||||||
<!--<center><h3 class="box-title">-->
|
<!--<center><h3 class="box-title">-->
|
||||||
<div class="box-tools">
|
<div class="box-tools">
|
||||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||||
<p><b>The <span style="background-color:#ff4d4d;">Red</span> highlighted Employee have loan to pay. Put <span style="background-color:#66ff33;">'NA'</span> for Skip Current Month Loan Due.</b></p>
|
<p><b>The <span style="background-color:#ff4d4d;">Red</span> highlighted Employee have loan
|
||||||
|
to pay. Put <span style="background-color:#66ff33;">'NA'</span> for Skip Current
|
||||||
|
Month Loan Due.</b></p>
|
||||||
<form action="<?php echo base_url() ?>monthlyListings" method="POST" id="searchList">
|
<form action="<?php echo base_url() ?>monthlyListings" method="POST" id="searchList">
|
||||||
</form>
|
</form>
|
||||||
</div><!--</h3></center>-->
|
</div>
|
||||||
|
<!--</h3></center>-->
|
||||||
|
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<?php
|
<?php
|
||||||
@ -157,24 +156,42 @@ $('html').bind('keypress', function(e)
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px" >
|
|
||||||
|
<div style="overflow-x:scroll;">
|
||||||
|
<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>Incentives in ₹</th>
|
<th>TDS Deductions in ₹</th>
|
||||||
<th>Other Deductions in ₹</th>
|
|
||||||
<th>Festival Bonus in ₹</th>
|
<th>Festival Bonus in ₹</th>
|
||||||
|
|
||||||
<th>Estimate in ₹</th>
|
<th>Estimate in ₹</th>
|
||||||
@ -185,95 +202,143 @@ $('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)) { $index--; }else{ array_push($testarray,$record->EmpID);
|
||||||
if(in_array($record->EmpID,$testarray))
|
|
||||||
{
|
|
||||||
$index--;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
|
|
||||||
|
|
||||||
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;">
|
||||||
<!-- <td style="text-align:right;"><?php echo $record->EmpID ?></td> -->
|
<?php echo $index; ?></td>
|
||||||
<td style="max-width:80px"><?php echo $record->EmpID ."-".$record->FirstName ."". $record->LastName ?></td>
|
<td style="max-width:80px"><?php echo $record->EmpID ; ?></td>
|
||||||
|
<td style="max-width:80px"><?php echo $record->FirstName; ?></td>
|
||||||
|
<td style="max-width:80px">
|
||||||
<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>
|
<?php
|
||||||
|
$date = DateTime::createFromFormat('Y-m-d H:i:s', $record->DateofJoining);
|
||||||
<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>
|
$newDateFormat = $date->format('d-m-Y');
|
||||||
|
echo $newDateFormat;
|
||||||
<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="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="loanRecd<?php echo $index?>" onkeypress="return isCheckKeyCode(event);" onkeyup="changeInput(event);"<?php if(empty($record->Key) && !empty($record->Loan_ID)){ echo "contenteditable='true'; style='background-color:#ffcccc;text-align:right' title='Loan Pending'"; } ?> <?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->Loan_Recovered))
|
|
||||||
{if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.',''); $totalmanualoan[] = $record->Loan_Recovered;}else {echo $record->Loan_Recovered; $totalmanualoan[] = $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.','');} ?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
<td id="incentie<?php echo $index?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?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->MasterIncentives)){echo $record->MasterIncentives;}else {echo $record->MonthlyIncentives;} ?> -->
|
|
||||||
|
|
||||||
<?php if(!empty($record->MonthlyIncentives)){echo $record->MonthlyIncentives; $totalinst [] = $record->MonthlyIncentives;}else {echo $record->MasterIncentives; $totalinst [] = $record->MasterIncentives;}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</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="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 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 id="esiAmt<?php echo $index?>" style="max-width:80px"> <?php echo $esi[$i]; ?> </td>
|
||||||
|
<td id="pfAmt<?php echo $index?>" 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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php ?>
|
<?php ?>
|
||||||
<!-- else{ echo number_format(0.00,2,'.','');;} -->
|
<!-- else{ echo number_format(0.00,2,'.','');;} -->
|
||||||
|
|
||||||
<td id ="otherDet<?php echo $index?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?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->Other_Deductions)){echo $record->Other_Deductions;$totalotherDet [] = $record->Other_Deductions;}else{ echo number_format(0.00,2,'.','');} ?></td>
|
<td id="otherDet<?php echo $index?>" onkeypress="return isNumber(event);"onkeyup="changeInput(event);"
|
||||||
|
<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?>
|
||||||
|
<?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->Other_Deductions)){echo $record->Other_Deductions;$totalotherDet [] = $record->Other_Deductions;}else{ echo number_format(0.00,2,'.','');} ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
<?php $totalotherDet [] = isset($Other_Deductions) ? $Other_Deductions : [];?>
|
<?php $totalotherDet [] = isset($Other_Deductions) ? $Other_Deductions : [];?>
|
||||||
<td id="Festival<?php echo $index?>"onkeypress="return isNumber(event);" onkeyup="changeInput(event);"<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?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->Festival_Bonus)){echo $record->Festival_Bonus;$totalfestival [] = $record->Festival_Bonus;}else{ echo number_format(0.00,2,'.','');;} ?></td>
|
<td id="Festival<?php echo $index?>" onkeypress="return isNumber(event);"
|
||||||
|
onkeyup="changeInput(event);"
|
||||||
|
<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?>
|
||||||
|
<?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->Festival_Bonus)){echo $record->Festival_Bonus;$totalfestival [] = $record->Festival_Bonus;}else{ echo number_format(0.00,2,'.','');;} ?>
|
||||||
|
</td>
|
||||||
|
|
||||||
<?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?>"
|
||||||
}?></td>
|
<?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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -282,28 +347,38 @@ $('html').bind('keypress', function(e)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <input type="hidden" id = "eid" value="<?php echo $record->EmpID?>">
|
<input type="hidden" id="sunday<?php echo $index?>"
|
||||||
<input type="hidden" id = "inv" value="<?php echo $record->Incentives?>">
|
value="<?php echo $record->sunday_count?>">
|
||||||
<input type="hidden" id = "pdi" value="<?php echo $record->Pay_Data_ID?>"> -->
|
<input type="hidden" id="is_management_team<?php echo $index?>"
|
||||||
<input type="hidden" id = "bPay<?php echo $index?>" value="<?php echo $record->Basic_Pay?>">
|
value="<?php echo $record->is_management_team?>">
|
||||||
<input type="hidden" id = "hraRate<?php echo $index?>" value="<?php echo $record->HRA_Rate?>">
|
<input type="hidden" id="esi_applicable<?php echo $index?>"
|
||||||
<input type="hidden" id = "allow<?php echo $index?>" value="<?php echo $record->Allowances?>">
|
value="<?php echo $record->esi_applicable?>">
|
||||||
<input type="hidden" id = "fAllow<?php echo $index?>" value="<?php echo $record->Food_Allowances?>">
|
<input type="hidden" id="pf_applicable<?php echo $index?>"
|
||||||
<input type="hidden" id = "pfRate<?php echo $index?>" value="<?php echo $record->PF_Rate?>">
|
value="<?php echo $record->pf_applicable?>">
|
||||||
<input type="hidden" id = "eslRate<?php echo $index?>" value="<?php echo $record->ESI_Rate?>">
|
<input type="hidden" id="bPay<?php echo $index?>"
|
||||||
<input type="hidden" id = "hraAmt<?php echo $index?>" value="<?php echo $record->HRA_Amount?>">
|
value="<?php echo $record->Basic_Pay?>">
|
||||||
|
<input type="hidden" id="hraRate<?php echo $index?>"
|
||||||
|
value="<?php echo $record->HRA_Rate?>">
|
||||||
|
<input type="hidden" id="allow<?php echo $index?>"
|
||||||
|
value="<?php echo $record->Allowances?>">
|
||||||
|
<input type="hidden" id="fAllow<?php echo $index?>"
|
||||||
|
value="<?php echo $record->Food_Allowances?>">
|
||||||
|
<input type="hidden" id="pfRate<?php echo $index?>"
|
||||||
|
value="<?php echo $record->PF_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 = "loanamt<?php echo $index?>" value="<?php echo isset($record->Loan_amount) ? $record->Loan_amount : 0?>">
|
<input type="hidden" id="loanamt<?php echo $index?>"
|
||||||
<input type="hidden" id = "paidamt<?php echo $index?>" value="<?php echo $record->Paid_Amount?>">
|
value="<?php echo isset($record->Loan_Amount) ? $record->Loan_Amount : 0?>">
|
||||||
|
<input type="hidden" id="paidamt<?php echo $index?>"
|
||||||
|
value="<?php echo $record->Paid_Amount?>">
|
||||||
|
|
||||||
|
<input type="hidden" id="duedate<?php echo $index?>"
|
||||||
|
value="<?php echo $record->DueDate?>">
|
||||||
|
|
||||||
<input type="hidden" id = "duedate<?php echo $index?>" value="<?php echo $record->DueDate?>">
|
|
||||||
|
|
||||||
<!-- <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->Paid_leave?>">
|
|
||||||
<input type="hidden" id = "eid" value="<?php echo $record->OT_Hrs_Worked?>">
|
|
||||||
<input type="hidden" id = "eid" value="<?php echo $record->NoofDays?>">
|
|
||||||
<input type="hidden" id = "eid" value="<?php echo $record->Monthly_Due?>"> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -315,30 +390,37 @@ $('html').bind('keypress', function(e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//print_r($totalinst);
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot><tr>
|
|
||||||
<th colspan="5"></th>
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th colspan="20"></th>
|
||||||
|
|
||||||
|
|
||||||
<th>Total</th>
|
<th>Total</th>
|
||||||
<th id="manualoan"><?php echo isset($totalmonthloan) ? array_sum($totalmonthloan) : '';?></th>
|
|
||||||
<th id="monthloan"><?php echo isset($totalmonthloan) ? array_sum($totalmanualoan) : '' ;?></th>
|
<th id="monthloan">
|
||||||
<th id="inst"><?php echo isset($totalins) ? array_sum($totalinst) : '' ;?></th>
|
<?php echo isset($totalmonthloan) ? array_sum($totalmonthloan) : '' ;?>
|
||||||
<th id="other"><?php echo isset($totalotherDet) ? array_sum($totalotherDet): '' ;?></th>
|
</th>
|
||||||
<th id="fest"><?php echo isset($totalfestival) ? array_sum($totalfestival): '' ;?></th>
|
|
||||||
|
<th id="other">
|
||||||
|
<?php echo isset($totalotherDet) ? array_sum($totalotherDet): '' ;?></th>
|
||||||
|
<th id="fest">
|
||||||
|
<?php echo isset($totalfestival) ? array_sum($totalfestival): '' ;?></th>
|
||||||
<th id="estsal"><?php echo isset($estTotal) ? array_sum($estTotal): '' ;?></th>
|
<th id="estsal"><?php echo isset($estTotal) ? array_sum($estTotal): '' ;?></th>
|
||||||
|
|
||||||
</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">
|
||||||
<input type="button" id="submit" value = "Save" class="btn btn-success" onclick="getAllData();">
|
<input type="button" id="submit" value="Save" class="btn btn-success"
|
||||||
|
onclick="getAllData();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
@ -353,10 +435,10 @@ $('html').bind('keypress', function(e)
|
|||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var estTotal = [];
|
var estTotal = [];
|
||||||
var totalinst = [];
|
|
||||||
var totalotherDet = [];
|
var totalotherDet = [];
|
||||||
var totalmonthloan = [];
|
var totalmonthloan = [];
|
||||||
var totalmanualoan =[];
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
@ -365,11 +447,7 @@ $('html').bind('keypress', function(e)
|
|||||||
estTotal[i] = $(this).find('td').eq(11).text();
|
estTotal[i] = $(this).find('td').eq(11).text();
|
||||||
});
|
});
|
||||||
|
|
||||||
var i = 0;
|
|
||||||
$('tr.lastvalue').each(function(){
|
|
||||||
i = i+1;
|
|
||||||
totalinst [i]=$(this).find('td').eq(8).text();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var i = 0;
|
var i = 0;
|
||||||
@ -381,13 +459,9 @@ $('html').bind('keypress', function(e)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
var i = 0;
|
|
||||||
$('tr.lastvalue').each(function(){
|
|
||||||
i = i+1;
|
|
||||||
totalmanualoan [i]=$(this).find('td').eq(6).text();
|
|
||||||
});
|
|
||||||
|
|
||||||
//console.log(totalmanualoan);
|
|
||||||
|
|
||||||
|
|
||||||
var i = 0;
|
var i = 0;
|
||||||
$('tr.lastvalue').each(function() {
|
$('tr.lastvalue').each(function() {
|
||||||
@ -428,11 +502,18 @@ $('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() {
|
||||||
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
|
t.column(0, {
|
||||||
|
search: 'applied',
|
||||||
|
order: 'applied'
|
||||||
|
}).nodes().each(function(cell, i) {
|
||||||
cell.innerHTML = i + 1;
|
cell.innerHTML = i + 1;
|
||||||
});
|
});
|
||||||
}).draw();
|
}).draw();
|
||||||
@ -448,8 +529,9 @@ $('html').bind('keypress', function(e)
|
|||||||
|
|
||||||
//alert("hi");
|
//alert("hi");
|
||||||
var iKeyCode = (evt.which) ? evt.which : evt.keyCode
|
var iKeyCode = (evt.which) ? evt.which : evt.keyCode
|
||||||
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57))
|
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57)) {
|
||||||
{ return false;}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -457,16 +539,16 @@ $('html').bind('keypress', function(e)
|
|||||||
function isCheckKeyCode(event) {
|
function isCheckKeyCode(event) {
|
||||||
|
|
||||||
var iKeyCode = (event.which) ? event.which : event.keyCode
|
var iKeyCode = (event.which) ? event.which : event.keyCode
|
||||||
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57 ) && (iKeyCode ==78 && iKeyCode == 65))
|
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57) && (iKeyCode == 78 && iKeyCode == 65)) {
|
||||||
{ return false;}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getAllData()
|
function getAllData() {
|
||||||
{
|
|
||||||
|
|
||||||
var alldata = $("#monthlylistings").tableToJSON();
|
var alldata = $("#monthlylistings").tableToJSON();
|
||||||
//alert(JSON.stringify(alldata));
|
//alert(JSON.stringify(alldata));
|
||||||
@ -474,13 +556,15 @@ function isCheckKeyCode(event){
|
|||||||
var month = $('#monthyear').val();
|
var month = $('#monthyear').val();
|
||||||
$('.content').loader('show');
|
$('.content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{param1:alldata,param2:month},
|
data: {
|
||||||
|
param1: alldata,
|
||||||
|
param2: month
|
||||||
|
},
|
||||||
//dataType:"json",
|
//dataType:"json",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url() ?>payslip/saveMonthlyData",
|
url: "<?php echo base_url() ?>payslip/saveMonthlyData",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if(data)
|
if (data) {
|
||||||
{
|
|
||||||
$('.content').loader('hide');
|
$('.content').loader('hide');
|
||||||
alert(data);
|
alert(data);
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
@ -508,66 +592,39 @@ function isCheckKeyCode(event){
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
function savebuttonvalidation()
|
|
||||||
{
|
function savebuttonvalidation() {
|
||||||
var curselection = $("#monthyear").val();
|
var curselection = $("#monthyear").val();
|
||||||
//alert('current selection'+curselection);
|
|
||||||
var currentdate = new Date();
|
var currentdate = new Date();
|
||||||
var currentmonth = currentdate.getMonth();
|
var currentmonth = currentdate.getMonth();
|
||||||
var currentyear = currentdate.getFullYear();
|
var currentyear = currentdate.getFullYear();
|
||||||
currentmonth++;
|
currentmonth++;
|
||||||
//alert('currentmonth'+currentmonth);
|
|
||||||
var res = curselection.split("-");
|
var res = curselection.split("-");
|
||||||
var selmonth = res[0];
|
var selmonth = res[0];
|
||||||
var selyear = res[1];
|
var selyear = res[1];
|
||||||
//alert('current selec month '+ selmonth + 'current selec year '+ selyear);
|
|
||||||
var savebuttonstatus = currentmonth - selmonth;
|
var savebuttonstatus = currentmonth - selmonth;
|
||||||
var year = currentyear - selyear;
|
var year = currentyear - selyear;
|
||||||
//alert(selyear + currentyear);
|
if (savebuttonstatus >= 2) {
|
||||||
if(savebuttonstatus >= 2)
|
if (year == 1) {
|
||||||
{
|
|
||||||
if(year == 1)
|
|
||||||
{
|
|
||||||
$("#savebutton").hide();
|
$("#savebutton").hide();
|
||||||
// $("#savebutton").show();
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#savebutton").hide();
|
$("#savebutton").hide();
|
||||||
//$("#savebutton").show();
|
|
||||||
}
|
}
|
||||||
}
|
} else if (savebuttonstatus < 0) {
|
||||||
else if(savebuttonstatus < 0 )
|
|
||||||
{
|
|
||||||
|
|
||||||
if(year == 1)
|
if (year == 1) {
|
||||||
{
|
|
||||||
$("#savebutton").show();
|
$("#savebutton").show();
|
||||||
}
|
} else if (year == 0) {
|
||||||
else if(year == 0)
|
|
||||||
{
|
|
||||||
$("#savebutton").hide();
|
$("#savebutton").hide();
|
||||||
// $("#savebutton").show();
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#savebutton").hide();
|
$("#savebutton").hide();
|
||||||
// $("#savebutton").show();
|
|
||||||
}
|
}
|
||||||
}
|
} else if (savebuttonstatus == 0 && year == 0) {
|
||||||
else if(savebuttonstatus == 0 && year == 0)
|
|
||||||
{
|
|
||||||
$("#savebutton").hide();
|
$("#savebutton").hide();
|
||||||
// $("#savebutton").show();
|
} else if (savebuttonstatus == 1) {
|
||||||
}
|
if (year == 0 || year == 1) {
|
||||||
else if(savebuttonstatus == 1)
|
|
||||||
{
|
|
||||||
if(year == 0 || year == 1)
|
|
||||||
{
|
|
||||||
$("#savebutton").show();
|
$("#savebutton").show();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$("#savebutton").show();
|
$("#savebutton").show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -579,8 +636,8 @@ function isCheckKeyCode(event){
|
|||||||
var totalfestival = [];
|
var totalfestival = [];
|
||||||
var totalempSal = [];
|
var totalempSal = [];
|
||||||
var grandtotal = [];
|
var grandtotal = [];
|
||||||
function changeInput(event,k)
|
|
||||||
{
|
function changeInput(event, k) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -597,9 +654,7 @@ function isCheckKeyCode(event){
|
|||||||
var duedate = document.getElementById('duedate' + sno).value;
|
var duedate = document.getElementById('duedate' + sno).value;
|
||||||
duedate = new Date(duedate);
|
duedate = new Date(duedate);
|
||||||
var paydate = document.getElementById('paydate').value;
|
var paydate = document.getElementById('paydate').value;
|
||||||
|
if (paydate.length == 6) {
|
||||||
if(paydate.length == 6)
|
|
||||||
{
|
|
||||||
paydate = '0' + paydate;
|
paydate = '0' + paydate;
|
||||||
}
|
}
|
||||||
var pmonthonly = paydate.substring(0, 2);
|
var pmonthonly = paydate.substring(0, 2);
|
||||||
@ -607,29 +662,12 @@ function isCheckKeyCode(event){
|
|||||||
var pday = new Date(pyearonly, pmonthonly, 0).getDate();
|
var pday = new Date(pyearonly, pmonthonly, 0).getDate();
|
||||||
var finalpaydate = pyearonly + '-' + pmonthonly + '-' + pday;
|
var finalpaydate = pyearonly + '-' + pmonthonly + '-' + pday;
|
||||||
finalpaydate = new Date(finalpaydate);
|
finalpaydate = new Date(finalpaydate);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var loanRecd=document.getElementById('loanRecd'+sno).textContent;
|
|
||||||
|
|
||||||
//totalmanualoan[sno]=loanRecd;
|
|
||||||
var incentie=parseFloat(document.getElementById('incentie'+sno).textContent);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var otherDet = parseFloat(document.getElementById('otherDet' + sno).textContent);
|
var otherDet = parseFloat(document.getElementById('otherDet' + sno).textContent);
|
||||||
//totalotherDet[sno] = otherDet;
|
totalotherDet[sno] = otherDet;
|
||||||
|
|
||||||
var Festival = parseFloat(document.getElementById('Festival' + sno).textContent);
|
var Festival = parseFloat(document.getElementById('Festival' + sno).textContent);
|
||||||
totalfestival[sno] = Festival;
|
totalfestival[sno] = Festival;
|
||||||
var empsal = parseFloat(document.getElementById('empsal' + sno).textContent);
|
var empsal = parseFloat(document.getElementById('empsal' + sno).textContent);
|
||||||
|
|
||||||
var bpay = parseFloat(document.getElementById('bPay' + sno).value);
|
var bpay = parseFloat(document.getElementById('bPay' + sno).value);
|
||||||
|
|
||||||
var hraRate = parseFloat(document.getElementById('hraRate' + sno).value);
|
var hraRate = parseFloat(document.getElementById('hraRate' + sno).value);
|
||||||
var allow = parseFloat(document.getElementById('allow' + sno).value);
|
var allow = parseFloat(document.getElementById('allow' + sno).value);
|
||||||
var fAllow = parseFloat(document.getElementById('fAllow' + sno).value);
|
var fAllow = parseFloat(document.getElementById('fAllow' + sno).value);
|
||||||
@ -639,106 +677,74 @@ totalfestival[sno]= Festival ;
|
|||||||
// var Balance_Amount =parseFloat(document.getElementById('Balance'+sno).value);
|
// var Balance_Amount =parseFloat(document.getElementById('Balance'+sno).value);
|
||||||
var loanamt = parseFloat(document.getElementById('loanamt' + sno).value);
|
var loanamt = parseFloat(document.getElementById('loanamt' + sno).value);
|
||||||
var paidamt = parseFloat(document.getElementById('paidamt' + sno).value);
|
var paidamt = parseFloat(document.getElementById('paidamt' + sno).value);
|
||||||
|
var sunday = parseFloat(document.getElementById('sunday' + sno).value);
|
||||||
|
var is_management_team = parseFloat(document.getElementById('is_management_team' + sno).value);
|
||||||
|
var esi_applicable = parseFloat(document.getElementById('esi_applicable' + sno).value);
|
||||||
|
var pf_applicable = parseFloat(document.getElementById('pf_applicable' + sno).value);
|
||||||
|
|
||||||
|
var pfAmtString = document.getElementById('pfAmt' + sno).textContent;
|
||||||
|
pfAmtString = pfAmtString.replace(/,/g, '');
|
||||||
|
var pfAmt = parseFloat(pfAmtString);
|
||||||
|
|
||||||
|
var esiAmtString = document.getElementById('esiAmt' + sno).textContent;
|
||||||
|
esiAmtString = esiAmtString.replace(/,/g, '');
|
||||||
|
var esiAmt = parseFloat(esiAmtString);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(is_management_team == 1){
|
||||||
|
var dayWorkPaid = dayWorks + paidLeave + lopDay;
|
||||||
|
}else{
|
||||||
var dayWorkPaid = dayWorks + paidLeave ;
|
var dayWorkPaid = dayWorks + paidLeave ;
|
||||||
// console.log("day"+dayWorkPaid);
|
}
|
||||||
|
|
||||||
|
console.log("day" + dayWorkPaid);
|
||||||
var NoofDays = dayWorks + paidLeave + lopDay;
|
var NoofDays = dayWorks + paidLeave + lopDay;
|
||||||
// console.log("monthday"+NoofDays);
|
console.log("monthday"+NoofDays);
|
||||||
var Food_Allowances = fAllow * dayWorks;
|
var Food_Allowances = fAllow * dayWorks;
|
||||||
// console.log("workedFA"+Food_Allowances);
|
// console.log("workedFA"+Food_Allowances);
|
||||||
|
|
||||||
var daySalary = bpay / NoofDays;
|
var daySalary = bpay / NoofDays;
|
||||||
// console.log("1daysalary "+daySalary);
|
console.log("1daysalary "+daySalary);
|
||||||
var dayHra = hraAmt / NoofDays;
|
var dayHra = hraAmt / NoofDays;
|
||||||
// console.log("1dayHRA"+dayHra);
|
console.log("1dayHRA"+dayHra);
|
||||||
var onehoursSalary = (daySalary + dayHra) / 8;
|
var onehoursSalary = (daySalary + dayHra) / 8;
|
||||||
//console.log("onehours "+onehoursSalary);
|
console.log("onehours " + onehoursSalary);
|
||||||
var totSalayOT =0;
|
|
||||||
|
|
||||||
if (otHrsWork!= 0)
|
|
||||||
{
|
var totSalayOT = 0;
|
||||||
|
if (otHrsWork != 0) {
|
||||||
totSalayOT = otHrsWork * onehoursSalary;
|
totSalayOT = otHrsWork * onehoursSalary;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
totSalayOT = 0;
|
totSalayOT = 0;
|
||||||
}
|
}
|
||||||
//console.log(totSalayOT);
|
console.log(totSalayOT);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var currentDaySalary = daySalary * dayWorkPaid;
|
var currentDaySalary = daySalary * dayWorkPaid;
|
||||||
//console.log("11days salary"+currentDaySalary);
|
console.log("11days salary"+currentDaySalary);
|
||||||
|
|
||||||
var currentDayHra = dayHra * dayWorkPaid;
|
var currentDayHra = dayHra * dayWorkPaid;
|
||||||
// console.log("11days hra"+currentDayHra);
|
console.log("11days hra"+currentDayHra);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var current_loan_amt = 0;
|
var current_loan_amt = 0;
|
||||||
var autoLoan = parseFloat(monthDue);
|
var autoLoan = parseFloat(monthDue);
|
||||||
console.log(monthDue);
|
var Balance_Amount = loanamt - paidamt;
|
||||||
var manualLoan =parseFloat(loanRecd);
|
if (autoLoan > Balance_Amount) {
|
||||||
// var manualLoan = Math.min.apply(null, arrayOfNumbers.filter(function(loanRecd) { return !isNaN(loanRecd); }))
|
if (duedate <= finalpaydate) {
|
||||||
//alert(manualLoan);
|
current_loan_amt = Balance_Amount;
|
||||||
|
}
|
||||||
if(manualLoan == 0.00){
|
} else {
|
||||||
if(duedate <= finalpaydate)
|
|
||||||
{
|
|
||||||
current_loan_amt = autoLoan;
|
current_loan_amt = autoLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
//alert('}0.00');
|
|
||||||
}
|
|
||||||
else if(isNaN(manualLoan))
|
|
||||||
{
|
|
||||||
//alert('N');
|
|
||||||
current_loan_amt = 0.00;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(manualLoan == 'NA')
|
|
||||||
{
|
|
||||||
//alert('NA');
|
|
||||||
current_loan_amt = 0.00;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(manualLoan >= 0.00)
|
|
||||||
{
|
|
||||||
if(duedate <= finalpaydate)
|
|
||||||
{
|
|
||||||
current_loan_amt = manualLoan;
|
|
||||||
}
|
|
||||||
//alert('manual');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var Balance_Amount = loanamt - paidamt;
|
|
||||||
|
|
||||||
if(autoLoan > Balance_Amount) {
|
|
||||||
|
|
||||||
if(duedate <= finalpaydate)
|
|
||||||
{
|
|
||||||
current_loan_amt = Balance_Amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//alert('HI');
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// console.log(current_loan_amt);
|
|
||||||
|
|
||||||
if(parseFloat(incentie) == parseFloat(incentie)){
|
|
||||||
|
|
||||||
var incent =parseFloat(incentie);
|
|
||||||
//console.log("Incentives"+incent);
|
|
||||||
|
|
||||||
}
|
|
||||||
if (parseFloat(Festival) == parseFloat(Festival)) {
|
if (parseFloat(Festival) == parseFloat(Festival)) {
|
||||||
|
|
||||||
var Festivals = parseFloat(Festival);
|
var Festivals = parseFloat(Festival);
|
||||||
@ -753,32 +759,33 @@ totalfestival[sno]= Festival ;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var currentDatePF = currentDaySalary + currentDayHra + totSalayOT;
|
|
||||||
// console.log("pf "+currentDatePF);
|
|
||||||
|
|
||||||
// var totalsalary= empsal + hraAmt;
|
pfAmount = 0;
|
||||||
var totalsalary =currentDaySalary+currentDayHra;
|
if(pf_applicable == 1){
|
||||||
// console.log("total"+totalsalary);
|
pfAmount = pfAmt;
|
||||||
var esiAmount=0;
|
}else{
|
||||||
|
pfAmount = 0;
|
||||||
if (totalsalary <= 20000)
|
|
||||||
{
|
|
||||||
|
|
||||||
esiAmount = currentDatePF * eslRate / 100;
|
|
||||||
/** esiamount not elgiable for 20000 **/
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
esiAmount = 0;
|
||||||
|
if(esi_applicable == 1){
|
||||||
|
esiAmount = esiAmt;
|
||||||
|
}else{
|
||||||
esiAmount = 0;
|
esiAmount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pfAmount = currentDaySalary * pfRate / 100;
|
|
||||||
// console.log("11daypf"+pfAmount);
|
|
||||||
|
|
||||||
var empSalaryAdd= currentDaySalary + totSalayOT + currentDayHra + Food_Allowances + allow +incent+Festivals ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var empSalaryAdd = currentDaySalary + totSalayOT + currentDayHra + Festivals;
|
||||||
|
console.log("empSalaryAdd "+empSalaryAdd);
|
||||||
var empSalarySub = current_loan_amt + esiAmount + pfAmount + otherDets;
|
var empSalarySub = current_loan_amt + esiAmount + pfAmount + otherDets;
|
||||||
|
console.log("current_loan_amt "+current_loan_amt);
|
||||||
|
console.log("esiAmount "+esiAmount);
|
||||||
|
console.log("pfAmount "+pfAmount);
|
||||||
|
console.log("otherDets "+otherDets);
|
||||||
|
|
||||||
|
|
||||||
var empMonthSalary = empSalaryAdd - empSalarySub
|
var empMonthSalary = empSalaryAdd - empSalarySub
|
||||||
@ -794,64 +801,32 @@ totalfestival[sno]= Festival ;
|
|||||||
|
|
||||||
$.each(estTotal, function(i, value) {
|
$.each(estTotal, function(i, value) {
|
||||||
if (sno == i) {
|
if (sno == i) {
|
||||||
|
|
||||||
estTotal[i] = cals;
|
estTotal[i] = cals;
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//console.log(estTotal);
|
|
||||||
|
|
||||||
$.each(totalinst,function(i,value){
|
|
||||||
if(sno==i){
|
|
||||||
|
|
||||||
totalinst[i] = incentie;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$.each(totalotherDet, function(i, value) {
|
$.each(totalotherDet, function(i, value) {
|
||||||
if (sno == i) {
|
if (sno == i) {
|
||||||
|
|
||||||
totalotherDet[i] = otherDet;
|
totalotherDet[i] = otherDet;
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$.each(totalmonthloan,function(i,value){
|
// $.each(totalmonthloan, function(i, value) {
|
||||||
if(sno==i){
|
// if (sno == i) {
|
||||||
|
// totalmonthloan[i] = loanRecd;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
totalmonthloan[i] = loanRecd;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$.each(totalmanualoan,function(i,value){
|
|
||||||
if(sno==i){
|
|
||||||
|
|
||||||
totalmanualoan[i] = monthDue;
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//console.log(totalinst);
|
|
||||||
|
|
||||||
calculategrandtotal();
|
calculategrandtotal();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
var tempTotal = [];
|
var tempTotal = [];
|
||||||
|
|
||||||
function calculategrandtotal() {
|
function calculategrandtotal() {
|
||||||
|
|
||||||
$.each(totalinst, function( index, value )
|
|
||||||
{
|
|
||||||
//var res2 = value.split('-');
|
|
||||||
tempTotal[index]=parseFloat(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
var sum = 0;
|
var sum = 0;
|
||||||
|
|
||||||
@ -861,8 +836,7 @@ function calculategrandtotal(){
|
|||||||
|
|
||||||
$('#inst').text(parseFloat(sum).toFixed(2));
|
$('#inst').text(parseFloat(sum).toFixed(2));
|
||||||
|
|
||||||
$.each(totalotherDet, function( index, value )
|
$.each(totalotherDet, function(index, value) {
|
||||||
{
|
|
||||||
//var res2 = value.split('-');
|
//var res2 = value.split('-');
|
||||||
tempTotal[index] = parseFloat(value);
|
tempTotal[index] = parseFloat(value);
|
||||||
});
|
});
|
||||||
@ -874,8 +848,7 @@ function calculategrandtotal(){
|
|||||||
}
|
}
|
||||||
$('#other').text(parseFloat(sum).toFixed(2));
|
$('#other').text(parseFloat(sum).toFixed(2));
|
||||||
|
|
||||||
$.each(totalfestival, function( index, value )
|
$.each(totalfestival, function(index, value) {
|
||||||
{
|
|
||||||
//var res2 = value.split('-');
|
//var res2 = value.split('-');
|
||||||
tempTotal[index] = parseFloat(value);
|
tempTotal[index] = parseFloat(value);
|
||||||
});
|
});
|
||||||
@ -889,8 +862,7 @@ function calculategrandtotal(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$.each(estTotal, function( index, value )
|
$.each(estTotal, function(index, value) {
|
||||||
{
|
|
||||||
//var res2 = value.split('-');
|
//var res2 = value.split('-');
|
||||||
tempTotal[index] = parseFloat(value);
|
tempTotal[index] = parseFloat(value);
|
||||||
});
|
});
|
||||||
@ -905,9 +877,7 @@ function calculategrandtotal(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$.each(totalmonthloan, function( index, value )
|
$.each(totalmonthloan, function(index, value) {
|
||||||
{
|
|
||||||
//var res2 = value.split('-');
|
|
||||||
tempTotal[index] = parseFloat(value);
|
tempTotal[index] = parseFloat(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -918,19 +888,8 @@ function calculategrandtotal(){
|
|||||||
}
|
}
|
||||||
$('#monthloan').text(parseFloat(sum).toFixed(2));
|
$('#monthloan').text(parseFloat(sum).toFixed(2));
|
||||||
|
|
||||||
console.log(totalmanualoan);
|
|
||||||
$.each(totalmanualoan, function( index, value )
|
|
||||||
{
|
|
||||||
//var res2 = value.split('-');
|
|
||||||
tempTotal[index]=parseFloat(value);
|
|
||||||
});
|
|
||||||
|
|
||||||
var sum = 0;
|
|
||||||
|
|
||||||
for (var i = 0; i < tempTotal.length; i++) {
|
|
||||||
sum += tempTotal[i] << 0;
|
|
||||||
}
|
|
||||||
$('#manualoan').text(parseFloat(sum).toFixed(2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -944,5 +903,4 @@ function calculategrandtotal(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user