CHANGE_INWARD_RIASE_CONFLICT_COMMIT
This commit is contained in:
commit
de44e11467
@ -203,36 +203,7 @@ class Employeedetails extends BaseController
|
||||
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');
|
||||
$Picture = "";
|
||||
if ($photo->isValid() && !$photo->hasMoved()) {
|
||||
@ -371,15 +342,11 @@ class Employeedetails extends BaseController
|
||||
$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');
|
||||
$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);
|
||||
@ -803,34 +770,21 @@ class Employeedetails extends BaseController
|
||||
$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');
|
||||
$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);
|
||||
|
||||
if ($result + $empPayUpdate > 0) {
|
||||
|
||||
|
||||
// $this->session->set_flashdata('Success', $EmpId.'Employee Updated successfully!');
|
||||
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
||||
// echo "<script>alert('You Have Successfully updated the Employee Record!');</script>";
|
||||
|
||||
} else {
|
||||
|
||||
// $this->session->set_flashdata('Error', $EmpId . 'Employee details not saved');
|
||||
$this->session->setFlashdata('error', 'Record Not Updated!');
|
||||
// echo "<script>alert('Record Not Updated!');</script>";
|
||||
|
||||
}
|
||||
return redirect()->route('employeeListing');
|
||||
// redirect('employeeListing');
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
function exportemployee()
|
||||
|
||||
@ -56,13 +56,9 @@ class Emppaydate extends BaseController
|
||||
*/
|
||||
function 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);
|
||||
}
|
||||
|
||||
@ -71,12 +67,8 @@ class Emppaydate extends BaseController
|
||||
*/
|
||||
function addemppaydate()
|
||||
{
|
||||
$q = "addemppaydate";
|
||||
|
||||
|
||||
$result['empdetails'] = $this->payroll_model->getEmpID($q);
|
||||
|
||||
|
||||
|
||||
$result['empdetails'] = $this->payroll_model->getEmpID();
|
||||
|
||||
$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');
|
||||
$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');
|
||||
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
||||
if (!empty($Load_Issued_date)) {
|
||||
$Load_Issued_date = $Load_Issued_date = format_date($Load_Issued_date);
|
||||
} else {
|
||||
$Load_Issued_date = null;
|
||||
}
|
||||
if (!empty($Load_Issued_date)) { $Load_Issued_date = format_date($Load_Issued_date); } else { $Load_Issued_date = null; }
|
||||
$Due_Amount = $this->request->getPost('monthly_due');
|
||||
$Due_Started = $this->request->getPost('due_started');
|
||||
if (!empty($Due_Started)) {
|
||||
$Due_Started = $Due_Started = format_date($Due_Started);
|
||||
} else {
|
||||
$Due_Started = null;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($Due_Started)) {$Due_Started = format_date($Due_Started);} else { $Due_Started = null; }
|
||||
$No_Of_Dues = $this->request->getPost('no_of_due');
|
||||
$Paid_due = $this->request->getPost('paid_due');
|
||||
$Remaining_Due = $this->request->getPost('remaining_due');
|
||||
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
||||
|
||||
|
||||
|
||||
$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);
|
||||
|
||||
|
||||
$result = $this->emppaydate_model->addNewemppay($emppay);
|
||||
|
||||
if ($Loan_Amount != 0) {
|
||||
$result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'add');
|
||||
if ($result2 > 0) {
|
||||
@ -161,17 +111,8 @@ class Emppaydate extends BaseController
|
||||
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');
|
||||
$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_Amount = $this->request->getPost('Loan_Amount');
|
||||
$Load_Issued_date = $this->request->getPost('loan_issued_date');
|
||||
if (!empty($Load_Issued_date)) {
|
||||
$Load_Issued_date = format_date($Load_Issued_date);
|
||||
} else {
|
||||
$Load_Issued_date = null;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($Load_Issued_date)) {$Load_Issued_date = format_date($Load_Issued_date);} else { $Load_Issued_date = null; }
|
||||
$Due_Amount = $this->request->getPost('monthly_due');
|
||||
$Due_Started = $this->request->getPost('due_started');
|
||||
if (!empty($Due_Started)) {
|
||||
$Due_Started = format_date($Due_Started);
|
||||
} else {
|
||||
$Due_Started = null;
|
||||
}
|
||||
|
||||
|
||||
//echo $Load_Issued_date. "-" . $Due_Started;die();
|
||||
if (!empty($Due_Started)) {$Due_Started = format_date($Due_Started); } else { $Due_Started = null; }
|
||||
$No_Of_Dues = $this->request->getPost('no_of_due');
|
||||
$Paid_due = $this->request->getPost('paid_due');
|
||||
$Remaining_Due = $this->request->getPost('remaining_due');
|
||||
$Paid_Amount = $this->request->getPost('Paid_Amount');
|
||||
$is_Active = $this->request->getPost('is_Active');
|
||||
$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);
|
||||
|
||||
|
||||
@ -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');
|
||||
}
|
||||
// dd( $sundayarray);
|
||||
$noofsundays = count($sundayarray);
|
||||
|
||||
$publicholidaysarray = $this->monthlypay_model->getPublicHoldays($current);
|
||||
@ -150,6 +151,7 @@ class Monthlypay extends BaseController
|
||||
$data['datefordropdown'] = $current;
|
||||
$data['attendance'] = $this->monthlypay_model->monthlyAttendance($current);
|
||||
$data['emppay'] = $this->monthlypay_model->getEmpPayDetails($current, $string);
|
||||
|
||||
$this->global['pageTitle'] = 'Monthly Attendance';
|
||||
$this->loadViews("attendance", $this->global, $data, NULL);
|
||||
}
|
||||
@ -264,6 +266,7 @@ class Monthlypay extends BaseController
|
||||
$paidleave = $data['Paid Leave'];
|
||||
$daysworked = $data['Days Worked'];
|
||||
$absent = $data['Absent'];
|
||||
$sundayCount = $data['Total Sunday'];
|
||||
|
||||
$monthattendance = array(
|
||||
'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,
|
||||
'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,
|
||||
'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()
|
||||
{
|
||||
$current = date("m-Y");
|
||||
// echo $current;
|
||||
|
||||
|
||||
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
||||
// $data['fresh'] = $this-> monthlypay_model->getEmpPayDetails($current);
|
||||
$data['dropdownvalue'] = $current;
|
||||
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
||||
// dd($data['fresh']);
|
||||
|
||||
$employeeSalary = [];
|
||||
|
||||
|
||||
$esi = [];
|
||||
$pf = [];
|
||||
$ot = [];
|
||||
foreach ($data['fresh'] as $value) {
|
||||
|
||||
|
||||
@ -520,34 +521,25 @@ class Payslip extends BaseController
|
||||
$HRA_Amount = $value->HRA_Amount;
|
||||
$Basic_Pay = $value->Basic_Pay;
|
||||
$TotalSalary = $value->TotalSalary;
|
||||
$Food_Allowances = $value->Food_Allowances;
|
||||
$Days_worked = $value->Days_worked; // working day
|
||||
$LOP_Days = $value->LOP_Days; // not working day
|
||||
$Sunday = $value->sunday_count; // Sunday count
|
||||
$LOP_Days = $value->NoofDays - ($Days_worked + $Sunday); // not working day
|
||||
$Paid_leave = $value->Paid_leave; // leave day
|
||||
$OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
||||
$Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE
|
||||
|
||||
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
||||
|
||||
$MasterIncentives = $value->MasterIncentives; //Master values get
|
||||
// echo 'master'.$MasterIncentives;
|
||||
|
||||
|
||||
$due_start_date = $value->DueDate;
|
||||
$paydate = $current; //From POST parm
|
||||
|
||||
$pmonth = substr($paydate, 0, 2);
|
||||
$pyear = substr($paydate, -4);
|
||||
|
||||
$pday = cal_days_in_month(CAL_GREGORIAN, $pmonth, $pyear);
|
||||
$paymonth = $pyear . '-' . $pmonth . '-' . $pday;
|
||||
|
||||
$Loan_amount = $value->Loan_Amount;
|
||||
$Paid_Amount = $value->Paid_Amount;
|
||||
|
||||
|
||||
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
||||
|
||||
|
||||
|
||||
$loan = 0;
|
||||
if ($Loan_Recovered == 'NA') {
|
||||
$loan = 0.00;
|
||||
@ -563,89 +555,76 @@ class Payslip extends BaseController
|
||||
|
||||
|
||||
if ($Monthly_Due > $Balance_Amount) {
|
||||
|
||||
// current= Balance_Amount - autoLoan;
|
||||
//alert('hi');
|
||||
$loan = $Balance_Amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$Allowances = $value->Allowances;
|
||||
$HRA_Rate = $value->HRA_Rate;
|
||||
|
||||
$PF_Rate = $value->PF_Rate;
|
||||
$ESI_Rate = $value->ESI_Rate;
|
||||
|
||||
$MonthIncentive = $value->MonthlyIncentives; //t_monthly_pay_inputs,for change month
|
||||
|
||||
|
||||
|
||||
$Incentive = 0;
|
||||
|
||||
|
||||
if (empty($MonthIncentive)) {
|
||||
|
||||
$Incentive = $MasterIncentives;
|
||||
} else {
|
||||
$Incentive = $MonthIncentive;
|
||||
}
|
||||
// echo $Incentive;
|
||||
|
||||
|
||||
|
||||
$daySalarys = $Days_worked + $Paid_leave;
|
||||
|
||||
//echo "hra amount";print_r(array($HRA_Amount,$Basic_Pay,$totalsalary));
|
||||
//$Allowances = $allowances * $values;
|
||||
$dayFood_Allowance = $Food_Allowances * $Days_worked;
|
||||
|
||||
$daySalary = $Basic_Pay / $NoofDays;
|
||||
/**per day salary working hour**/
|
||||
//echo $daySalary.'<br/>';
|
||||
$totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave;
|
||||
|
||||
$dayBasic = $Basic_Pay / $NoofDays;
|
||||
$dayHra = $HRA_Amount / $NoofDays;
|
||||
/** per day hra amount **/
|
||||
//echo $dayHra.'<br/>';
|
||||
$onehoursSalary = ($dayBasic + $dayHra) / 8;
|
||||
|
||||
$onehoursSalary = ($daySalary + $dayHra) / 8;
|
||||
/**one hour salay ot calculation**/
|
||||
if ($OT_Hrs_Worked != 0) {
|
||||
$totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
||||
} else {
|
||||
$totSalayOT = 0;
|
||||
}
|
||||
$currentDaySalary = $daySalary * $daySalarys;
|
||||
/** current day salary working days calculation**/
|
||||
|
||||
|
||||
$currentDayHra = $dayHra * $daySalarys;
|
||||
/** total working days hra calculations**/
|
||||
// echo $currentDayHra.'<br/>';
|
||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
||||
/** current date pf calculation**/
|
||||
if ($TotalSalary <= 20000) {
|
||||
|
||||
$esiAmount = $currentDatePF * $ESI_Rate / 100;
|
||||
/** esiamount not elgiable for 20000 **/
|
||||
} else {
|
||||
$esiAmount = 0;
|
||||
|
||||
|
||||
//current day basic and hra salary
|
||||
if ($value->is_management_team == 1)
|
||||
{
|
||||
$currentDayBasic = $dayBasic * $NoofDays;
|
||||
$currentDayHra = $dayHra * $NoofDays;
|
||||
} else {
|
||||
$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**/
|
||||
|
||||
//echo $totalothour;die;
|
||||
$empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
||||
$empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT;
|
||||
|
||||
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
||||
|
||||
|
||||
$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);
|
||||
$esi[] = number_format($esiAmount,2);
|
||||
$pf[] = number_format($pfAmount,2);
|
||||
$ot[] = number_format($totSalayOT,2);
|
||||
}
|
||||
$data['empSalary'] = $employeeSalary;
|
||||
|
||||
|
||||
//echo sizeof($data['fresh'])."-".sizeof($data['empSalary']);die;
|
||||
$data['esi'] = $esi;
|
||||
$data['pf'] = $pf;
|
||||
$data['over_time'] = $ot;
|
||||
|
||||
// dd($data);
|
||||
$this->global['pageTitle'] = 'Payroll Monthly Inputs';
|
||||
$this->loadViews("monthlypayinputs", $this->global, $data, NULL);
|
||||
}
|
||||
@ -657,30 +636,29 @@ class Payslip extends BaseController
|
||||
$current = $this->request->getPost('monthyear');
|
||||
|
||||
$data['month'] = $this->monthlypay_model->monthlyListing($current);
|
||||
//print_r($data['month']);
|
||||
$data['dropdownvalue'] = $current;
|
||||
$data['fresh'] = $this->monthlypay_model->getEmpPayDetailsforMonthInputs($current);
|
||||
|
||||
// dd($data['fresh']);
|
||||
//dd($data['fresh']);
|
||||
|
||||
|
||||
$employeeSalary = [];
|
||||
|
||||
|
||||
$esi = [];
|
||||
$pf = [];
|
||||
$ot = [];
|
||||
foreach ($data['fresh'] as $value) {
|
||||
|
||||
//print_r($value);
|
||||
//die();
|
||||
|
||||
$NoofDays = $value->NoofDays; //Month day 30,31,28
|
||||
$HRA_Amount = $value->HRA_Amount;
|
||||
$Basic_Pay = $value->Basic_Pay;
|
||||
$TotalSalary = $value->TotalSalary;
|
||||
$Food_Allowances = $value->Food_Allowances;
|
||||
$Days_worked = $value->Days_worked; // working day
|
||||
$LOP_Days = $value->LOP_Days; // not working day
|
||||
$Sunday = $value->sunday_count; // Sunday count
|
||||
$LOP_Days = $value->NoofDays - ($Days_worked + $Sunday); // not working day
|
||||
$Paid_leave = $value->Paid_leave; // leave day
|
||||
$OT_Hrs_Worked = $value->OT_Hrs_Worked; //OT hours
|
||||
$Monthly_Due = $value->Monthly_Due; // AUTO LOAN DUE
|
||||
$Loan_Recovered = $value->Loan_Recovered; //MANUAL LOAN DUE
|
||||
$due_start_date = $value->DueDate;
|
||||
$paydate = $current; //From POST parm
|
||||
|
||||
@ -693,18 +671,10 @@ class Payslip extends BaseController
|
||||
$pday = cal_days_in_month(CAL_GREGORIAN, $pmonth, $pyear);
|
||||
$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;
|
||||
$Paid_Amount = $value->Paid_Amount;
|
||||
|
||||
|
||||
$Balance_Amount = $Loan_amount - $Paid_Amount;
|
||||
|
||||
|
||||
|
||||
$loan = 0;
|
||||
if ($Loan_Recovered == 'NA') {
|
||||
$loan = 0.00;
|
||||
@ -713,7 +683,6 @@ class Payslip extends BaseController
|
||||
$loan = $Monthly_Due;
|
||||
}
|
||||
} else if ($Loan_Recovered >= 0.00) {
|
||||
|
||||
if (strtotime($due_start_date) <= strtotime($paymonth)) {
|
||||
$loan = $Loan_Recovered;
|
||||
}
|
||||
@ -721,87 +690,75 @@ class Payslip extends BaseController
|
||||
|
||||
|
||||
if ($Monthly_Due > $Balance_Amount) {
|
||||
|
||||
// current= Balance_Amount - autoLoan;
|
||||
//alert('hi');
|
||||
$loan = $Balance_Amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$Allowances = $value->Allowances;
|
||||
$HRA_Rate = $value->HRA_Rate;
|
||||
$PF_Rate = $value->PF_Rate;
|
||||
$ESI_Rate = $value->ESI_Rate;
|
||||
|
||||
$MonthIncentive = $value->MonthlyIncentives; //t_monthly_pay_inputs,for change month
|
||||
|
||||
|
||||
|
||||
$Incentive = 0;
|
||||
|
||||
|
||||
if (empty($MonthIncentive)) {
|
||||
|
||||
$Incentive = $MasterIncentives;
|
||||
} else {
|
||||
$Incentive = $MonthIncentive;
|
||||
}
|
||||
// echo $Incentive;
|
||||
|
||||
|
||||
|
||||
$daySalarys = $Days_worked + $Paid_leave;
|
||||
|
||||
//echo "hra amount";print_r(array($HRA_Amount,$Basic_Pay,$totalsalary));
|
||||
//$Allowances = $allowances * $values;
|
||||
$dayFood_Allowance = $Food_Allowances * $Days_worked;
|
||||
|
||||
$daySalary = $Basic_Pay / $NoofDays;
|
||||
/**per day salary working hour**/
|
||||
//echo $daySalary.'<br/>';
|
||||
$totalDaysWorked = ($Days_worked + $Sunday) + $Paid_leave;
|
||||
|
||||
$dayBasic = $Basic_Pay / $NoofDays;
|
||||
$dayHra = $HRA_Amount / $NoofDays;
|
||||
/** per day hra amount **/
|
||||
//echo $dayHra.'<br/>';
|
||||
$onehoursSalary = ($dayBasic + $dayHra) / 8;
|
||||
|
||||
$onehoursSalary = ($daySalary + $dayHra) / 8;
|
||||
/**one hour salay ot calculation**/
|
||||
if ($OT_Hrs_Worked != 0) {
|
||||
$totSalayOT = $OT_Hrs_Worked * $onehoursSalary;
|
||||
} else {
|
||||
$totSalayOT = 0;
|
||||
}
|
||||
$currentDaySalary = $daySalary * $daySalarys;
|
||||
/** current day salary working days calculation**/
|
||||
|
||||
|
||||
$currentDayHra = $dayHra * $daySalarys;
|
||||
/** total working days hra calculations**/
|
||||
// echo $currentDayHra.'<br/>';
|
||||
$currentDatePF = $currentDaySalary + $currentDayHra + $totSalayOT;
|
||||
/** current date pf calculation**/
|
||||
if ($TotalSalary <= 20000) {
|
||||
|
||||
$esiAmount = $currentDatePF * $ESI_Rate / 100;
|
||||
/** esiamount not elgiable for 20000 **/
|
||||
} else {
|
||||
$esiAmount = 0;
|
||||
|
||||
|
||||
//current day basic and hra salary
|
||||
if ($value->is_management_team == 1)
|
||||
{
|
||||
$currentDayBasic = $dayBasic * $NoofDays;
|
||||
$currentDayHra = $dayHra * $NoofDays;
|
||||
} else {
|
||||
$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**/
|
||||
|
||||
//echo $totalothour;die;
|
||||
$empSalaryAdd = $currentDaySalary + $totSalayOT + $currentDayHra + $dayFood_Allowance + $Allowances + $Incentive;
|
||||
$empSalaryAdd = $currentDayBasic + $currentDayHra + $totSalayOT;
|
||||
$empSalarySub = $esiAmount + $pfAmount + $loan;
|
||||
|
||||
$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);
|
||||
$esi[] = number_format($esiAmount,2);
|
||||
$pf[] = number_format($pfAmount,2);
|
||||
$ot[] = number_format($totSalayOT,2);
|
||||
}
|
||||
$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->loadViews("monthlypayinputs", $this->global, $data, NULL);
|
||||
@ -847,9 +804,9 @@ class Payslip extends BaseController
|
||||
|
||||
$ErrorFlag = 0;
|
||||
|
||||
$Emp = $j['Employee'];
|
||||
|
||||
|
||||
$EmpID = substr($Emp, 0, 4);
|
||||
$EmpID = $j['Emp ID'];
|
||||
|
||||
//$Name = $j['Employee Name'];
|
||||
//echo $EmpID; die;
|
||||
@ -858,10 +815,10 @@ class Payslip extends BaseController
|
||||
$LOP_Days = $j['LOP Days'];
|
||||
$Paid_leave = $j['Paid Leave'];
|
||||
$OT_Hrs_Worked = $j['OT Hrs'];
|
||||
$Loan_Recovered = $j['Manual Loan Due ₹'];
|
||||
$Incentives = $j['Incentives in ₹'];
|
||||
$Loan_Recovered = $j['Auto Loan Due ₹'];
|
||||
// $Incentives = $j['Incentives in ₹'];
|
||||
$Festival_Bonus = $j['Festival Bonus in ₹'];
|
||||
$Other_Deductions = $j['Other Deductions in ₹'];
|
||||
$Other_Deductions = $j['TDS Deductions in ₹'];
|
||||
$Estimate = $j['Estimate in ₹'];
|
||||
$Created_By = $this->session->get('userId');
|
||||
|
||||
@ -906,11 +863,11 @@ class Payslip extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
$Incentives_first = explode(".", $Incentives);
|
||||
if (!is_numeric($Incentives) || (strlen((string)$Incentives)) > 8 || (strlen((string)$Incentives_first[0])) > 5) {
|
||||
//echo $EmpID . "-Loan Recoverd Invalid Data!";
|
||||
$ErrorFlag++;
|
||||
}
|
||||
// $Incentives_first = explode(".", $Incentives);
|
||||
// if (!is_numeric($Incentives) || (strlen((string)$Incentives)) > 8 || (strlen((string)$Incentives_first[0])) > 5) {
|
||||
// //echo $EmpID . "-Loan Recoverd Invalid Data!";
|
||||
// $ErrorFlag++;
|
||||
// }
|
||||
|
||||
$Festivalbonus_first = explode(".", $Festival_Bonus);
|
||||
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) {
|
||||
|
||||
$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'];
|
||||
$LOP_Days = $j['LOP Days'];
|
||||
$Paid_leave = $j['Paid Leave'];
|
||||
$OT_Hrs_Worked = $j['OT Hrs'];
|
||||
$Loan_Recovered = isset($j['Manual Loan Due ₹']) ? $j['Manual Loan Due ₹'] : 0.00;
|
||||
if (is_string($Loan_Recovered)) {
|
||||
$Loan_Recovered = strtoupper($Loan_Recovered);
|
||||
}
|
||||
$Incentives = isset($j['Incentives in ₹']) ? $j['Incentives in ₹'] : 0.00 ;
|
||||
$LOP_Days = isset($j['LOP Days']) ? $j['LOP Days'] : 0.00;
|
||||
$Paid_leave = isset($j['Paid Leave']) ? $j['Paid Leave'] : 0.00;
|
||||
$OT_Hrs_Worked = isset($j['OT Hrs']) ? $j['OT Hrs'] : 0.00;
|
||||
$Loan_Recovered = isset($j['Auto Loan Due ₹']) ? $j['Auto Loan Due ₹'] : 0.00;
|
||||
// if (is_string($Loan_Recovered)) {
|
||||
// $Loan_Recovered = strtoupper($Loan_Recovered);
|
||||
// }
|
||||
// $Incentives = isset($j['Incentives in ₹']) ? $j['Incentives 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;
|
||||
$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;
|
||||
$result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata);
|
||||
$total = $total + $result;
|
||||
@ -1016,8 +968,6 @@ class Payslip extends BaseController
|
||||
|
||||
$Data['Payon'] = $this->payroll_model->getPayOn();
|
||||
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Payroll Generater';
|
||||
|
||||
$this->loadViews("payslipgenerate", $this->global, $Data, NULL);
|
||||
@ -1038,6 +988,7 @@ class Payslip extends BaseController
|
||||
$id = $this->request->getPost('id1');
|
||||
|
||||
$result = $this->payroll_model->getEmployeelist2($id);
|
||||
|
||||
$HTML = "";
|
||||
|
||||
if (count($result) > 0) {
|
||||
|
||||
@ -15,11 +15,12 @@ class Emppaydate_model extends Model
|
||||
*/
|
||||
function emppayListing()
|
||||
{
|
||||
$builder = $this->db->table('t_emp_pay_data')
|
||||
->select('t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.LastName')
|
||||
->join('t_employee_details','t_emp_pay_data.EmpID=t_employee_details.EmpID');
|
||||
$builder = $this->db->table('t_loan_master')
|
||||
->select('t_loan_master.*,t_emp_pay_data.*,t_employee_details.FirstName')
|
||||
->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();
|
||||
$result = $query->getResult();
|
||||
$result = $query->getResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ class Monthlypay_model extends Model
|
||||
//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(?)
|
||||
$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
|
||||
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 = ?
|
||||
@ -206,7 +206,7 @@ class Monthlypay_model extends Model
|
||||
|
||||
$count = $res[0]['count'];
|
||||
}
|
||||
// print_r($data);die;
|
||||
|
||||
|
||||
if ($count == 0) {
|
||||
$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]);
|
||||
}
|
||||
|
||||
function getEmpID($q = '')
|
||||
function getEmpID()
|
||||
{
|
||||
|
||||
$builder = $this->db->table('t_employee_details')
|
||||
->select('EmpID,FirstName,LastName');
|
||||
if ($q == "addemppaydate") {
|
||||
$builder->where('EmpID NOT IN (SELECT EmpID from t_emp_pay_data)', NULL, FALSE);
|
||||
}
|
||||
|
||||
$query = $builder->get();
|
||||
return $query->getResult();
|
||||
}
|
||||
|
||||
@ -1654,18 +1654,16 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
|
||||
{
|
||||
|
||||
$subQuery = 'SELECT distinct LineItem.LineItemNo,LineItem.Per,LineItem.ServiceMaterialDescription,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency,
|
||||
Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,Tax.*,
|
||||
ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess,AfterCustomEdCess,ROUND((POMast.ExchangeRate*BasicPriceInMTon*Quantity),2) as BasicINRValue,Tax.TotalValue as ImportTotalValue,Tax.FreightType,Tax.NoOfTrip,Tax.FreightValue,Tax.AfterFreightValue,POMast.CurrencyType,
|
||||
|
||||
Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem
|
||||
join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO
|
||||
join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
|
||||
join t_import_tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
||||
left join t_employee_details emp on Req.Requestedby = emp.EmpID
|
||||
|
||||
join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode where LineItem.PONO =?';
|
||||
Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,Tax.*,
|
||||
ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess,AfterCustomEdCess,ROUND((POMast.ExchangeRate*BasicPriceInMTon*Quantity),2) as BasicINRValue,Tax.TotalValue as ImportTotalValue,Tax.FreightType,Tax.NoOfTrip,Tax.FreightValue,Tax.AfterFreightValue,POMast.CurrencyType,
|
||||
|
||||
Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem
|
||||
join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO
|
||||
join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode
|
||||
left join t_import_tax Tax on Tax.LineItemNo = LineItem.LineItemNo
|
||||
join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo
|
||||
left join t_employee_details emp on Req.Requestedby = emp.EmpID
|
||||
left join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode where LineItem.PONO =?';
|
||||
//print_r($subQuery);
|
||||
|
||||
$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
|
||||
join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO
|
||||
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_employee_details emp on Req.Requestedby = emp.EmpID
|
||||
|
||||
|
||||
@ -394,7 +394,7 @@ function onlyAlphabets(evt) {
|
||||
|
||||
|
||||
function validatePF() {
|
||||
var regpf = /^([a-zA-Z]){5}([0-9]){17}$/;
|
||||
var regpf = /^\d{12}$/;
|
||||
|
||||
|
||||
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-3">
|
||||
@ -1005,8 +968,8 @@ legend {
|
||||
<input type="text" id="pfno" name="pfno" maxlength="22"
|
||||
onchange="validatePF();" class="form-control"
|
||||
style="text-transform:uppercase"
|
||||
pattern="([a-zA-Z]){5}([0-9]){17}"
|
||||
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
|
||||
pattern="\d{12}"
|
||||
title="12 Digit number"
|
||||
onkeypress="return alpha(event);">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,25 +1,30 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$("#loan_issued_date").datepicker({
|
||||
minDate : 'now',
|
||||
// maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
||||
});
|
||||
|
||||
$("#due_started").datepicker({
|
||||
minDate :'now',
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+1'
|
||||
});
|
||||
$("#loan_issued_date").datepicker({
|
||||
minDate: 'now',
|
||||
// maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-100:+0'
|
||||
});
|
||||
|
||||
$("#due_started").datepicker({
|
||||
minDate: 'now',
|
||||
//maxDate : 'now',
|
||||
dateFormat: 'dd-mm-yy',
|
||||
changeMonth: true,
|
||||
changeYear: true,
|
||||
yearRange: '-100:+1'
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align:right;
|
||||
.num {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -27,293 +32,151 @@ $("#due_started").datepicker({
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page 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 class="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>emppayListings" class="btn btn-success" value="Back"/>Back</a>
|
||||
</div>
|
||||
<br>
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>emppayListings" class="btn btn-success" value="Back" />Back</a>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<!-- general form elements -->
|
||||
|
||||
<!-- general form elements -->
|
||||
|
||||
<div class="box box-success">
|
||||
|
||||
|
||||
<!-- 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="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-12">
|
||||
<legend>Loan Details</legend>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<span for="EmpID">Employee ID</span><font color="Red">*</font>
|
||||
<span for="EmpID">Employee ID</span>
|
||||
<font color="Red">*</font>
|
||||
<div class="form-group">
|
||||
|
||||
<?php
|
||||
|
||||
<?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);
|
||||
$Employee+= array($EmpID => $emp->EmpID . "-" . $emp->FirstName);
|
||||
|
||||
}
|
||||
}
|
||||
//$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>
|
||||
echo form_dropdown('EmpID', $Employee,set_value('EmpID'),'class="form-control"',$js);
|
||||
|
||||
?>
|
||||
</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">
|
||||
<legend>Loan Details</legend>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
<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();">
|
||||
</div>
|
||||
<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();">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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();">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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();">
|
||||
</div>
|
||||
<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();">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<span for="Basic_Pay">Due Started</span>
|
||||
<input type="text" class="form-control requried num" id="due_started" name="due_started" value="" onchange="dateCalulation();">
|
||||
</div>
|
||||
<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();">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
</div>
|
||||
<span for="Basic_Pay">Due Started</span>
|
||||
<input type="text" class="form-control requried num" id="due_started"
|
||||
name="due_started" value="" onchange="dateCalulation();">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="remaining_due" name="remaining_due" value="0">
|
||||
<input type="hidden" id="paid_due" name="paid_due" value="0">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="submit" class="btn btn-success" value="Submit" onmouseover="finalCheck();"/>
|
||||
<input type="reset" class="btn btn-success" value="Reset" />
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" id="remaining_due" name="remaining_due" value="0">
|
||||
<input type="hidden" id="paid_due" name="paid_due" value="0">
|
||||
</div>
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="submit" class="btn btn-success" value="Submit"
|
||||
onmouseover="finalCheck();" />
|
||||
<input type="reset" class="btn btn-success" value="Reset" />
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
|
||||
|
||||
|
||||
</form><!-- form closed -->
|
||||
|
||||
|
||||
|
||||
</div><!-- -->
|
||||
</div><!-- -->
|
||||
<div class="col-md-4">
|
||||
@ -325,7 +188,7 @@ $("#due_started").datepicker({
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('error'); ?>
|
||||
<?php echo session()->getFlashdata('error'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
@ -338,119 +201,103 @@ $("#due_started").datepicker({
|
||||
<?php echo session()->getFlashdata('success'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<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> <!-- first row closed-->
|
||||
</div> <!-- first row closed-->
|
||||
</section>
|
||||
|
||||
</div><!--content-wrapper closed-->
|
||||
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
||||
|
||||
</div>
|
||||
<!--content-wrapper closed-->
|
||||
<script src="<?php echo base_url(); ?>public/assets/js/addUser.js" type="text/javascript"></script>
|
||||
<script>
|
||||
function calculalteHRA()
|
||||
{
|
||||
//var empid=document.getElementById('emp').value;
|
||||
//alert(empid);
|
||||
function calculalteHRA() {
|
||||
//var empid=document.getElementById('emp').value;
|
||||
//alert(empid);
|
||||
var Totalsalary = document.getElementById('Total_salary').value;
|
||||
var HRA=document.getElementById('HRA_Rate').value;
|
||||
//if(EmpID == -1){alert("Select Employee ID..!");}
|
||||
if(HRA==''){
|
||||
alert("Please Enter HRA RATE..");
|
||||
document.getElementById('HRA_Rate').focus();
|
||||
}else if(Totalsalary==''){
|
||||
alert("Please Enter Total Salary..");
|
||||
document.getElementById('total_salary').focus();
|
||||
}
|
||||
else{
|
||||
var temp=(Totalsalary*(HRA/100));
|
||||
var basic=Totalsalary-temp;
|
||||
document.getElementById('Basic_Pay').value=basic;
|
||||
document.getElementById('HRA_Amount').value=temp;
|
||||
}
|
||||
var HRA = document.getElementById('HRA_Rate').value;
|
||||
//if(EmpID == -1){alert("Select Employee ID..!");}
|
||||
if (HRA == '') {
|
||||
alert("Please Enter HRA RATE..");
|
||||
document.getElementById('HRA_Rate').focus();
|
||||
} else if (Totalsalary == '') {
|
||||
alert("Please Enter Total Salary..");
|
||||
document.getElementById('total_salary').focus();
|
||||
} else {
|
||||
var temp = (Totalsalary * (HRA / 100));
|
||||
var basic = Totalsalary - temp;
|
||||
document.getElementById('Basic_Pay').value = basic;
|
||||
document.getElementById('HRA_Amount').value = temp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function duecalculation()
|
||||
{
|
||||
var totaldue=0;
|
||||
var loan=document.getElementById('Loan_Amount').value;
|
||||
var due=document.getElementById('monthly_due').value;
|
||||
|
||||
|
||||
|
||||
if(loan != 0)
|
||||
{
|
||||
if(due == 0)
|
||||
{
|
||||
alert("Enter Monthly Due Amount....!");
|
||||
$('#monthly_due').focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
totaldue=loan/due;
|
||||
|
||||
if(totaldue < 1)
|
||||
{
|
||||
alert("Please Enter Correct Due Amount..!");
|
||||
$('#monthly_due').focus();
|
||||
}
|
||||
else{
|
||||
document.getElementById('no_of_due').value=Math.ceil(totaldue);
|
||||
var noofdues=document.getElementById('no_of_due').value;
|
||||
$('#remaining_due').val(noofdues);
|
||||
}
|
||||
|
||||
}
|
||||
}//else if(loan == "" || loan == 0)
|
||||
//alert(totaldue);
|
||||
|
||||
dateCalulation();
|
||||
|
||||
|
||||
function duecalculation() {
|
||||
var totaldue = 0;
|
||||
var loan = document.getElementById('Loan_Amount').value;
|
||||
var due = document.getElementById('monthly_due').value;
|
||||
|
||||
|
||||
|
||||
if (loan != 0) {
|
||||
if (due == 0) {
|
||||
alert("Enter Monthly Due Amount....!");
|
||||
$('#monthly_due').focus();
|
||||
} else {
|
||||
|
||||
totaldue = loan / due;
|
||||
|
||||
if (totaldue < 1) {
|
||||
alert("Please Enter Correct Due Amount..!");
|
||||
$('#monthly_due').focus();
|
||||
} else {
|
||||
document.getElementById('no_of_due').value = Math.ceil(totaldue);
|
||||
var noofdues = document.getElementById('no_of_due').value;
|
||||
$('#remaining_due').val(noofdues);
|
||||
}
|
||||
|
||||
}
|
||||
} //else if(loan == "" || loan == 0)
|
||||
//alert(totaldue);
|
||||
|
||||
dateCalulation();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function dateCalulation()
|
||||
{
|
||||
//alert('j');
|
||||
var loanamount=document.getElementById('Loan_Amount').value;
|
||||
if(loanamount == 0.00 || loanamount == "")
|
||||
{
|
||||
$('#loan_issued_date').val("");
|
||||
$('#due_started').val("");
|
||||
$('#monthly_due').val("0.00");
|
||||
$('#remaining_due').val(0);
|
||||
$('#no_of_due').val(0);
|
||||
$('#Loan_Amount').val("0.00");
|
||||
$('#paid_due').val(0);
|
||||
$('#Paid_Amount').val("0.00");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function dateCalulation() {
|
||||
//alert('j');
|
||||
var loanamount = document.getElementById('Loan_Amount').value;
|
||||
if (loanamount == 0.00 || loanamount == "") {
|
||||
$('#loan_issued_date').val("");
|
||||
$('#due_started').val("");
|
||||
$('#monthly_due').val("0.00");
|
||||
$('#remaining_due').val(0);
|
||||
$('#no_of_due').val(0);
|
||||
$('#Loan_Amount').val("0.00");
|
||||
$('#paid_due').val(0);
|
||||
$('#Paid_Amount').val("0.00");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function finalCheck()
|
||||
{
|
||||
var loanamount=document.getElementById('Loan_Amount').value;
|
||||
if(loanamount != "" && loanamount != 0.00)
|
||||
{
|
||||
var idate=document.getElementById('loan_issued_date').value;
|
||||
var due=document.getElementById('monthly_due').value;
|
||||
var dsdate=document.getElementById('due_started').value;
|
||||
if(idate == "" || due == "" || due == 0.00 || dsdate == ""){
|
||||
alert("Enter All Loan Information Correctly...!");
|
||||
}
|
||||
}
|
||||
function finalCheck() {
|
||||
var loanamount = document.getElementById('Loan_Amount').value;
|
||||
if (loanamount != "" && loanamount != 0.00) {
|
||||
var idate = document.getElementById('loan_issued_date').value;
|
||||
var due = document.getElementById('monthly_due').value;
|
||||
var dsdate = document.getElementById('due_started').value;
|
||||
if (idate == "" || due == "" || due == 0.00 || dsdate == "") {
|
||||
alert("Enter All Loan Information Correctly...!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -69,14 +69,7 @@
|
||||
<div class="error" id="error"></div>
|
||||
</form>
|
||||
<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;">
|
||||
<thead style="background-color: #ddd;">
|
||||
<tr>
|
||||
|
||||
@ -329,6 +329,7 @@ $currentday = date('d');
|
||||
<th class="celda_encabezado_general" >Paid Leave</th>
|
||||
<th class="celda_encabezado_general" >Days Worked</th>
|
||||
<th class="celda_encabezado_general" >Absent</th>
|
||||
<th class="celda_encabezado_general" >Total Sunday</th>
|
||||
|
||||
</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.'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.'TS';?>"><?php if(!empty($noofsundays)){echo $noofsundays;}else{echo "0";}?></td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
|
||||
@ -428,29 +430,28 @@ $currentday = date('d');
|
||||
|
||||
//alert(s);
|
||||
if(s == 0){
|
||||
resetFinalValues();
|
||||
|
||||
resetFinalValues();
|
||||
var Totalnoofdays = <?php echo $monthdays?>;
|
||||
var alldata = $("#attendance").tableToJSON();
|
||||
// alert(JSON.stringify(alldata));
|
||||
alldata=JSON.stringify(alldata);
|
||||
// alert(alldata);
|
||||
|
||||
|
||||
var month = $('#month').val();
|
||||
var currentmonth = month.substr(0,3);
|
||||
var currentyear = month.substr(4,4);
|
||||
// alert(currentyear);
|
||||
|
||||
var montharray = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
|
||||
var currentmonth = jQuery.inArray(currentmonth,montharray);//!== -1
|
||||
currentmonth++;
|
||||
var currentmonth = jQuery.inArray(currentmonth,montharray);//!== -1
|
||||
currentmonth++;
|
||||
|
||||
//alert(currentmonth);
|
||||
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
||||
|
||||
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
||||
|
||||
var totaldata = 0;
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
|
||||
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
|
||||
//dataType:"json",
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>monthlypay/saveAttendance",
|
||||
@ -643,11 +644,13 @@ function myFunction(p,i,v)
|
||||
|
||||
|
||||
var totalworkingHrs=0;
|
||||
var sundayWorkingHr=0;
|
||||
var totalOTHrs = 0;
|
||||
var paidleave = 0;
|
||||
var totalDaysWorked=0;
|
||||
var absent = 0;
|
||||
var sundays = <?php echo $noofsundays?>;
|
||||
var sundaysArray = <?php echo json_encode($sundayarray); ?>;
|
||||
var publicholidays = <?php echo $noofpublicholidays?>;
|
||||
|
||||
var totaldays = <?php echo $monthdays?>;
|
||||
@ -681,12 +684,30 @@ function myFunction(p,i,v)
|
||||
var str1 = str.substr(-1);
|
||||
var str2 = str.substr(-2);
|
||||
var str3 = str.substr(-3);
|
||||
|
||||
|
||||
|
||||
|
||||
if(str1 == 'W')
|
||||
{
|
||||
var current = value.textContent == '' ? 0:parseFloat(value.textContent);
|
||||
totalworkingHrs += current;
|
||||
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);
|
||||
totalworkingHrs += current;
|
||||
}
|
||||
|
||||
if(current == 0){absent++;}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -702,28 +723,29 @@ function myFunction(p,i,v)
|
||||
// break;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// if(paidleave == 1 )
|
||||
// {
|
||||
// absent = 0;
|
||||
// alert('if');
|
||||
// }
|
||||
// if(paidleave == 0)
|
||||
// {
|
||||
// absent = 0;
|
||||
// alert('else if');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // absent = paidleave-0;
|
||||
// // paidleave = 0;
|
||||
// absent = paidleave;
|
||||
// paidleave = 0;
|
||||
// alert('else');
|
||||
// }
|
||||
// if(paidleave == 0)
|
||||
// {
|
||||
// absent = 0;
|
||||
// alert('else if');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // absent = paidleave-0;
|
||||
// // paidleave = 0;
|
||||
// absent = paidleave;
|
||||
// paidleave = 0;
|
||||
// alert('else');
|
||||
// }
|
||||
TotalOT = totalOTHrs + sundayWorkingHr;
|
||||
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(daysworkedid).textContent = parseFloat((totalworkingHrs/8)).toFixed(2);
|
||||
document.getElementById(absentid).textContent = parseFloat(absent).toFixed(2);
|
||||
|
||||
@ -494,7 +494,7 @@ function validateESI() {
|
||||
}
|
||||
|
||||
function validatePF() {
|
||||
var regpf = /^([a-zA-Z]){5}([0-9]){17}?$/;
|
||||
var regpf = /^\d{12}$/;
|
||||
|
||||
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-3">
|
||||
<div class="form-group">
|
||||
@ -1307,8 +1266,8 @@ legend {
|
||||
value="<?php echo $pfno; ?>"
|
||||
onchange="validatePF();" class="form-control"
|
||||
style="text-transform:uppercase"
|
||||
pattern="([a-zA-Z]){5}([0-9]){17}"
|
||||
title=" 5 Character and 17 Digit number (ex:ABCDE12345678901234567)"
|
||||
pattern="\d{12}"
|
||||
title="12 Digit number"
|
||||
onkeypress="return alpha(event);">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -145,7 +145,7 @@ if(!empty($emppay))
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<!--title-->
|
||||
<center>Edit Salary Payment Details</center>
|
||||
<center>Edit Loan Details</center>
|
||||
|
||||
</h1>
|
||||
</section>
|
||||
@ -165,15 +165,15 @@ if(!empty($emppay))
|
||||
|
||||
<form role="form" id="edit" action="<?php echo base_url() ?>emppaydate/editemppay" method="post">
|
||||
<div class="box-body">
|
||||
<div class="col-md-12">
|
||||
<legend>Pay Details</legend>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<legend>Loan Details</legend>
|
||||
</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="form-group">
|
||||
<div class="form-group">
|
||||
@ -182,117 +182,6 @@ if(!empty($emppay))
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
|
||||
@ -4,14 +4,14 @@
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Employee Salary Details</center>
|
||||
<center>Employee Loan Details</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<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>
|
||||
@ -25,49 +25,39 @@
|
||||
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align: right;" >
|
||||
<thead style="background-color: #ddd;">
|
||||
<tr >
|
||||
<th width="7%">Emp ID</th>
|
||||
<th width="8%">Emp Name</th>
|
||||
<th width="8%"> Total Sal in ₹</th>
|
||||
<th width="8%">Basic Pay in ₹</th>
|
||||
<th width="8%">HRA Rate in %</th>
|
||||
<th width="8%">HRA Amt in ₹</th>
|
||||
|
||||
<th width="9%">Allowances in ₹</th>
|
||||
<th width="8%">PF Ratein %</th>
|
||||
<th width="8%">ESI Rate in %</th>
|
||||
<th width="8%">Food Allow in ₹</th>
|
||||
<th width="15%">Employee</th>
|
||||
<th width="7%"> Total Sal in ₹</th>
|
||||
<th width="7%"> Loan Amt in ₹</th>
|
||||
<th width="7%"> Loan Issued Date</th>
|
||||
<th width="7%"> Monthly Due Amt in ₹</th>
|
||||
<th width="7%"> No Of Dues</th>
|
||||
<th width="7%"> Paid Dues</th>
|
||||
<th width="7%"> Remaining Dues</th>
|
||||
<th width="7%"> Paid Amt in ₹</th>
|
||||
<th width="7%">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<?php
|
||||
if(!empty($userRecords))
|
||||
{
|
||||
//print_r($userRecords);
|
||||
foreach($userRecords as $record)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td style="text-align: left;"><?php echo $record->EmpID ?></td>
|
||||
<td style="text-align: left;"><?php echo $record->FirstName ." ". $record->LastName?></td>
|
||||
<td><?php echo $record->TotalSalary; ?></td>
|
||||
<td><?php echo $record->Basic_Pay ?></td>
|
||||
<td><?php echo $record->HRA_Rate ?></td>
|
||||
<td><?php echo $record->HRA_Amount; ?></td>
|
||||
if(!empty($userRecords)) { foreach($userRecords as $record) { ?>
|
||||
<tr>
|
||||
<td style="text-align: left;"><?php echo $record->EmpID ?>-<?php echo $record->FirstName;?></td>
|
||||
<td><?php echo $record->TotalSalary; ?></td>
|
||||
<td><?php echo $record->Loan_Amount; ?></td>
|
||||
<td><?php echo $record->Loan_Issued_Date; ?></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>
|
||||
<a href="<?php echo base_url().'emppaydate/editOldemppay/'.$record->Pay_Data_ID; ?>"><i class="btn btn-success">EDIT</i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<a href="<?php echo base_url().'emppaydate/editOldemppay/'.$record->Pay_Data_ID; ?>"><i class="btn btn-success">EDIT</i></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } }?>
|
||||
</table>
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
@ -71,6 +71,28 @@
|
||||
top: 7px;
|
||||
}
|
||||
/* 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{
|
||||
background-color: #ddd !important;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user