diff --git a/app/Controllers/Emppaydate.php b/app/Controllers/Emppaydate.php index 98423449..d71c129b 100644 --- a/app/Controllers/Emppaydate.php +++ b/app/Controllers/Emppaydate.php @@ -78,12 +78,6 @@ class Emppaydate extends BaseController function addNewemppay() { - - - - - - $EmpID = $this->request->getPost('EmpID'); $Loan_Amount = $this->request->getPost('Loan_Amount'); $Load_Issued_date = $this->request->getPost('loan_issued_date'); @@ -96,13 +90,9 @@ class Emppaydate extends BaseController $Remaining_Due = $this->request->getPost('remaining_due'); $Paid_Amount = $this->request->getPost('Paid_Amount'); $CreateBy = $this->session->get('userId'); - - $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); - - if ($Loan_Amount != 0) { $result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'add'); if ($result2 > 0) { @@ -111,8 +101,8 @@ class Emppaydate extends BaseController echo ""; } } - + return redirect()->to('/emppayListings'); } /** @@ -123,6 +113,7 @@ class Emppaydate extends BaseController $data['emppay'] = $this->emppaydate_model->getUserInfo($paydataid); + // print_r($data);die; $this->global['pageTitle'] = 'Edit Employee Pay Monthly Details '; @@ -151,16 +142,9 @@ class Emppaydate extends BaseController $Remaining_Due = $this->request->getPost('remaining_due'); $Paid_Amount = $this->request->getPost('Paid_Amount'); $Last_Mod_By = $this->session->get('userId'); - - - - - - $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); - if ($Loan_Amount != 0 and $loan_ID != '') { $result2 = $this->emppaydate_model->addLoanInfo($loandetails, 'update'); if ($result2 > 0) { @@ -177,19 +161,16 @@ class Emppaydate extends BaseController echo ""; } } - - - - + return redirect()->to('/emppayListings'); } function deleteEmpPay() { - $EmpID = $this->request->getPost('id'); + $LoanID = $this->request->getPost('id'); //echo $EmpID; - $result = $this->emppaydate_model->deleteEmployeePay($EmpID); + $result = $this->emppaydate_model->deleteEmployeePay($LoanID); if ($result == 1) { echo "Deleted Sucessfully..!"; } else { diff --git a/app/Models/Emppaydate_model.php b/app/Models/Emppaydate_model.php index 17bdf4ba..5d65ce5b 100644 --- a/app/Models/Emppaydate_model.php +++ b/app/Models/Emppaydate_model.php @@ -1,11 +1,12 @@ -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(); + ->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(); return $result; } - - function deleteEmployeePay($EmpID) + + function deleteEmployeePay($Loan_ID) { - $query = $this->db->table('t_emp_pay_data')->delete(['EmpID' => $EmpID]); + $query = $this->db->table('t_loan_master')->delete(['Loan_ID' => $Loan_ID]); return $query; - } - - - - + + + + function addNewemppay($emppay) { $this->db->transStart(); $builder = $this->db->table('t_emp_pay_data'); - $builder->insert($emppay); - + $builder->insert($emppay); + $paydataid = $this->db->insertId(); - + $this->db->transComplete(); - + return $emppay; } - - function addLoanInfo($dataarray,$string) - { - if($string == 'add'){ - $builder = $this->db->table('t_loan_master'); - $builder->insert($dataarray); - $loanid = $this->db->affectedRows(); - return $loanid; - } - else if($string == 'update') - { - $loanid = $dataarray['Loan_ID']; - - $this->db->table('t_loan_master') - ->where('Loan_ID',$loanid) - ->update($dataarray); - - $loanid = $this->db->affectedRows(); - return $loanid; - } - } - function getUserInfo($paydataid) + function addLoanInfo($dataarray, $string) { - $sql = 'select t_emp_pay_data.Pay_Data_ID,t_emp_pay_data.EmpID as PAYEMPID,t_emp_pay_data.Basic_Pay,t_emp_pay_data.HRA_Rate,t_emp_pay_data.Allowances,t_emp_pay_data.Food_Allowances,t_emp_pay_data.Incentives,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate,t_emp_pay_data.HRA_Amount,t_emp_pay_data.TotalSalary,t_employee_details.FirstName,t_employee_details.LastName,t_loan_master.*from t_emp_pay_data + if ($string == 'add') { + $builder = $this->db->table('t_loan_master'); + $builder->insert($dataarray); + + $loanid = $this->db->affectedRows(); + return $loanid; + } else if ($string == 'update') { + $loanid = $dataarray['Loan_ID']; + + $this->db->table('t_loan_master') + ->where('Loan_ID', $loanid) + ->update($dataarray); + + $loanid = $this->db->affectedRows(); + return $loanid; + } + } + function getUserInfo($paydataid) + { + $sql = 'select t_emp_pay_data.Pay_Data_ID,t_emp_pay_data.EmpID as PAYEMPID,t_emp_pay_data.Basic_Pay,t_emp_pay_data.HRA_Rate,t_emp_pay_data.Allowances,t_emp_pay_data.Food_Allowances,t_emp_pay_data.Incentives,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate,t_emp_pay_data.HRA_Amount,t_emp_pay_data.TotalSalary,t_employee_details.FirstName,t_employee_details.LastName,t_loan_master.*from t_emp_pay_data join t_employee_details on t_emp_pay_data.EmpID=t_employee_details.EmpID left join t_loan_master on t_emp_pay_data.EmpID=t_loan_master.EmpID and t_loan_master.is_Active = 1 where t_emp_pay_data.Pay_Data_ID = ?;'; - $query = $this->db->query($sql,array($paydataid)); - + $query = $this->db->query($sql, array($paydataid)); + return $query->getResult(); } function getEmpPayData($EmpID) { - $sql = 'select t_emp_pay_data.Pay_Data_ID,t_emp_pay_data.EmpID,t_emp_pay_data.Basic_Pay,t_emp_pay_data.HRA_Rate,t_emp_pay_data.Allowances,t_emp_pay_data.Food_Allowances,t_emp_pay_data.Incentives,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate,t_emp_pay_data.HRA_Amount,t_emp_pay_data.TotalSalary from t_emp_pay_data + $sql = 'select t_emp_pay_data.Pay_Data_ID,t_emp_pay_data.EmpID,t_emp_pay_data.Basic_Pay,t_emp_pay_data.HRA_Rate,t_emp_pay_data.Allowances,t_emp_pay_data.Food_Allowances,t_emp_pay_data.Incentives,t_emp_pay_data.PF_Rate,t_emp_pay_data.ESI_Rate,t_emp_pay_data.HRA_Amount,t_emp_pay_data.TotalSalary from t_emp_pay_data where t_emp_pay_data.EmpID = ?;'; - $query = $this->db->query($sql,array($EmpID)); - + $query = $this->db->query($sql, array($EmpID)); + return $query->getRow(); } - - - function editemppay($emppaydatas) + + + function editemppay($emppaydatas) { - $EmpID=$emppaydatas['EmpID']; - //echo $paydateid; - //print_r($emppaydatas);die(); + $EmpID = $emppaydatas['EmpID']; + //echo $paydateid; + //print_r($emppaydatas);die(); $this->db->table('t_emp_pay_data') ->where('EmpID', $EmpID) ->update($emppaydatas); return TRUE; } - - - function viewemppay($emppaydata, $paydateid) + + + function viewemppay($emppaydata, $paydateid) { $this->db->table('t_emp_pay_data') ->where('Pay_Data_ID', $paydateid) ->update($emppaydata); - - + + return TRUE; } - - } -?> diff --git a/app/Views/addemppaydate.php b/app/Views/addemppaydate.php index 835df076..a7b11127 100644 --- a/app/Views/addemppaydate.php +++ b/app/Views/addemppaydate.php @@ -1,303 +1,290 @@ - -
- -
-
-

Add Employee Pay

-
-
- -
-
- Back -
-
-
- -
- - -
- - - -
- - -
- - - - - - -
- Loan Details -
- -
- -
-
- Employee ID - * -
- - '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); - - ?> -
-
-
- - -
-
-
- - - Loan Amount - -
-
-
- - - - -
-
-
- Loan Issue(d) Date - -
-
-
- - -
-
-
- Monthly Due - -
-
-
-
-
-
- Due Started - -
-
-
-
-
-
- No Of Due(s) - -
-
-
-
-
-
- Paid Amount - -
-
-
- - -
- - - -
- - -
- - -
-
-
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- listErrors('
', '
'); ?> +
+
+ +
+ +
+
+
+

Add Employee Pay

+
+ Back +
-
-
+ +
+
+
+
+

Loan Details

+
+
+
+
+
+ +
+
+
+
+ Employee ID + * +
+ + '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); + + ?> +
+
+
+
+
+
+ Loan Amount + +
+
+
+
+
+
+ Loan Issue(d) Date + +
+
+
+
+
+
+ Monthly Due + +
+
+
+
+
+
+
+
+ Due Started + +
+
+
+
+
+
+ No Of Due(s) + +
+
+
+
+
+
+ Paid Amount + +
+
+
+
+ + +
+
+
+ + +
+
+ +
+
+ getFlashdata('listErrors'); + if ($listErrors) { + ?> +
+
+
+ + getFlashdata('listErrors'); ?> +
+
+
+ + +
+ getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
+ + + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?> +
+ + +
+
+
+
+ + + + - \ No newline at end of file diff --git a/app/Views/editOldemppay.php b/app/Views/editOldemppay.php index c6f39ee9..07906209 100644 --- a/app/Views/editOldemppay.php +++ b/app/Views/editOldemppay.php @@ -1,133 +1,151 @@ - - Pay_Data_ID; - $EmpID=$ep->PAYEMPID; - $Empname=$ep->FirstName ." ". $ep->LastName ; - $TotalSalary=$ep->TotalSalary; - $Basic_Pay=$ep->Basic_Pay; - $HRA_Rate=$ep->HRA_Rate; - $HRA_Amount=$ep->HRA_Amount; - - $Allowances=$ep->Allowances; - $PF_Rate=$ep->PF_Rate; - $ESI_Rate=$ep->ESI_Rate; - $is_Active=$ep->is_Active; - $Food_Allowances=$ep->Food_Allowances; - $Incentives=$ep->Incentives; - $Loan_Amount=$ep->Loan_Amount; - if(empty($Loan_Amount)){$Loan_Amount = 0.00;} - if( !empty($ep->Loan_Issued_Date) ){ - $Loan_issued_date=new DateTime( $ep->Loan_Issued_Date, new DateTimeZone('Asia/Kolkata')); - $Loan_issued_date=$Loan_issued_date->format('d-m-Y');} - else{$Loan_issued_date=null;} - - $Monthly_due=$ep->Monthly_Due; - if(empty($Monthly_due)){$Monthly_due = 0.00;} - if(!empty($ep->Due_Start_Date)){ - $Due_start_date=new DateTime( $ep->Due_Start_Date, new DateTimeZone('Asia/Kolkata')); - $Due_start_date=$Due_start_date->format('d-m-Y');} - else{$Due_start_date=null;} - $No_of_dues=$ep->No_of_Dues; - if(empty($No_of_dues)){$No_of_dues = 0.00;} - $Paid_Due=$ep->Paid_Due; - if(empty($Paid_Due)){$Paid_Due = 0.00;} - $Remaining_Due=$ep->Remaining_Due; - if(empty($Remaining_Due)){$Remaining_Due = 0.00;} - $Paid_Amount=$ep->Paid_Amount; - if(empty($Paid_Amount)){$Paid_Amount = 0.00;} - $Created_By=$ep->Created_By; - $Created_Time=$ep->Created_Time; - $Last_Mod_By=$ep->Last_Mod_By; - $Last_Mod_Time=$ep->Last_Mod_Time; - $loanid = $ep->Loan_ID; +$Pay_Data_ID = ''; +$EmpID = ''; +$Empname = ""; +$Basic_Pay = ''; +$HRA_Rate = ''; - +$Allowances = ''; +$PF_Rate = ''; +$ESI_Rate = ''; +$is_Active = ''; +$Food_Allowances = ''; +$Incentives = ''; +$Created_By = ''; +$Created_Time = ''; +$Last_Mod_By = ''; +$Last_Mod_Time = ''; +$HRA_Amount = 0.0; +$TotalSalary = 0.0; +$Loan_Amount = ''; +$Loan_issued_date = ''; +$Monthly_due = ''; +$Due_start_date = ''; +$No_of_dues = ''; +$Remaining_Due = ''; +$Paid_Due = ''; +$Paid_Amount = 0; +$loanid = ''; + + +if (!empty($emppay)) { + // print_r($emppay); + // die(); + foreach ($emppay as $ep) { + + + + $Pay_Data_ID = $ep->Pay_Data_ID; + $EmpID = $ep->PAYEMPID; + $Empname = $ep->FirstName . " " . $ep->LastName; + $TotalSalary = $ep->TotalSalary; + $Basic_Pay = $ep->Basic_Pay; + $HRA_Rate = $ep->HRA_Rate; + $HRA_Amount = $ep->HRA_Amount; + + $Allowances = $ep->Allowances; + $PF_Rate = $ep->PF_Rate; + $ESI_Rate = $ep->ESI_Rate; + $is_Active = $ep->is_Active; + $Food_Allowances = $ep->Food_Allowances; + $Incentives = $ep->Incentives; + $Loan_Amount = $ep->Loan_Amount; + if (empty($Loan_Amount)) { + $Loan_Amount = 0.00; + } + if (!empty($ep->Loan_Issued_Date)) { + $Loan_issued_date = new DateTime($ep->Loan_Issued_Date, new DateTimeZone('Asia/Kolkata')); + $Loan_issued_date = $Loan_issued_date->format('d-m-Y'); + } else { + $Loan_issued_date = null; + } + + $Monthly_due = $ep->Monthly_Due; + if (empty($Monthly_due)) { + $Monthly_due = 0.00; + } + if (!empty($ep->Due_Start_Date)) { + $Due_start_date = new DateTime($ep->Due_Start_Date, new DateTimeZone('Asia/Kolkata')); + $Due_start_date = $Due_start_date->format('d-m-Y'); + } else { + $Due_start_date = null; + } + $No_of_dues = $ep->No_of_Dues; + if (empty($No_of_dues)) { + $No_of_dues = 0.00; + } + $Paid_Due = $ep->Paid_Due; + if (empty($Paid_Due)) { + $Paid_Due = 0.00; + } + $Remaining_Due = $ep->Remaining_Due; + if (empty($Remaining_Due)) { + $Remaining_Due = 0.00; + } + $Paid_Amount = $ep->Paid_Amount; + if (empty($Paid_Amount)) { + $Paid_Amount = 0.00; + } + $Created_By = $ep->Created_By; + $Created_Time = $ep->Created_Time; + $Last_Mod_By = $ep->Last_Mod_By; + $Last_Mod_Time = $ep->Last_Mod_Time; + $loanid = $ep->Loan_ID; } } @@ -135,365 +153,289 @@ if(!empty($emppay)) ?> -
- -
-

- -
Edit Loan Details
- -

-
- -
-
- Back -
-
-
- -
- -
- - - -
-
- - -
- Loan Details -
- -
- - -
-
-
- Employee ID - -
-
-
- -
-
-
- - - Loan Amount - -
-
-
- - - - -
-
-
- Loan Issue(d) Date - -
-
-
- - -
-
-
- Monthly Due - -
-
-
-
-
-
- Due Started - -
-
-
-
-
-
- No Of Due(s) - -
-
-
- -
-
-
- Paid Amount - -
-
-
- - -
- - - - - -
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- - -
-
-
- - -
-
-
-
- - - - - -
- -
- - -
- - - -
-
-
- - - - - -
- - - -
- getFlashdata('error'); - if($error) - { - ?> -
- - getFlashdata('error'); ?> -
- - getFlashdata('success'); - if($success) - { - ?> -
- - getFlashdata('success'); ?> -
- - -
-
- ', '
'); ?> +
+
+ +
+ +
+
+
+

Edit Loan Details

+
+ Back +
- - -
+ +
+
+
+
+

Loan Details

+
+
+
+
+
+ +
+ + + + + +
+
+
+
+ Employee ID + +
+
+
+
+
+
+ + + Loan Amount + +
+
+
+
+
+
+ Loan Issue(d) Date + +
+
+
+
+
+
+ Monthly Due + +
+
+
+
+
+
+
+
+ Due Started + +
+
+
+
+
+
+ No Of Due(s) + +
+
+
+
+
+
+ Paid Amount + +
+
+
+
+ + +
+
+
+ + +
+
+ +
+
+ getFlashdata('listErrors'); + if ($listErrors) { + ?> +
+
+
+ + getFlashdata('listErrors'); ?> +
+
+
+ + +
+ getFlashdata('error'); + if ($error) { + ?> +
+ + getFlashdata('error'); ?> +
+ + + getFlashdata('success'); + if ($success) { + ?> +
+ + getFlashdata('success'); ?> +
+ + +
+
+
+
+ +
+
+ + - \ No newline at end of file + 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 finalCheck() { + //alert("final check"); + + + + 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...!"); + return false; + } + } + + if ($('#Total_Salary').val() == '' || $('#HRA_Rate').val() == '' || $('#Allowances').val() == '' || $('#PF_Rate').val() == '' || $('#ESI_Rate').val() == '' || $('#Food_Allowances').val() == '' || $('#Incentives').val() == '') { + + alert("Please Enter All Information Correctly..!"); + return false; + } + } + + $("#deleteemp").click(function() { + var loanid = "Loan_ID; + } ?>"; + var i = confirm("Do You want to delete " + loanid + " from Loan Master?"); + // alert(i);s + if (i) { + // $('#content').loader('show'); + $.ajax({ + data: { + id: loanid + }, + type: "POST", + url: "emppaydate/deleteEmpPay", + success: function(result) { + if (result) { + + alert(result); + // $('#content').loader('hide'); + window.location.href = "emppayListings"; + + } + + } + }); + } + + }); + + \ No newline at end of file diff --git a/app/Views/emppayListing.php b/app/Views/emppayListing.php index c0c3e68e..4f236708 100644 --- a/app/Views/emppayListing.php +++ b/app/Views/emppayListing.php @@ -1,88 +1,66 @@ - - -
- -
-

-
Employee Loan Details
-

-
-
+
+
+ +
+ +
-
- +
+
+

Employee Loan Details

+
+
-
-
-
- -
-
- - - - - - - - - - - - - +
+
+
+
Employee Total Sal in ₹ Loan Amt in ₹ Loan Issued Date Monthly Due Amt in ₹ No Of Dues Paid Dues Remaining Dues Paid Amt in ₹Action
+ + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - -
Employee Total Sal in ₹ Loan Amt in ₹ Loan Issued Date Monthly Due Amt in ₹ No Of Dues Paid Dues Remaining Dues Paid Amt in ₹Action
EmpID ?>-FirstName;?>TotalSalary; ?>Loan_Amount; ?>Loan_Issued_Date; ?>Monthly_Due; ?>No_of_Dues; ?>Paid_Due; ?>Remaining_Due; ?>Paid_Amount; ?> - EDIT -
- -
- -
-
+ if (!empty($userRecords)) { + foreach ($userRecords as $record) { ?> + + EmpID ?>-FirstName; ?> + TotalSalary; ?> + Loan_Amount; ?> + Loan_Issued_Date; ?> + Monthly_Due; ?> + No_of_Dues; ?> + Paid_Due; ?> + Remaining_Due; ?> + Paid_Amount; ?> + + + + + + + +
+
+
-
+
+
+ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/Views/includes/new_footer.php b/app/Views/includes/new_footer.php index 6a24dc58..31ec9b10 100644 --- a/app/Views/includes/new_footer.php +++ b/app/Views/includes/new_footer.php @@ -1,29 +1,17 @@ + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/Views/leavereports.php b/app/Views/leavereports.php index 65b8294c..19ae4f81 100644 --- a/app/Views/leavereports.php +++ b/app/Views/leavereports.php @@ -1,142 +1,158 @@ - - + - - - - + + + + -
- -
-

-
Leave Report
-

-
-
-
-
-
-
-
-
- -
- +
+
+ +
+ +
+
+
+
+

+
Leave Report
+

- -
- - -
- -
- -
- - - - - - - - - - - - - - - NoofAbsentDays != 0){ ?> - - - - +
+
+
+
+
+
+ +
- -
- - - - + + + + + + + + + NoofAbsentDays != 0) { ?> + + + + + + + + + + + - - -
S.NoEmployee NameLeave TakenPaid Leave Taken
EmpID.'/'.$selectedfiscalyears.'">'.$rec->EmpID.'-'.$rec->FullName.''; ?>EmpID.'-'.$rec->FullName ; ?>NoofAbsentDays)) { echo number_format((int)$rec->NoofAbsentDays, 0, '.', ''); } else { echo "0"; } ?>NoofPaidLeaveDays)) { echo number_format((int)$rec->NoofPaidLeaveDays, 0, '.', ''); } else { echo "0"; } ?>
Leave TakenPaid Leave Taken
EmpID . '/' . $selectedfiscalyears . '">' . $rec->EmpID . '-' . $rec->FullName . ''; ?>EmpID . '-' . $rec->FullName; ?>NoofAbsentDays)) { + echo number_format((int)$rec->NoofAbsentDays, 0, '.', ''); + } else { + echo "0"; + } ?>NoofPaidLeaveDays)) { + echo number_format((int)$rec->NoofPaidLeaveDays, 0, '.', ''); + } else { + echo "0"; + } ?>
-
-
-
-
-
+ + + +
+ + + + + + - \ No newline at end of file + // var name = ""; + // $("#leavelistings").tableExport({ + // bootstrap: true, + // separator: ",", + // headings: true, + // buttonContent: "Export", + // addClass: "", + // defaultClass: "btn", + // defaultTheme: "btn-default", + // type: "csv", + // fileName: name, + // position: "bottom", + // stripQuotes: true + // }); + \ No newline at end of file diff --git a/app/Views/leavereportsmonthwise.php b/app/Views/leavereportsmonthwise.php index a219006d..8ac1c1eb 100644 --- a/app/Views/leavereportsmonthwise.php +++ b/app/Views/leavereportsmonthwise.php @@ -1,11 +1,10 @@ - - - - + + + -
- -
-

-
Employee Monthly Payslip
-

-
-
- - -
- -
- 'paylist'); - echo form_open('paysliplist', $attributes); - $today = date('m-Y'); - $data = array('type' => 'text','name' => 'month','id' => 'month','value' => $today,'class' => 'form-control select2'); - echo form_input($data); - ?> -
-
- -
- -
-
-
- -
- - -
- -
-
- - +
+
+ +
+ +
+
+
+
+

Employee Monthly Payslip

+
+
+
+
+
+
+
+
+ 'paylist'); + echo form_open('paysliplist', $attributes); + $today = date('m-Y'); + $data = array('type' => 'text', 'name' => 'month', 'id' => 'month', 'value' => $today, 'class' => 'form-control select2', ' data-provide' => 'datepicker', 'data-date-format' => 'M-yyyy', 'data-date-min-view-mode' => '1'); + echo form_input($data); + ?> +
+ +
+ +
+
+
+
+ + - + - + - - + + - - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + - -
Month Year Employee IdEmployee NameEmployee Name Paid Days Salary in ₹Company Contribution in ₹Company Contribution in ₹ Loan Recoverd in ₹Loan Balance in ₹ActionLoan Balance in ₹Action
PayOn ?>EmpID ?>FName ." ". $record->Lname ?>NoofDaysWorked + $record->Paid_Leave) ?>LessAdvance ?>TotalCompCon ?>Advance)){echo number_format($record->Advance,2,'.','');}else {echo $record->Advance;} ?>BalanceAdvance ?> - - EDIT - -
PayOn ?>EmpID ?>FName . " " . $record->Lname ?>NoofDaysWorked + $record->Paid_Leave) ?>LessAdvance ?>TotalCompCon ?>Advance)) { + echo number_format($record->Advance, 2, '.', ''); + } else { + echo $record->Advance; + } ?>BalanceAdvance ?> + EDIT +
- -
- -
-
+ + +
+
+ - + + + + \ No newline at end of file diff --git a/app/Views/publicholidays.php b/app/Views/publicholidays.php index e1fe3cf8..29ecb08a 100644 --- a/app/Views/publicholidays.php +++ b/app/Views/publicholidays.php @@ -1,244 +1,186 @@ - - - - - - - - - + + + + -
- -
-

-
Public Holiday Information -
-

-
-
- - + +
+
+ +
+ +
-
-
-
- -
- - -
- -
-
-
- Holiday Name : - -
-
- Date : - -
-
- -
-
-

 

-
- - - - - - - - - - - - - - H_Date); - $date = date_format($date,'d-m-Y'); - ?> - - - - - - - - - - - - - -
Holiday_NameDateAction
H_Name)){echo $day->H_Name;}else{echo "NO DATA";}?>
-

 

-
-
- - -
- -
-
- -
+
+
+

Public Holiday Information -

+
-
+
+
+
+
+
+ Holiday Name : + +
+
+ Date : + +
+
+ +
+
+
+ + + + + + + + + + + H_Date); + $date = date_format($date, 'd-m-Y'); + ?> + + + + + + + + +
Holiday_NameDateAction
H_Name)) { + echo $day->H_Name; + } else { + echo "NO DATA"; + } ?>
+

 

+
+
+ +
+
+
+
+
+
+
+ + - - - - - + + + - - - - - \ No newline at end of file + }); + \ No newline at end of file diff --git a/app/Views/rawmaterialListing.php b/app/Views/rawmaterialListing.php index 68485e34..7dc352f5 100644 --- a/app/Views/rawmaterialListing.php +++ b/app/Views/rawmaterialListing.php @@ -39,104 +39,104 @@
-
- -
- -
-
-
-
-

Material Master Details

-
-
- -
- getFlashdata('error'); - if ($error) { - $type = "error"; - echo show_alert($type, $error); - } - $success = session()->getFlashdata('success'); - if ($success) { - $type = "success"; - echo show_alert($type, $success); +
+ +
+ +
+
+
+
+

Material Master Details

+
+
+ +
+ getFlashdata('error'); + if ($error) { + $type = "error"; + echo show_alert($type, $error); + } + $success = session()->getFlashdata('success'); + if ($success) { + $type = "success"; + echo show_alert($type, $success); + } + ?> +
+
+
+
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + CreatedDate)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->CreatedDate)); + } ?> + + + + + + stock != null || '') { ?> + + + + + + + + -
-
-
-
- - - - - - - - -
- -
-
Created DateMaterial CodeMaterial DescriptionType of MaterialUOMOpening StockMaterial CategoryHSN Code
MaterialCode ?> MaterialName ?>MaterialType ?>UOM ?>stock ?>0Category ?>HSNCODE ?>
- - - - - - - - - - - - - - - - - CreatedDate)) == "30-11--0001") { - $cdate = '00-00-0000'; - } else { - $cdate = date('d-m-Y', strtotime($record->CreatedDate)); - } ?> - - - - - - stock != null || '') { ?> - - - - - - - - - - -
Created DateMaterial CodeMaterial DescriptionType of MaterialUOMOpening StockMaterial CategoryHSN Code
MaterialCode ?> MaterialName ?>MaterialType ?>UOM ?>stock ?>0Category ?>HSNCODE ?>
-
-
-
-
-
-
-
+ + +
+
+
+
+ + + @@ -165,75 +165,78 @@ $(document).ready(function() { // Initialize the DataTable var table = $('#raw_material_list_table').DataTable({ - dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination - buttons: [ - 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons - ], - pageLength: 10, // Default rows per page - lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options - responsive: true, // Responsive table - order: [], // Default ordering (column index 0, descending) - language: { - paginate: { - next: '', // Next button icon - previous: '' // Previous button icon - } + dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination + buttons: [ + 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons + ], + pageLength: 10, // Default rows per page + lengthMenu: [ + [10, 20, 30, 50, -1], + [10, 20, 30, 50, "All"] + ], // Rows per page options + responsive: true, // Responsive table + order: [], // Default ordering (column index 0, descending) + language: { + paginate: { + next: '', // Next button icon + previous: '' // Previous button icon } + } }); // Date range filter function $.fn.dataTable.ext.search.push( - function(settings, data, dataIndex) { - var fromDate = $('#fromDate').val(); - var toDate = $('#toDate').val(); - - if (!fromDate || !toDate) { - return true; // If no dates selected, don't filter - } - - var dateStr = data[0]; // Assuming the date is in the first column - var dateParts = dateStr.split("-"); - var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object - - var startDate = new Date(fromDate); - var endDate = new Date(toDate); - - // Adjust startDate to include the day before the selected fromDate - startDate.setDate(startDate.getDate() - 1); - - // Ensure endDate includes the entire end date by setting time to the end of the day - endDate.setHours(23, 59, 59, 999); + function(settings, data, dataIndex) { + var fromDate = $('#fromDate').val(); + var toDate = $('#toDate').val(); - // Return true if the date is within the range - return date >= startDate && date <= endDate; + if (!fromDate || !toDate) { + return true; // If no dates selected, don't filter } + + var dateStr = data[0]; // Assuming the date is in the first column + var dateParts = dateStr.split("-"); + var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object + + var startDate = new Date(fromDate); + var endDate = new Date(toDate); + + // Adjust startDate to include the day before the selected fromDate + startDate.setDate(startDate.getDate() - 1); + + // Ensure endDate includes the entire end date by setting time to the end of the day + endDate.setHours(23, 59, 59, 999); + + // Return true if the date is within the range + return date >= startDate && date <= endDate; + } ); // Handle form submission for the date range filter $("#DateRangeFilter").submit(function(e) { - e.preventDefault(); - table.draw(); // Redraw the table to apply the filter + e.preventDefault(); + table.draw(); // Redraw the table to apply the filter }); // Reset button functionality $("#resetButton").click(function() { - $("#fromDate").val(''); - $("#toDate").val(''); - table.draw(); // Redraw the table to clear the filter + $("#fromDate").val(''); + $("#toDate").val(''); + table.draw(); // Redraw the table to clear the filter }); // Automatically focus and open the To Date picker when From Date is selected document.getElementById('fromDate').addEventListener('change', function() { - var fromDate = this.value; - var toDateInput = document.getElementById('toDate'); - - // Set the min attribute of the To Date input to the selected From Date - toDateInput.min = fromDate; + var fromDate = this.value; + var toDateInput = document.getElementById('toDate'); - // Optionally reset the To Date input if the current value is before the new min date - if (toDateInput.value < fromDate) { - toDateInput.value = fromDate; - } + // Set the min attribute of the To Date input to the selected From Date + toDateInput.min = fromDate; + + // Optionally reset the To Date input if the current value is before the new min date + if (toDateInput.value < fromDate) { + toDateInput.value = fromDate; + } }); -}); + }); \ No newline at end of file diff --git a/app/Views/userListing.php b/app/Views/userListing.php index 871e2f99..a4d87552 100644 --- a/app/Views/userListing.php +++ b/app/Views/userListing.php @@ -50,9 +50,9 @@
- Add New User + Add New User
- + getFlashdata('error'); @@ -69,62 +69,63 @@
-
- - - + + + + - - + + - - -
-
+ + +
+
- - - - - - - - - - - - - - createdDtm)) == "30-11--0001") { - $cdate = '00-00-0000'; - } else { - $cdate = date('d-m-Y', strtotime($record->createdDtm)); - } ?> - - - - - - - - - + + + + + + + + + - - + + + + + createdDtm)) == "30-11--0001") { + $cdate = '00-00-0000'; + } else { + $cdate = date('d-m-Y', strtotime($record->createdDtm)); + } ?> + + + + + + + + + + + +
Created DateUser NameEmailContact NumberDesignationDepartmentRole NameActions
FirstName ?>EmailId ?>ContactNumber ?>Designation ?>DepartmentName ?>role ?> -     - -     - Created DateUser NameEmailContact NumberDesignationDepartmentRole NameActions
FirstName ?>EmailId ?>ContactNumber ?>Designation ?>DepartmentName ?>role ?> +     + +     +
@@ -184,78 +185,81 @@ var dateSplit = date.split('-'); return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1; }; -$(document).ready(function() { - // Initialize the DataTable - var table = $('#user_list_table').DataTable({ - dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination - buttons: [ - 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons - ], - pageLength: 10, // Default rows per page - lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options - responsive: true, // Responsive table - order: [], // Default ordering (column index 0, descending) - language: { - paginate: { - next: '', // Next button icon - previous: '' // Previous button icon + $(document).ready(function() { + // Initialize the DataTable + var table = $('#user_list_table').DataTable({ + dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination + buttons: [ + 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons + ], + pageLength: 10, // Default rows per page + lengthMenu: [ + [10, 20, 30, 50, -1], + [10, 20, 30, 50, "All"] + ], // Rows per page options + responsive: true, // Responsive table + order: [], // Default ordering (column index 0, descending) + language: { + paginate: { + next: '', // Next button icon + previous: '' // Previous button icon + } } - } - }); + }); - // Date range filter function - $.fn.dataTable.ext.search.push( - function(settings, data, dataIndex) { - var fromDate = $('#fromDate').val(); - var toDate = $('#toDate').val(); - - if (!fromDate || !toDate) { - return true; // If no dates selected, don't filter + // Date range filter function + $.fn.dataTable.ext.search.push( + function(settings, data, dataIndex) { + var fromDate = $('#fromDate').val(); + var toDate = $('#toDate').val(); + + if (!fromDate || !toDate) { + return true; // If no dates selected, don't filter + } + + var dateStr = data[0]; // Assuming the date is in the first column + var dateParts = dateStr.split("-"); + var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object + + var startDate = new Date(fromDate); + var endDate = new Date(toDate); + + // Adjust startDate to include the day before the selected fromDate + startDate.setDate(startDate.getDate() - 1); + + // Ensure endDate includes the entire end date by setting time to the end of the day + endDate.setHours(23, 59, 59, 999); + + // Return true if the date is within the range + return date >= startDate && date <= endDate; } - - var dateStr = data[0]; // Assuming the date is in the first column - var dateParts = dateStr.split("-"); - var date = new Date(dateParts[2], dateParts[1] - 1, dateParts[0]); // Convert dd-mm-yyyy to Date object - - var startDate = new Date(fromDate); - var endDate = new Date(toDate); - - // Adjust startDate to include the day before the selected fromDate - startDate.setDate(startDate.getDate() - 1); - - // Ensure endDate includes the entire end date by setting time to the end of the day - endDate.setHours(23, 59, 59, 999); + ); - // Return true if the date is within the range - return date >= startDate && date <= endDate; - } - ); + // Handle form submission for the date range filter + $("#DateRangeFilter").submit(function(e) { + e.preventDefault(); + table.draw(); // Redraw the table to apply the filter + }); - // Handle form submission for the date range filter - $("#DateRangeFilter").submit(function(e) { - e.preventDefault(); - table.draw(); // Redraw the table to apply the filter + // Reset button functionality + $("#resetButton").click(function() { + $("#fromDate").val(''); + $("#toDate").val(''); + table.draw(); // Redraw the table to clear the filter + }); + + // Automatically focus and open the To Date picker when From Date is selected + document.getElementById('fromDate').addEventListener('change', function() { + var fromDate = this.value; + var toDateInput = document.getElementById('toDate'); + + // Set the min attribute of the To Date input to the selected From Date + toDateInput.min = fromDate; + + // Optionally reset the To Date input if the current value is before the new min date + if (toDateInput.value < fromDate) { + toDateInput.value = fromDate; + } + }); }); - - // Reset button functionality - $("#resetButton").click(function() { - $("#fromDate").val(''); - $("#toDate").val(''); - table.draw(); // Redraw the table to clear the filter - }); - - // Automatically focus and open the To Date picker when From Date is selected - document.getElementById('fromDate').addEventListener('change', function() { - var fromDate = this.value; - var toDateInput = document.getElementById('toDate'); - - // Set the min attribute of the To Date input to the selected From Date - toDateInput.min = fromDate; - - // Optionally reset the To Date input if the current value is before the new min date - if (toDateInput.value < fromDate) { - toDateInput.value = fromDate; - } - }); -}); \ No newline at end of file