HR issue : GWM
This commit is contained in:
parent
452e0746b5
commit
44df52ad0b
@ -69,8 +69,9 @@ class Payslip extends BaseController
|
|||||||
$EmpId = $this->request->getPost('employee');
|
$EmpId = $this->request->getPost('employee');
|
||||||
|
|
||||||
$res = $this->payroll_model->getMonthlyPayDetails($EmpId, $PayOn);
|
$res = $this->payroll_model->getMonthlyPayDetails($EmpId, $PayOn);
|
||||||
// print_r($res);die;
|
|
||||||
$result = $res[0];
|
$result = $res[0];
|
||||||
|
|
||||||
$loan = [];
|
$loan = [];
|
||||||
$loanHistory = [];
|
$loanHistory = [];
|
||||||
$loan_id = 0;
|
$loan_id = 0;
|
||||||
@ -128,7 +129,6 @@ class Payslip extends BaseController
|
|||||||
'UANNO' => $result->PFNO,
|
'UANNO' => $result->PFNO,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
$insert = $this->payroll_model->insertPayroll($data);
|
$insert = $this->payroll_model->insertPayroll($data);
|
||||||
if($insert){
|
if($insert){
|
||||||
if(count($loan)){
|
if(count($loan)){
|
||||||
|
|||||||
@ -494,7 +494,7 @@ class Payroll_model extends Model
|
|||||||
function getMonthlyPayDetails($EmpId, $PayOn)
|
function getMonthlyPayDetails($EmpId, $PayOn)
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_monthly_pay_inputs MonthlyPay ')
|
$builder = $this->db->table('t_monthly_pay_inputs MonthlyPay ')
|
||||||
->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.*')
|
->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount')
|
||||||
->join('t_employee_details as E', 'MonthlyPay.EmpID = E.EmpID', 'left')
|
->join('t_employee_details as E', 'MonthlyPay.EmpID = E.EmpID', 'left')
|
||||||
->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1', 'left')
|
->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1', 'left')
|
||||||
->where('MonthlyPay.EmpID', $EmpId)
|
->where('MonthlyPay.EmpID', $EmpId)
|
||||||
|
|||||||
@ -16,7 +16,7 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
|||||||
$('#PayOn').change(function() {
|
$('#PayOn').change(function() {
|
||||||
var id = $('#PayOn').val();
|
var id = $('#PayOn').val();
|
||||||
if (id != '-1') {
|
if (id != '-1') {
|
||||||
// $('#content').loader('show');
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: {
|
data: {
|
||||||
id1: id
|
id1: id
|
||||||
@ -26,7 +26,7 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
|||||||
success: function(result) {
|
success: function(result) {
|
||||||
if (result) {
|
if (result) {
|
||||||
$("#Employee").empty();
|
$("#Employee").empty();
|
||||||
// $('#content').loader('hide');
|
$('#loader').hide();
|
||||||
$("#Employee").append(result);
|
$("#Employee").append(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
|||||||
$('#Employee').find('option').each(function() {
|
$('#Employee').find('option').each(function() {
|
||||||
c++;
|
c++;
|
||||||
var employee = $(this).val();
|
var employee = $(this).val();
|
||||||
// $('#content').loader('show');
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: {
|
data: {
|
||||||
payon: payon,
|
payon: payon,
|
||||||
@ -68,7 +68,8 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url(); ?>payslip/callsp",
|
url: "<?php echo base_url(); ?>payslip/callsp",
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
// $('#content').loader('hide');
|
console.log(result);
|
||||||
|
$('#loader').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -81,11 +82,11 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
|||||||
alert(c + '-Employees Salary Added Successfully!');
|
alert(c + '-Employees Salary Added Successfully!');
|
||||||
$('form#PayslipGenerator').submit();
|
$('form#PayslipGenerator').submit();
|
||||||
alert("Please wait while Payslip Downloading...!");
|
alert("Please wait while Payslip Downloading...!");
|
||||||
// $('#content').loader('hide');
|
$('#loader').hide();
|
||||||
}, time);
|
}, time);
|
||||||
} // else for select all not selected
|
} // else for select all not selected
|
||||||
else {
|
else {
|
||||||
// $('#content').loader('show');
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: {
|
data: {
|
||||||
payon: payon,
|
payon: payon,
|
||||||
@ -100,7 +101,7 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
|||||||
if (result == 1) {
|
if (result == 1) {
|
||||||
|
|
||||||
$('form#PayslipGenerator').submit();
|
$('form#PayslipGenerator').submit();
|
||||||
// $('#content').loader('hide');
|
$('#loader').hide();
|
||||||
alert("Payslip Downloaded Successfully..!");
|
alert("Payslip Downloaded Successfully..!");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -113,7 +114,7 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
|||||||
url: "<?php echo base_url(); ?>payslip/callsp",
|
url: "<?php echo base_url(); ?>payslip/callsp",
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
$('form#PayslipGenerator').submit();
|
$('form#PayslipGenerator').submit();
|
||||||
// $('#content').loader('hide');
|
$('#loader').hide();
|
||||||
alert("Salary Calculated Successfully..!");
|
alert("Salary Calculated Successfully..!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user