code merged form sia(jan-12,16 to 20)
This commit is contained in:
parent
c68c84da0f
commit
94c3a9327d
@ -77,6 +77,8 @@ $route['emppayListings/(:num)'] = 'emppaydate/emppayListing/$1';
|
||||
$route['attendance'] = 'monthlypay/attendanceLoad';
|
||||
$route['publicholidays'] = 'monthlypay/loadPublicholidays';
|
||||
$route['loanreports'] = 'payslip/loadLoanReport';
|
||||
$route['bonusreports'] = 'payslip/Bonusreport';
|
||||
|
||||
$route['qualityreportlist'] = "quality/reportList";
|
||||
$route['qualityreportlistinward'] = "quality/reportListInward";
|
||||
|
||||
|
||||
@ -340,7 +340,8 @@ class payslip extends BaseController
|
||||
$mpdf=new mPDF('utf-8','A4-P',10, 12,12, 10, 10, 38, 4, 6);
|
||||
$HTMLFooter = $this->load->view('includes/bankreport_footer',$data, true);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
/*$mpdf->SetTitle('Resico : PDF'.$filename);*/
|
||||
$mpdf->SetTitle('Resico : PDF'.$filename);
|
||||
/*$mpdf->setTitle('Resico : PayrollReport');*/
|
||||
//$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
// $mpdf->setFooter("Page {PAGENO} of {nb}");
|
||||
@ -526,6 +527,7 @@ class payslip extends BaseController
|
||||
$OT_Hrs_Worked = $j['OT Hours Worked in Hrs'];
|
||||
$Loan_Recovered = $j['Loan Recovered in ₹'];
|
||||
$Incentives = $j['Incentives in ₹'];
|
||||
$Festival_Bonus = $j['Festival Bonus in ₹'];
|
||||
$Other_Deductions = $j['Other Deductions in ₹'];
|
||||
$Created_By = $this->session->userdata ( 'userId' );
|
||||
|
||||
@ -572,6 +574,13 @@ class payslip extends BaseController
|
||||
{
|
||||
$ErrorFlag++;
|
||||
}
|
||||
|
||||
$Festivalbonus_first = explode(".",$Festival_Bonus);
|
||||
|
||||
if(!is_numeric($Festival_Bonus) || (strlen((string)$Festival_Bonus))>8 || (strlen((string)$Festivalbonus_first[0]))> 5)
|
||||
{
|
||||
$ErrorFlag++;
|
||||
}
|
||||
|
||||
$Other_Deductions_first = explode(".",$Other_Deductions);
|
||||
|
||||
@ -607,10 +616,11 @@ class payslip extends BaseController
|
||||
$Loan_Recovered = strtoupper($Loan_Recovered);
|
||||
}
|
||||
$Incentives = $j['Incentives in ₹'];
|
||||
$Festival_Bonus = $j['Festival Bonus in ₹'];
|
||||
$Other_Deductions = $j['Other Deductions in ₹'];
|
||||
$Created_By = $this->session->userdata ( '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,'Other_Deductions'=>$Other_Deductions,'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,'Loan_Recovered'=>$Loan_Recovered,'Incentives'=>$Incentives,'Festival_Bonus'=>$Festival_Bonus,'Other_Deductions'=>$Other_Deductions,'Created_By'=>$Created_By);
|
||||
$result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata);
|
||||
$total = $total + $result;
|
||||
}
|
||||
@ -731,77 +741,79 @@ class payslip extends BaseController
|
||||
*/
|
||||
public function PrintPdf()
|
||||
{
|
||||
$html="";
|
||||
$All = $this->input->post('All');
|
||||
if($All == '')
|
||||
{
|
||||
$filename=" ";
|
||||
$html="";
|
||||
$All = $this->input->post('All');
|
||||
if($All == '')
|
||||
{
|
||||
$this->form_validation->set_rules('Employee','Employee','trim|callback_Employee_validate');
|
||||
}
|
||||
|
||||
$this->form_validation->set_rules('PayOn','PayOn','trim|callback_PayOn_validate');
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->viewGenerator();
|
||||
}
|
||||
else
|
||||
{
|
||||
$Payon = $this->input->post('PayOn');
|
||||
|
||||
if($All != '')
|
||||
{
|
||||
|
||||
$result = $this->payroll_model->getEmpAll($Payon);
|
||||
|
||||
if($result > 0 )
|
||||
{
|
||||
for($i=0; $i<count($result) ;$i++ )
|
||||
{
|
||||
|
||||
$EmpID = $result[$i]['EmpId'];
|
||||
$Data['PayDetails'] = $this->payroll_model->GetPayslipdata($Payon,$EmpID);
|
||||
|
||||
$totalsalary =$Data['PayDetails'][0]->LessAdvance;
|
||||
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
||||
$Data['amtinwords']=$totalsalaryinwords;
|
||||
$Data['CompanyDetails '] = $this->payroll_model->Companydetails();
|
||||
|
||||
$html.=$this->load->view("payslipgenerateprint", $Data,true );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$EmpID = $this->input->post('Employee');
|
||||
|
||||
$Data['PayDetails'] = $this->payroll_model->GetPayslipdata($Payon,$EmpID);
|
||||
|
||||
$totalsalary =$Data['PayDetails'][0]->LessAdvance;
|
||||
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
||||
$Data['amtinwords']=$totalsalaryinwords;
|
||||
$Data['CompanyDetails'] = $this->payroll_model->Companydetails();
|
||||
|
||||
$html=$this->load->view("payslipgenerateprint", $Data,true );
|
||||
|
||||
}
|
||||
}
|
||||
$this->form_validation->set_rules('PayOn','PayOn','trim|callback_PayOn_validate');
|
||||
|
||||
|
||||
if($this->form_validation->run() == FALSE)
|
||||
{
|
||||
$this->viewGenerator();
|
||||
}
|
||||
else
|
||||
{
|
||||
$Payon = $this->input->post('PayOn');
|
||||
|
||||
$m =date("M", mktime(0, 0, 0, $Payon, 10));
|
||||
$y=substr($Payon,3);
|
||||
|
||||
|
||||
if($All != '')
|
||||
{
|
||||
$filename='PayslipFor-'.$m.'-'.$y;
|
||||
$result = $this->payroll_model->getEmpAll($Payon);
|
||||
|
||||
if($result > 0 )
|
||||
{
|
||||
for($i=0; $i<count($result) ;$i++ )
|
||||
{
|
||||
|
||||
$EmpID = $result[$i]['EmpId'];
|
||||
$Data['PayDetails'] = $this->payroll_model->GetPayslipdata($Payon,$EmpID);
|
||||
|
||||
$totalsalary =$Data['PayDetails'][0]->LessAdvance;
|
||||
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
||||
$Data['amtinwords']=$totalsalaryinwords;
|
||||
|
||||
$html.=$this->load->view("payslipgenerateprint", $Data,true );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$EmpID = $this->input->post('Employee');
|
||||
|
||||
$Data['PayDetails'] = $this->payroll_model->GetPayslipdata($Payon,$EmpID);
|
||||
|
||||
$fname=$Data['PayDetails'][0]->FName;
|
||||
$filename='PayslipFor-'.$EmpID.' '.$fname.' '.$m.' '.$y;
|
||||
|
||||
$totalsalary =$Data['PayDetails'][0]->LessAdvance;
|
||||
$totalsalaryinwords = $this->convertNumber(round($totalsalary));
|
||||
$Data['amtinwords']=$totalsalaryinwords;
|
||||
$html=$this->load->view("payslipgenerateprint", $Data,true );
|
||||
|
||||
}
|
||||
$mpdf=new mPDF('utf-8','A4-P',10, 10,10, 10, 10, 24, 4, 6);
|
||||
$mpdf->SetDisplayMode('fullpage');
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
/*$mpdf->SetTitle('Resico : PDF');*/
|
||||
$mpdf->SetHTMLHeader($HtmlHeading);
|
||||
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
|
||||
$mpdf->setFooter("Page {PAGENO} of {nb}");
|
||||
$mpdf->list_indent_first_level = 1;
|
||||
$mpdf->setAutoTopMargin = 'stretch';
|
||||
$mpdf->setAutoBottomMargin = 'stretch';
|
||||
$mpdf->WriteHTML($html);
|
||||
$mpdf->WriteHTML($html);
|
||||
$mpdf->SetTitle('Resico : Payslip');
|
||||
$mpdf->Output("".$filename.'.pdf','I',$php);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* To update payslip
|
||||
*/
|
||||
@ -1049,6 +1061,30 @@ class payslip extends BaseController
|
||||
$result = $this->payroll_model->checkExistPayData($empid,$payon);
|
||||
echo json_encode(count($result));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* For Bonus and Incentive report
|
||||
*/
|
||||
function Bonusreport()
|
||||
{
|
||||
|
||||
$this->global['pageTitle'] = 'Resico : Incentive and Bonus Reports';
|
||||
$fin_year = $this->input->post('finyear');
|
||||
$data['finyear'] = $fin_year;
|
||||
$data['Reportvalue'] = $this->monthlypay_model->reportvalue($fin_year);
|
||||
$this->loadViews("Bonusreport", $this->global,$data,NULL);
|
||||
|
||||
}
|
||||
|
||||
function MonthwiseBonusreport()
|
||||
{
|
||||
$EmployeeID = $_GET['EID'];
|
||||
$Fin_year = $_GET['Finyear'];
|
||||
$data['finyear'] = $Fin_year;
|
||||
$this->global['pageTitle'] = 'Resico : Monthwise Incentive and Bonus Reports';
|
||||
$data['MonthwiseReport'] = $this->monthlypay_model->Monthwisereportvalue($Fin_year,$EmployeeID);
|
||||
$this->loadViews("Bonusreportmonthwise", $this->global,$data,NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -338,6 +338,17 @@ class rawmaterialdetails extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To Check and display the already existing material list
|
||||
*/
|
||||
function checkmaterial()
|
||||
{
|
||||
$material = $this->input->post('id');
|
||||
$this->load->model('rawmaterialdetails_model');
|
||||
$query = $this->rawmaterialdetails_model->checkMaterialExists($material);
|
||||
echo json_encode($query);
|
||||
}
|
||||
|
||||
/**
|
||||
* To export report of material details in excel
|
||||
*/
|
||||
|
||||
@ -480,7 +480,16 @@ class supplier extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To Check and display the already existing supplier list
|
||||
*/
|
||||
function checksupplier()
|
||||
{
|
||||
$supp_name = $this->input->post('id');
|
||||
$this->load->model('supplier_model');
|
||||
$query = $this->supplier_model->checkSupplierExists($supp_name);
|
||||
echo json_encode($query);
|
||||
}
|
||||
/**
|
||||
* To export report of supplier details in excel
|
||||
*/
|
||||
|
||||
@ -38,7 +38,7 @@ class user extends BaseController
|
||||
$this->load->model('dahsboard_Model');
|
||||
|
||||
$data['EmpCount'] = $this->employeedetails_model->getEmployeeCount();
|
||||
|
||||
$data['UserCount'] = $this->dahsboard_Model->getUserCount();
|
||||
$data['totalpurchaseorder']=$this->dahsboard_Model->totalpurchaseorder();
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -8,14 +8,14 @@ class monthlypay_model extends CI_Model
|
||||
* @param date $current : This is current month and year
|
||||
* @return array $result : result of the query (returns monthly payment details)
|
||||
*/
|
||||
function monthlyListing($current="")
|
||||
function monthlyListing($current="")
|
||||
{
|
||||
$curr_split = explode('-',$current);
|
||||
$month_val = $curr_split[0];
|
||||
$year_val = $curr_split[1];
|
||||
$date_val =cal_days_in_month(CAL_GREGORIAN,$month_val,$year_val);
|
||||
$lastdate = $year_val.'-'.$month_val.'-'.$date_val;
|
||||
|
||||
|
||||
$sql="select T_Monthly_Pay_Inputs.*,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Loan_Master.Loan_ID,T_Payroll.Key
|
||||
from T_Monthly_Pay_Inputs
|
||||
left join T_Employee_Details on T_Monthly_Pay_Inputs.EmpID=T_Employee_Details.EmpID and T_Employee_Details.DateofJoining <= ?
|
||||
@ -26,11 +26,12 @@ class monthlypay_model extends CI_Model
|
||||
|
||||
$query = $this->db->query($sql,array($lastdate,$current));
|
||||
|
||||
$result = $query->result();
|
||||
$result = $query->result();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To get employee payment details
|
||||
* @param date $current - Optional
|
||||
@ -169,19 +170,22 @@ class monthlypay_model extends CI_Model
|
||||
function monthlyAttendance($current="")
|
||||
{
|
||||
|
||||
$month_val = date('m',strtotime($current));
|
||||
$month_val = date('m',strtotime($current));
|
||||
$year_val = date('Y',strtotime($current));
|
||||
$date_val =cal_days_in_month(CAL_GREGORIAN,$month_val,$year_val);
|
||||
$lastdate = $year_val.'-'.$month_val.'-'.$date_val;
|
||||
$this->db->select('T_Attendance.*,T_Employee_Details.FirstName,T_Employee_Details.LastName');
|
||||
$this->db->from('T_Attendance');
|
||||
|
||||
$this->db->select('T_Attendance.*,T_Employee_Details.FirstName,T_Employee_Details.LastName');
|
||||
$this->db->from('T_Attendance');
|
||||
$this->db->join('T_Employee_Details','T_Attendance.EmpID=T_Employee_Details.EmpID');
|
||||
$this->db->where('T_Employee_Details.DateofJoining <= ',$lastdate);
|
||||
$this->db->where('Month_Year',$current);
|
||||
$this->db->where('T_Employee_Details.IsActive',1);
|
||||
$this->db->order_by('T_Attendance.EmpID', 'asc');
|
||||
$query = $this->db->get();
|
||||
$result = $query->result();
|
||||
$query = $this->db->get();
|
||||
|
||||
$result = $query->result();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -392,6 +396,48 @@ class monthlypay_model extends CI_Model
|
||||
|
||||
/* Ends permissionslip models */
|
||||
|
||||
function reportvalue($fin_year)
|
||||
{
|
||||
|
||||
|
||||
$curr_split = explode('-',$fin_year);
|
||||
$pre_year = $curr_split[0];
|
||||
$curr_year = $curr_split[1];
|
||||
|
||||
$sql= "select T_Monthly_Pay_Inputs.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,sum(Incentives) as Incentives,sum(Festival_Bonus) as Bonus
|
||||
from T_Monthly_Pay_Inputs
|
||||
join T_Employee_Details on T_Monthly_Pay_Inputs.EmpID = T_Employee_Details.EmpID
|
||||
where
|
||||
substr(T_Monthly_Pay_Inputs.Month_Year,4) = ?
|
||||
and substr(T_Monthly_Pay_Inputs.Month_Year,1,2) >= 4
|
||||
or substr(T_Monthly_Pay_Inputs.Month_Year,4) = ?
|
||||
and substr(T_Monthly_Pay_Inputs.Month_Year,1,2) <= 3
|
||||
group by T_Monthly_Pay_Inputs.EmpID";
|
||||
|
||||
$query = $this->db->query($sql,array($pre_year,$curr_year));
|
||||
return $query->result();
|
||||
}
|
||||
function Monthwisereportvalue($Fin_year,$EmployeeID)
|
||||
{
|
||||
|
||||
|
||||
$curr_split = explode('-',$Fin_year);
|
||||
$pre_year = $curr_split[0];
|
||||
$curr_year = $curr_split[1];
|
||||
|
||||
$sql= "select T_Monthly_Pay_Inputs.EmpID,T_Monthly_Pay_Inputs.Month_Year,T_Employee_Details.FirstName,T_Employee_Details.LastName,sum(Incentives) as Incentives,sum(Festival_Bonus) as Bonus
|
||||
from T_Monthly_Pay_Inputs
|
||||
join T_Employee_Details on T_Monthly_Pay_Inputs.EmpID = T_Employee_Details.EmpID
|
||||
and T_Monthly_Pay_Inputs.EmpID = ?
|
||||
where substr(T_Monthly_Pay_Inputs.Month_Year,4) = ? and substr(T_Monthly_Pay_Inputs.Month_Year,1,2) >= 4
|
||||
or substr(T_Monthly_Pay_Inputs.Month_Year,4) = ? and substr(T_Monthly_Pay_Inputs.Month_Year,1,2) <= 3
|
||||
group by T_Monthly_Pay_Inputs.Month_Year";
|
||||
|
||||
$query = $this->db->query($sql,array($EmployeeID,$pre_year,$curr_year));
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -163,6 +163,17 @@ class rawmaterialdetails_model extends CI_Model
|
||||
return $this->db->get('T_MaterialMaster as det')->result_array();
|
||||
}
|
||||
|
||||
|
||||
function checkMaterialExists($material)
|
||||
{
|
||||
$this->db->select('MaterialCode,MaterialName,MaterialType,Category');
|
||||
$this->db->from('T_MaterialMaster');
|
||||
$this->db->like('REPLACE(MaterialName, " ", "")',$material);
|
||||
|
||||
$query = $this->db->get();
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to delete the user information
|
||||
* @param number $userId : This is user id
|
||||
|
||||
@ -174,6 +174,19 @@ class supplier_model extends CI_Model
|
||||
return $insert_id;
|
||||
}
|
||||
|
||||
function checkSupplierExists($supp_name)
|
||||
{
|
||||
|
||||
$this->db->select('SupplierID,SupplierName,Address');
|
||||
$this->db->from('T_SupplierDetailsN');
|
||||
$this->db->like('REPLACE(SupplierName, " ", "")', $supp_name);
|
||||
|
||||
$query = $this->db->get();
|
||||
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To get Supplier's information for export xl
|
||||
*/
|
||||
|
||||
212
application/views/Bonusreport.php
Normal file
212
application/views/Bonusreport.php
Normal file
@ -0,0 +1,212 @@
|
||||
<script src="<?php echo base_url()?>assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
||||
<style>
|
||||
.ui-datepicker-trigger{
|
||||
border:none;
|
||||
background:none;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
||||
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
$(function()
|
||||
{
|
||||
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align:right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Employee Incentive and Bonus Reports</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content" id="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="formid">
|
||||
<div style="padding-top: 30px;padding-left: 30px;">
|
||||
<div class="col-md-3">
|
||||
<?php echo form_input('finyear',set_value('finyearttext'),'id="finyearttext"' ,'class="form-control"');?>
|
||||
|
||||
|
||||
<input type="button" id="finyear" value="Year">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="button" value="View Report" class="btn btn-primary" id="report">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
<th>S.No</th>
|
||||
<th>Employee Id</th>
|
||||
<th>Employee Name</th>
|
||||
<th>Incentives in ₹</th>
|
||||
<th>Festival Bonus in ₹</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$index=0;
|
||||
$total=0;
|
||||
$totalbonus=0;
|
||||
if(!empty($Reportvalue))
|
||||
{
|
||||
|
||||
foreach($Reportvalue as $record)
|
||||
{
|
||||
$index++;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align:right;"><?php echo $index; ?></td>
|
||||
<td style="text-align:right;"><?php echo $record->EmpID ?></td>
|
||||
<td><a href="<?php echo base_url().'payslip/MonthwiseBonusreport/?EID='.$record->EmpID.'&Finyear='.$finyear ?>" data-toggle="tooltip" title="Click here to View Employee monthwise incentive/bonus report details"><?php echo $record->FirstName ." ". $record->LastName ?></a></td>
|
||||
<td style="text-align:right;"><?php if(!empty($record->Incentives)){$total+=$record->Incentives; echo $record->Incentives;}else{echo "0.00";}?></td>
|
||||
<td style="text-align:right;"><?php if(!empty($record->Bonus)){$totalbonus+=$record->Bonus ;echo $record->Bonus;}else{echo "0.00";} ?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?php echo "Total" ?></td>
|
||||
<!-- <td style="text-align:right;" colspan="3"><?php echo "Total"; ?></td> -->
|
||||
<td style="text-align:right;"><?php echo number_format($total,2,'.',''); ?></td>
|
||||
<td style="text-align:right;"><?php echo number_format($totalbonus,2,'.','');?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.inital row -->
|
||||
</div><!-- /.12 md div closed -->
|
||||
</section><!-- /.content section closed -->
|
||||
</div><!-- /.content wrapper -->
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
/*-----------------on ready function ------------------------------- */
|
||||
$(function () {
|
||||
/*-----------------for data table ------------------------------ */
|
||||
var t = $('#monthlylistings').DataTable( {
|
||||
"columnDefs": [ {
|
||||
"searchable": false,
|
||||
"orderable": false,
|
||||
"targets": 0
|
||||
} ],
|
||||
"searching": true,
|
||||
"lengthChange": true,
|
||||
"info": true,
|
||||
"paging": true,
|
||||
"autoWidth": true,
|
||||
"order": [[ 0, 'asc' ]]
|
||||
} );
|
||||
/**---------------for table index value using datatable -------- */
|
||||
t.on( 'order.dt search.dt', function () {
|
||||
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = i+1;
|
||||
} );
|
||||
} ).draw();
|
||||
/**-----------------for date picker ---------------------------- */
|
||||
$("#finyear").datepicker(
|
||||
{
|
||||
|
||||
minViewMode: 1,
|
||||
//format: 'M-yyyy',
|
||||
|
||||
});
|
||||
/**----------------for change function using datepicker -------- */
|
||||
$("#finyear").change(function(){
|
||||
$("#finyearttext").val('');
|
||||
var date = $('#finyear').datepicker('getDate');
|
||||
$("#finyear").val("Year");
|
||||
var month = date.getMonth();
|
||||
var year = date.getFullYear();
|
||||
month++;
|
||||
if (month >= 4)
|
||||
{
|
||||
$("#finyear").val("Year");
|
||||
$("#finyearttext").val(year + '-' + (year+1));
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#finyear").val("Year");
|
||||
$("#finyearttext").val((year-1) + '-' + year);
|
||||
}
|
||||
|
||||
});
|
||||
/*------after reload display the value text box (fin_year text box)------- */
|
||||
//if(!empty($finyear)){
|
||||
var s = "<?php echo $finyear; ?>";
|
||||
$('#finyearttext').val(s);
|
||||
///}
|
||||
});
|
||||
/*-----------------on ready function ends here---------------------------- */
|
||||
|
||||
/*--------------------------for view report button------------------------ */
|
||||
$("#report").click(function(){
|
||||
|
||||
$("#formid").attr("method", "post");
|
||||
|
||||
$("#formid").attr("action", "<?php echo base_url() ?>payslip/Bonusreport");
|
||||
|
||||
$('#formid').submit();
|
||||
|
||||
|
||||
});
|
||||
|
||||
/*-----------------for export execl button------------------------------- */
|
||||
var name = "<?php echo 'Incentive and Bonus Report ( '.$finyear.' )' ?>";
|
||||
$("#monthlylistings").tableExport({
|
||||
bootstrap: true,
|
||||
separator: ",",
|
||||
headings: true,
|
||||
buttonContent: "Export",
|
||||
addClass: "",
|
||||
defaultClass: "btn",
|
||||
defaultTheme: "btn-default",
|
||||
type: "csv",
|
||||
fileName: name,
|
||||
position: "bottom",
|
||||
stripQuotes: true
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
194
application/views/Bonusreportmonthwise.php
Normal file
194
application/views/Bonusreportmonthwise.php
Normal file
@ -0,0 +1,194 @@
|
||||
|
||||
<script src="<?php echo base_url()?>assets/tabletoexport/jquery.tableexport.v2.js"></script>
|
||||
<style>
|
||||
.ui-datepicker-trigger{
|
||||
border:none;
|
||||
background:none;
|
||||
}
|
||||
</style>
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align:right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center><strong>" <?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FirstName ." ". $MonthwiseReport[0]->LastName ?> "</strong> - Monthwise Incentive and Bonus Reports</center>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content" id="content">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
|
||||
<th>S.No</th>
|
||||
<th>Employee Id</th>
|
||||
<th>Employee Name</th>
|
||||
<th>Month Year</th>
|
||||
<th>Incentives in ₹</th>
|
||||
<th>Festival Bonus in ₹</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$index=0;
|
||||
$total=0;
|
||||
$totalbonus=0;
|
||||
if(!empty($MonthwiseReport))
|
||||
{
|
||||
|
||||
foreach($MonthwiseReport as $record)
|
||||
{
|
||||
$index++;
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="text-align:right;"><?php echo $index; ?></td>
|
||||
<td style="text-align:right;"><?php echo $record->EmpID ?></td>
|
||||
<td><?php echo $record->FirstName ." ". $record->LastName ?></td>
|
||||
<td><?php
|
||||
$split_val = explode('-',$record->Month_Year);
|
||||
$month_val = $split_val[0];
|
||||
$year_val = $split_val[1];
|
||||
$monthName = date("M", mktime(0, 0, 0, $month_val, 10));
|
||||
echo $monthName . " , ".$year_val
|
||||
?></td>
|
||||
<td style="text-align:right;"><?php if(!empty($record->Incentives)){$total+=$record->Incentives; echo $record->Incentives;}else{echo "0.00";}?></td>
|
||||
<td style="text-align:right;"><?php if(!empty($record->Bonus)){$totalbonus+=$record->Bonus ;echo $record->Bonus;}else{echo "0.00";} ?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td><?php echo "Total" ?></td>
|
||||
<!-- <td style="text-align:right;" colspan="3"><?php echo "Total"; ?></td> -->
|
||||
<td style="text-align:right;"><?php echo number_format($total,2,'.',''); ?></td>
|
||||
<td style="text-align:right;"><?php echo number_format($totalbonus,2,'.','');?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.inital row -->
|
||||
</div><!-- /.12 md div closed -->
|
||||
</section><!-- /.content section closed -->
|
||||
</div><!-- /.content wrapper -->
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
/*-----------------on ready function ------------------------------- */
|
||||
$(function () {
|
||||
/*-----------------for data table ------------------------------ */
|
||||
var t = $('#monthlylistings').DataTable( {
|
||||
"columnDefs": [ {
|
||||
"searchable": false,
|
||||
"orderable": false,
|
||||
"targets": 0
|
||||
} ],
|
||||
"searching": true,
|
||||
"lengthChange": true,
|
||||
"info": true,
|
||||
"paging": true,
|
||||
"autoWidth": true,
|
||||
"order": [[ 0, 'asc' ]]
|
||||
} );
|
||||
/**---------------for table index value using datatable -------- */
|
||||
t.on( 'order.dt search.dt', function () {
|
||||
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = i+1;
|
||||
} );
|
||||
} ).draw();
|
||||
/**-----------------for date picker ---------------------------- */
|
||||
$("#finyear").datepicker(
|
||||
{
|
||||
|
||||
minViewMode: 1,
|
||||
//format: 'M-yyyy',
|
||||
|
||||
});
|
||||
/**----------------for change function using datepicker -------- */
|
||||
$("#finyear").change(function(){
|
||||
$("#finyearttext").val('');
|
||||
var date = $('#finyear').datepicker('getDate');
|
||||
$("#finyear").val("Year");
|
||||
var month = date.getMonth();
|
||||
var year = date.getFullYear();
|
||||
month++;
|
||||
if (month >= 4)
|
||||
{
|
||||
$("#finyear").val("Year");
|
||||
$("#finyearttext").val(year + '-' + (year+1));
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#finyear").val("Year");
|
||||
$("#finyearttext").val((year-1) + '-' + year);
|
||||
}
|
||||
|
||||
});
|
||||
/*------after reload display the value text box (fin_year text box)------- */
|
||||
//if(!empty($dropdownvalue)){
|
||||
var s = "<?php echo $dropdownvalue; ?>";
|
||||
$('#finyearttext').val(s);
|
||||
///}
|
||||
});
|
||||
/*-----------------on ready function ends here---------------------------- */
|
||||
|
||||
/*--------------------------for view report button------------------------ */
|
||||
$("#report").click(function(){
|
||||
|
||||
$("#formid").attr("method", "post");
|
||||
|
||||
$("#formid").attr("action", "<?php echo base_url() ?>payslip/Bonusreport");
|
||||
|
||||
$('#formid').submit();
|
||||
|
||||
|
||||
});
|
||||
|
||||
/*-----------------for export execl button------------------------------- */
|
||||
var employee = "<?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FirstName ." ". $MonthwiseReport[0]->LastName ?>";
|
||||
var fin_year = "<?php echo $finyear ?>";
|
||||
var name = "<?php echo 'Incentive and Bonus month Report for '.$MonthwiseReport[0]->EmpID.''.$MonthwiseReport[0]->FirstName ." ". $MonthwiseReport[0]->LastName.' ( '.$finyear.' )' ?>";
|
||||
$("#monthlylistings").tableExport({
|
||||
bootstrap: true,
|
||||
separator: ",",
|
||||
headings: true,
|
||||
buttonContent: "Export",
|
||||
addClass: "",
|
||||
defaultClass: "btn",
|
||||
defaultTheme: "btn-default",
|
||||
type: "csv",
|
||||
fileName: name,
|
||||
position: "bottom",
|
||||
stripQuotes: true
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@ -12,10 +12,10 @@ function isNumberKey(evt)
|
||||
|
||||
function BlockSpecial(evt) {
|
||||
var charCode;
|
||||
if (window.event
|
||||
charCode = window.event.keyCode; //for IE
|
||||
else
|
||||
charCode = evt.which; //for firefox
|
||||
// if (window.event)
|
||||
// charCode = window.event.keyCode; //for IE
|
||||
// else
|
||||
// charCode = evt.which; //for firefox
|
||||
|
||||
if (charCode >= 91 && charCode <= 96)
|
||||
return false;
|
||||
@ -60,7 +60,7 @@ function BlockSpecial(evt) {
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<section class="content" id="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>rawmaterialdetails/rawmaterialListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
@ -310,18 +310,64 @@ function Validate()
|
||||
|
||||
|
||||
|
||||
$('#MaterialName').change(function() {
|
||||
|
||||
var materialname = $('#MaterialName').val();
|
||||
//material = material.replace(/\s*$/,"");
|
||||
var material = materialname.replace(/ /g,'');
|
||||
$('#content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
data:{id:material},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>rawmaterialdetails/checkmaterial",
|
||||
success:function(data) {
|
||||
|
||||
var count = data.length;
|
||||
|
||||
if(count >2 ){
|
||||
|
||||
$('#content').loader('hide');
|
||||
|
||||
swal({
|
||||
title: "'" + materialname + " already existed ! ",
|
||||
// type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn-danger",
|
||||
confirmButtonText: "Material Details!",
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function(){
|
||||
dat = JSON.parse(data);
|
||||
var related_name = "";
|
||||
$.each(dat,function(i,obj){
|
||||
related_name += obj.MaterialCode +" - "+ obj.MaterialName+" - "+obj.MaterialType+" - "+obj.Category+"\n";
|
||||
|
||||
});
|
||||
|
||||
|
||||
swal( "'" + materialname + "' - related materials are ," , related_name);
|
||||
$("#MaterialName").focus();
|
||||
|
||||
});//sweet alert closed....
|
||||
|
||||
}
|
||||
|
||||
else{
|
||||
$('#content').loader('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//corrected
|
||||
$(document).ready(function(){
|
||||
// $("#MaterialType").select2();
|
||||
|
||||
// $("#MaterialCategory").select2();
|
||||
// $("#UOM").select2();
|
||||
// $("#Assetcode").select2();
|
||||
// $("#Costcenter").select2();
|
||||
// $("#conversionfactorUOM").select2();
|
||||
|
||||
$("#MaterialType").select2();
|
||||
$("#MaterialCategory").select2();
|
||||
$("#UOM").select2();
|
||||
$("#Assetcode").select2();
|
||||
$("#Costcenter").select2();
|
||||
$("#conversionfactorUOM").select2();
|
||||
|
||||
|
||||
});
|
||||
|
||||
@ -328,7 +328,7 @@ $(function() {
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<section class="content" id="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>supplierListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
@ -703,5 +703,49 @@ if(!validateEmail())
|
||||
}
|
||||
|
||||
});
|
||||
$('#supplierName').change(function() {
|
||||
|
||||
var suppliername = $('#supplierName').val();
|
||||
var supplier = suppliername.replace(/ /g,'');
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:{id:supplier},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>supplier/checksupplier",
|
||||
success:function(data) {
|
||||
var count = data.length;
|
||||
|
||||
if(count >2 ){
|
||||
$('#content').loader('hide');
|
||||
|
||||
swal({
|
||||
title: " supplier already existed ! ",
|
||||
// type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn-danger",
|
||||
confirmButtonText: "Material Details!",
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function(){
|
||||
dat = JSON.parse(data);
|
||||
var related_supplier = "";
|
||||
$.each(dat,function(i,obj){
|
||||
related_supplier += obj.SupplierID +" - "+ obj.SupplierName +" - "+obj.Address+"\n";
|
||||
});
|
||||
|
||||
swal("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").focus();
|
||||
|
||||
});//sweet alert closed....
|
||||
}
|
||||
else{
|
||||
$('#content').loader('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -5,23 +5,12 @@
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
|
||||
|
||||
<?php
|
||||
// print_r($attendance);
|
||||
// echo "<br>";
|
||||
// echo count($attendance);
|
||||
// echo "<br>";
|
||||
// print_r($emppay);
|
||||
// echo "<br>";
|
||||
// echo count($emppay);
|
||||
//print_r($datefordropdown);
|
||||
//print_r($noofpublicholidays);print_r($publicholidaysarray);
|
||||
$datefordropdown = date_create($datefordropdown);
|
||||
$datefordropdown = date_format($datefordropdown,'M-Y');
|
||||
//echo $datefordropdown;
|
||||
|
||||
$attendance = array_merge($attendance,$emppay);
|
||||
date_default_timezone_set('Asia/Kolkata');
|
||||
$currentday = date('d');
|
||||
// print_r($attendance);
|
||||
// echo "<br>------------------------------<br>";
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
@ -57,7 +46,7 @@ $currentday = date('d');
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
||||
/*white-space:nowrap; Impide los saltos de línea automáticos */
|
||||
/*white-space:nowrap; Impide los saltos de l<EFBFBD>nea autom<6F>ticos */
|
||||
}
|
||||
|
||||
.fht-table th,.fht-table td {
|
||||
@ -300,7 +289,24 @@ $currentday = date('d');
|
||||
?>
|
||||
|
||||
|
||||
<th <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_encabezado_general" <?php if($flag == 1 or $flag2 == 1) { echo "style='background: #f39c12 ;'"; } else if($todayflag == 1){ echo "style='background: #dd99ff ;'"; } ?> > <?php if($flag == 1 or $flag2 == 1){ echo "<font style='color:#ff0000;'>".$col."W<font>";} else { echo $col."W"; } ?></th>
|
||||
<th <?php if($flag2 == 1){ ?>
|
||||
title = " <?php echo $title; ?> "
|
||||
<?php } else if($flag == 1 ){ ?>
|
||||
title = "sunday" <?php }?>
|
||||
class="celda_encabezado_general"
|
||||
<?php if($flag == 1 or $flag2 == 1)
|
||||
{
|
||||
echo "style='background: #f39c12 ;'";
|
||||
}
|
||||
else if($todayflag == 1)
|
||||
{ echo "style='background: #dd99ff ;'"; } ?> >
|
||||
<?php if($flag == 1 or $flag2 == 1)
|
||||
{ echo "<font style='color:#ff0000;'>".$col."W<font>";}
|
||||
else { echo $col."W"; } ?></th>
|
||||
|
||||
|
||||
|
||||
|
||||
<th <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_encabezado_general" <?php if($flag == 1 or $flag2 == 1) { echo "style='background: #f39c12 ;'"; } else if($todayflag == 1){ echo "style='background: #dd99ff ;'"; }?> > <?php if($flag == 1 or $flag2 == 1){ echo "<font style='color:#ff0000;'>".$col."OT<font>";} else { echo $col."OT"; }?></th>
|
||||
<?php
|
||||
//echo $flag2;
|
||||
@ -363,8 +369,8 @@ $currentday = date('d');
|
||||
$OT = 'OT'.$col;
|
||||
|
||||
?>
|
||||
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php if($flag == 1 or $flag2 == 1) {echo $row.'row'.$col.'WS';} else { echo $row.'row'.$col.'W';}?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$WH)){echo $a->$WH;} else { echo '0';}?></td>
|
||||
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php if($flag == 1 or $flag2 == 1) {echo $row.'row'.$col.'OTS';} else { echo $row.'row'.$col.'OT';}?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$OT)){echo $a->$OT;} else { echo '0';}?></td>
|
||||
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php echo $row.'row'.$col.'W';?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$WH)){echo $a->$WH;} else { echo '0';}?></td>
|
||||
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php echo $row.'row'.$col.'OT';?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$OT)){echo $a->$OT;} else { echo '0';}?></td>
|
||||
|
||||
<?php $flag =0;
|
||||
$flag2 =0;
|
||||
@ -372,7 +378,7 @@ $currentday = date('d');
|
||||
}?>
|
||||
<td class="celda_normal" id="<?php echo $row.'TH';?>"><?php if(!empty($a->Total_WHrs)){echo $a->Total_WHrs;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'OTH';?>"><?php if(!empty($a->Total_OTHrs)){echo $a->Total_OTHrs;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'PL';?>"><?php if(!empty($a->Paid_Leave)){echo $a->Paid_Leave;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'PL';?>"><?php if(!empty($a->Paid_Leave)){echo number_format($a->Paid_Leave,2,'.','.');}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal" id="<?php echo $row.'DW';?>"><?php if(!empty($a->Days_Worked)){echo $a->Days_Worked;}else{echo "0.00";}?></td>
|
||||
<td class="celda_normal"id="<?php echo $row.'AB';?>"><?php if(!empty($a->Absent)){echo $a->Absent;}else{echo "0.00";}?></td>
|
||||
</tr>
|
||||
@ -408,46 +414,56 @@ $currentday = date('d');
|
||||
function getAllData()
|
||||
{
|
||||
|
||||
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++;
|
||||
|
||||
//alert(currentmonth);
|
||||
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
||||
|
||||
var totaldata = 0;
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
|
||||
//dataType:"json",
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>monthlypay/saveAttendance",
|
||||
var s = findInvalidData();
|
||||
|
||||
|
||||
if(s == 0){
|
||||
resetFinalValues();
|
||||
var Totalnoofdays = <?php echo $monthdays?>;
|
||||
var alldata = $("#attendance").tableToJSON();
|
||||
|
||||
alldata=JSON.stringify(alldata);
|
||||
|
||||
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('.content').loader('hide');
|
||||
alert(data);
|
||||
//totaldata = totaldata + parseFloat(data);
|
||||
//console.log(data);
|
||||
|
||||
|
||||
var month = $('#month').val();
|
||||
var currentmonth = month.substr(0,3);
|
||||
var currentyear = month.substr(4,4);
|
||||
|
||||
var montharray = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
|
||||
var currentmonth = jQuery.inArray(currentmonth,montharray);//!== -1
|
||||
currentmonth++;
|
||||
|
||||
|
||||
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
||||
|
||||
var totaldata = 0;
|
||||
$('.content').loader('show');
|
||||
$.ajax({
|
||||
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
|
||||
//dataType:"json",
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>monthlypay/saveAttendance",
|
||||
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('.content').loader('hide');
|
||||
swal(data);
|
||||
//totaldata = totaldata + parseFloat(data);
|
||||
//console.log(data);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
//alert(totaldata+"-Employees attendance saved sucessfully..!");
|
||||
}
|
||||
});
|
||||
//swal(totaldata+"-Employees attendance saved sucessfully..!");
|
||||
}
|
||||
else
|
||||
{
|
||||
swal('Plesae Provide Working Hrs and OT Hrs Correctly..!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -490,7 +506,7 @@ $currentday = date('d');
|
||||
|
||||
var id = e.target.id;
|
||||
var val = document.getElementById(id).textContent
|
||||
console.log(val);
|
||||
//console.log(val);
|
||||
if(val == 0)
|
||||
{
|
||||
window.setTimeout(function(){ document.getElementById(id).textContent = ''; }, 0);
|
||||
@ -505,9 +521,24 @@ $currentday = date('d');
|
||||
{
|
||||
window.setTimeout(function(){ document.getElementById(id).textContent = '0'; }, 0);
|
||||
}
|
||||
console.log(val);
|
||||
//console.log(val);
|
||||
});
|
||||
|
||||
var d = new Date().getFullYear()+''+(new Date().getMonth()+1)+''+new Date().getDate();
|
||||
|
||||
var str = $('#month').val();
|
||||
var monthname = str.substr(0,3);
|
||||
var monthyear = str.substr(4);
|
||||
|
||||
monthno = new Date(Date.parse(monthname +" 1, 2012")).getMonth()+1;
|
||||
var n = monthyear+''+monthno+'01';
|
||||
|
||||
|
||||
if(d < n)
|
||||
{
|
||||
$('#c').hide();
|
||||
}
|
||||
else{ $('#c').show();}
|
||||
|
||||
});
|
||||
|
||||
@ -516,15 +547,13 @@ $currentday = date('d');
|
||||
|
||||
<script>
|
||||
|
||||
function myFunction(p,i,v,k)
|
||||
function myFunction(p,i,v)
|
||||
{
|
||||
//alert(p+"-"+i+"-"+v);
|
||||
//alert(v);
|
||||
// alert(k.keyCode);
|
||||
|
||||
var v = v;
|
||||
var i =i;
|
||||
var id = i.substr(-1);
|
||||
//alert(id);
|
||||
|
||||
var len = i.length;
|
||||
var nxtid =0;
|
||||
var nxtvalue = 0;
|
||||
@ -534,7 +563,7 @@ function myFunction(p,i,v,k)
|
||||
|
||||
if(v > 24)
|
||||
{
|
||||
alert('Working Hrs Do Not Exceed 24 HRs');
|
||||
swal('Working Hrs Do Not Exceed 24 HRs');
|
||||
|
||||
$(i).focus();
|
||||
document.getElementById(i).textContent = '';
|
||||
@ -544,9 +573,16 @@ function myFunction(p,i,v,k)
|
||||
|
||||
var j='#'+i;
|
||||
var nextid = $(j).closest('td').next('td');
|
||||
|
||||
nxtid = nextid[0].attributes[2].value;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//console.log(nextid[0].attributes[2].value);
|
||||
console.log(nextid);
|
||||
//console.log(nextid);
|
||||
|
||||
nxtvalue = v-8;
|
||||
curvalue = 8;
|
||||
@ -554,26 +590,32 @@ function myFunction(p,i,v,k)
|
||||
curid = i;
|
||||
|
||||
document.getElementById(i).innerHTML = parseFloat(curvalue)
|
||||
document.getElementById(nxtid).innerHTML = parseFloat(nxtvalue)
|
||||
if(document.getElementById(nxtid)){
|
||||
document.getElementById(nxtid).innerHTML = parseFloat(nxtvalue)
|
||||
}
|
||||
else{
|
||||
nxtid = nextid[0].attributes[3].value;
|
||||
document.getElementById(nxtid).innerHTML = parseFloat(nxtvalue)
|
||||
}
|
||||
|
||||
}
|
||||
else if(id == 'T' && v > 16){
|
||||
|
||||
alert("OT Should not exceed 16 Hrs");
|
||||
swal("OT Should not exceed 16 Hrs");
|
||||
$(i).focus();
|
||||
document.getElementById(i).innerHTML = '';
|
||||
}
|
||||
else if(id == 'S' && v > 16)
|
||||
{
|
||||
var j='#'+i;
|
||||
console.log(i);
|
||||
console.log('********************************************');
|
||||
//console.log(i);
|
||||
//console.log('********************************************');
|
||||
var nextid = $(j).closest('td').next('td');
|
||||
console.log(nextid);
|
||||
console.log('********************************************');
|
||||
//console.log(nextid);
|
||||
//console.log('********************************************');
|
||||
nxtid = nextid[0].attributes[3].value;
|
||||
console.log('********************************************');
|
||||
console.log(nxtid);
|
||||
//console.log('********************************************');
|
||||
//console.log(nxtid);
|
||||
//console.log(nextid[0].attributes[2].value);
|
||||
|
||||
nxtvalue = v-16;
|
||||
@ -608,7 +650,7 @@ function myFunction(p,i,v,k)
|
||||
var absentid=p+'AB';
|
||||
|
||||
//document.getElementById(i).textContent = v;
|
||||
//alert('Total Hrs-'+document.getElementById(i).textContent);
|
||||
|
||||
|
||||
var Row = $('#attendance').find('tr').eq(p).find('td');
|
||||
// console.log(Row);
|
||||
@ -662,30 +704,106 @@ function myFunction(p,i,v,k)
|
||||
absent = paidleave-2;
|
||||
paidleave = 2;
|
||||
}
|
||||
document.getElementById(totalhrsid).innerHTML = parseFloat(totalworkingHrs).toFixed(2);// == ''?0:parseFloat(totalworkingHrs));
|
||||
document.getElementById(totalothrsid).innerHTML = parseFloat(totalOTHrs).toFixed(2);// == ''?0:parseFloat(totalOTHrs));
|
||||
document.getElementById(paidleaveid).innerHTML = parseFloat(paidleave).toFixed(2);
|
||||
document.getElementById(daysworkedid).innerHTML = parseFloat((totalworkingHrs/8)+sundays+publicholidays).toFixed(2);
|
||||
document.getElementById(absentid).innerHTML = parseFloat(absent).toFixed(2);
|
||||
document.getElementById(totalhrsid).textContent = parseFloat(totalworkingHrs).toFixed(2);// == ''?0:parseFloat(totalworkingHrs));
|
||||
document.getElementById(totalothrsid).textContent = parseFloat(totalOTHrs).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);
|
||||
}
|
||||
|
||||
function FindInvalide()
|
||||
function findInvalidData()
|
||||
{
|
||||
var flag = 0;
|
||||
|
||||
//totaldays = (totaldays * 2);
|
||||
|
||||
var Row = $('#attendance').find('tr');
|
||||
//console.log(Row);
|
||||
|
||||
$.each(Row,function(index,value){
|
||||
//console.log(index+'-'+value);
|
||||
var td = $(value).find('td');
|
||||
|
||||
$.each(td,function(iter,val){
|
||||
console.log(iter+'-'+val.id+'-'+val.textContent);
|
||||
|
||||
});
|
||||
});
|
||||
//console.log(iter+'-'+val.id+'-'+val.textContent);
|
||||
if((val.id).substr(-1) == 'W' && (val.id).substr(-2) != 'DW')
|
||||
{
|
||||
if(parseFloat(val.textContent) > 8)
|
||||
{
|
||||
|
||||
var ide = '#'+(val.id);
|
||||
var p = $(ide).css("background-color", "red");
|
||||
p.hide(1000).show(1000);
|
||||
p.queue(function() {
|
||||
p.css({"background-color":"white"});
|
||||
$(ide).mouseover(function() {
|
||||
$(this).css({"background-color":"#5d0411"})
|
||||
}).mouseout(function(){ $(this).css({"background-color":"white"});});
|
||||
});
|
||||
flag++;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if((val.id).substr(-1) == 'T')
|
||||
{
|
||||
if(parseFloat(val.textContent) > 16)
|
||||
{
|
||||
var ide = '#'+(val.id);
|
||||
var p = $(ide).css("background-color", "red");
|
||||
p.hide(1000).show(1000);
|
||||
p.queue(function() {
|
||||
p.css({"background-color":"white"});
|
||||
$(ide).mouseover(function() {
|
||||
$(this).css({"background-color":"#5d0411"})
|
||||
}).mouseout(function(){ $(this).css({"background-color":"white"});});
|
||||
});
|
||||
flag++;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
//for Reset WH, OT, PL, AB to zero if all days entries are zero
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return flag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function resetFinalValues()
|
||||
{
|
||||
var Row = $('#attendance').find('tr');
|
||||
var totalrowcount = Row.length;
|
||||
totalrowcount = totalrowcount - 1;
|
||||
var totaldays = <?php echo $monthdays?>;
|
||||
console.log(totalrowcount);
|
||||
for(i=1;i<=totalrowcount;i++)
|
||||
{
|
||||
|
||||
|
||||
var a = parseFloat(document.getElementById(i+'PL').textContent);
|
||||
var b = parseFloat(document.getElementById(i+'AB').textContent);
|
||||
|
||||
if(totaldays == (a+b))
|
||||
{
|
||||
document.getElementById(i+'PL').textContent = '0.00';
|
||||
document.getElementById(i+'AB').textContent = '0.00';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -600,14 +600,14 @@ $('#datepick').change(function() {
|
||||
|
||||
<!-- Dashboard for admin-->
|
||||
<?php
|
||||
$user='';
|
||||
if(!empty($UserCount))
|
||||
{
|
||||
foreach ($UserCount as $uc)
|
||||
{
|
||||
$user = $uc->users;
|
||||
}
|
||||
}
|
||||
// $user='';
|
||||
// if(!empty($UserCount))
|
||||
// {
|
||||
// foreach ($UserCount as $uc)
|
||||
// {
|
||||
// $user = $uc->users;
|
||||
// }
|
||||
// }
|
||||
if($role == ROLE_ADMIN && $DEPCode != MANAGEMENT && $DEPCode != HR)
|
||||
{
|
||||
?>
|
||||
@ -624,7 +624,8 @@ $('#datepick').change(function() {
|
||||
<div class=" col-xs-12 col-md-4 col-md-offset-4">
|
||||
<div class="small-box bg-yellow">
|
||||
<div class="inner">
|
||||
<h3><?php echo $user ?></h3>
|
||||
<!-- <h3><?php echo $user ?></h3> -->
|
||||
<h3><?php echo $UserCount[0]->users; ?></h3>
|
||||
<p>User Registrations</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
$TotalDeduction = '';
|
||||
$SalaryAsPerPF = '';
|
||||
$FoodAllowance='';
|
||||
$Incentive = '';
|
||||
$Incentive = '';
|
||||
$FestBonus = '';
|
||||
$Advance = '';
|
||||
$BalanceAdvance = '';
|
||||
$LessAdvance = '';
|
||||
@ -86,7 +87,8 @@ if(!empty($PayInfo))
|
||||
$TotalDeduction = $ep->TotalDeduction;
|
||||
$SalaryAsPerPF = $ep->SalaryAsPerPF;
|
||||
$FoodAllowance=$ep->FoodAllowance;
|
||||
$Incentive = $ep->Incentive;
|
||||
$Incentive = $ep->Incentive;
|
||||
$FestBonus = $ep->Festival_Bonus;
|
||||
$Advance = $ep->Advance;
|
||||
$BalanceAdvance = $ep->BalanceAdvance;
|
||||
$LessAdvance = $ep->LessAdvance;
|
||||
@ -106,7 +108,7 @@ if(!empty($PayInfo))
|
||||
$DOJ = date_format($DOJ,"Y-m-d");
|
||||
$Designation = $ep->Designation;
|
||||
$DeptName = $ep->DeptName;
|
||||
$totalearnings = $WorkedSalary + $HRA + $FoodAllowance + $Other_allowances + $Incentive + $OTSalary;
|
||||
$totalearnings = $WorkedSalary + $HRA + $FoodAllowance + $Other_allowances + $Incentive + $FestBonus + $OTSalary;
|
||||
$totaldeductions = $PF + $EmployeeESI + $Advance + $OtherDeductions;
|
||||
|
||||
|
||||
@ -551,7 +553,32 @@ if(!empty($PayInfo))
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<center><label style="display:block;text-align:right;"><h4>Festival Bonus</h4></label></center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control num" id="festival" name="festival" value="<?php echo $FestBonus;?>" onchange="calculateSalary();" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
@ -744,6 +771,7 @@ function calculateSalary()
|
||||
var otherallowence = 0.00;
|
||||
var otherdeductions = 0.00;
|
||||
var incentive = 0.00;
|
||||
var festival =0.00;
|
||||
var txtbasicda = 0.00;
|
||||
var txtpf = 0.00;
|
||||
var txthra = 0.00;
|
||||
@ -773,6 +801,7 @@ function calculateSalary()
|
||||
otherallowence = parseFloat($('#otherallowence').val());
|
||||
otherdeductions = parseFloat($('#otherdeductions').val());
|
||||
incentive = parseFloat($('#incentive').val());
|
||||
festival = parseFloat($('#festival').val());
|
||||
txtbasicda = parseFloat($('#txtbasicda').val());
|
||||
txtpf = parseFloat($('#txtpf').val());
|
||||
txthra = parseFloat($('#txthra').val());
|
||||
@ -787,7 +816,7 @@ function calculateSalary()
|
||||
totaldeductions = parseFloat($('#totaldeductions').val());
|
||||
netpay = parseFloat($('#netpay').val());
|
||||
|
||||
totalearnings = parseFloat(txtbasicda + txthra + txtfood + otherallowence + incentive + otsalary,2);
|
||||
totalearnings = parseFloat(txtbasicda + txthra + txtfood + otherallowence + incentive + festival + otsalary,2);
|
||||
totaldeductions = parseFloat(otherdeductions + txtpf + txtesi + txtloandue,2);
|
||||
netpay = totalearnings - totaldeductions;
|
||||
|
||||
|
||||
@ -388,3 +388,51 @@ function changeTextBox() {
|
||||
</div>
|
||||
|
||||
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>
|
||||
<script>
|
||||
|
||||
$('#MaterialName').change(function() {
|
||||
|
||||
var materialname = $('#MaterialName').val();
|
||||
var material = materialname.replace(/ /g,'');
|
||||
$('#content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
data:{id:material},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>rawmaterialdetails/checkmaterial",
|
||||
success:function(data) {
|
||||
|
||||
var count = data.length;
|
||||
|
||||
if(count >2 ){
|
||||
$('#content').loader('hide');
|
||||
swal({
|
||||
title: "'" + materialname + " already existed ! ",
|
||||
// type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn-danger",
|
||||
confirmButtonText: "Material Details!",
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function(){
|
||||
dat = JSON.parse(data);
|
||||
var related_name = "";
|
||||
$.each(dat,function(i,obj){
|
||||
related_name += obj.MaterialCode +" - "+ obj.MaterialName+" - "+obj.MaterialType+" - "+obj.Category+"\n";
|
||||
|
||||
});
|
||||
|
||||
|
||||
swal( "'" + materialname + "' - related materials are ," , related_name);
|
||||
$("#MaterialName").focus();
|
||||
|
||||
});//sweet alert closed....
|
||||
}
|
||||
else{
|
||||
$('#content').loader('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -419,7 +419,7 @@ function onlyAlphabets(evt) {
|
||||
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
<section class="content" id="content">
|
||||
<div style="text-align:right;">
|
||||
<a href="<?php echo base_url() ?>supplierListing" class="btn btn-primary" value="Back"/>Back</a>
|
||||
</div>
|
||||
@ -809,7 +809,45 @@ if($("#Address").val().length < 1)
|
||||
|
||||
});
|
||||
|
||||
$('#supplierName').change(function() {
|
||||
var suppliername = $('#supplierName').val();
|
||||
var supplier = suppliername.replace(/ /g,'');
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:{id:supplier},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>supplier/checksupplier",
|
||||
success:function(data) {
|
||||
var count = data.length;
|
||||
if(count >2 ){
|
||||
$('#content').loader('hide');
|
||||
swal({
|
||||
title: " supplier already existed ! ",
|
||||
// type: "info",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn-danger",
|
||||
confirmButtonText: "Material Details!",
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function(){
|
||||
dat = JSON.parse(data);
|
||||
var related_supplier = "";
|
||||
$.each(dat,function(i,obj){
|
||||
related_supplier += obj.SupplierID +" - "+ obj.SupplierName +" - "+obj.Address+"\n";
|
||||
});
|
||||
|
||||
swal("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").focus();
|
||||
|
||||
});//sweet alert closed....
|
||||
}
|
||||
else{
|
||||
$('#content').loader('hide');
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@ -540,10 +540,10 @@ $full_path = $path .$pic;
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
<span>Monthly Pay Information</span>
|
||||
</a></li>
|
||||
<li><a href="<?php echo base_url(); ?>ExcelUpload2">
|
||||
<!--<li><a href="<?php echo base_url(); ?>ExcelUpload2">
|
||||
<i class="fa fa-upload"></i>
|
||||
<span>Monthly Pay Upload</span>
|
||||
</a></li>
|
||||
</a></li>-->
|
||||
<li><a href="<?php echo base_url(); ?>ViewPay">
|
||||
<i class="fa fa-money"></i>
|
||||
<span>PaySlip Generator</span>
|
||||
@ -555,7 +555,7 @@ $full_path = $path .$pic;
|
||||
<li> <a href="<?php echo base_url(); ?>emppayListings" >
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Employee Salary Details</span>
|
||||
</a></li>
|
||||
</a></li>
|
||||
<li><a href="<?php echo base_url(); ?>BankReport" >
|
||||
<i class="fa fa-table"></i> <span>Bank Report</span>
|
||||
</a></li>
|
||||
@ -565,6 +565,9 @@ $full_path = $path .$pic;
|
||||
<li> <a href="<?php echo base_url(); ?>loanreports" >
|
||||
<i class="fa fa-list-alt"></i> <span>Loan Reports</span>
|
||||
</a></li>
|
||||
<li> <a href="<?php echo base_url(); ?>bonusreports">
|
||||
<i class="fa fa-list-alt"></i> <span>Incentives And Bonus Reports</span>
|
||||
</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
|
||||
@ -61,8 +61,8 @@ $('html').bind('keypress', function(e)
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
<p><b>The <span style="background-color:#ff4d4d;">Red</span> highlighted Employee have loan to pay. Put <span style="background-color:#66ff33;">'NA'</span> for Skip Current Month Loan Due.</b></p>
|
||||
<form action="<?php echo base_url() ?>monthlypay/monthlyListing" method="POST" id="searchList">
|
||||
<p><b>The <span style="background-color:#ff4d4d;">Red</span> highlighted Employee have loan to pay. Put <span style="background-color:#66ff33;">'NA'</span> for Skip Current Month Loan Due.</b></p>
|
||||
<form action="<?php echo base_url() ?>monthlypay/monthlyListing" method="POST" id="searchList">
|
||||
|
||||
</form>
|
||||
</div><!--</h3></center>-->
|
||||
@ -138,10 +138,9 @@ $('html').bind('keypress', function(e)
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?php echo form_dropdown('name="monthyear"',$ot,set_value('monthyear',$currentselection),'id="monthyear"' ,'class="form-control select2');?>
|
||||
<form id="formid">
|
||||
<form id="formid">
|
||||
<?php echo form_dropdown('monthyear',$ot,set_value('monthyear',$currentselection),'id="monthyear"' ,'class="form-control select2');?>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@ -160,6 +159,7 @@ $('html').bind('keypress', function(e)
|
||||
|
||||
<th>Incentives in ₹</th>
|
||||
<th>Other Deductions in ₹</th>
|
||||
<th>Festival Bonus in ₹</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@ -207,6 +207,7 @@ $('html').bind('keypress', function(e)
|
||||
<td <?php if(empty($record->Key) && !empty($record->Loan_ID)){ echo "contenteditable='true'; style='background-color:#ffcccc;text-align:right' title='Loan Pending'"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Loan_Recovered)){if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.','');}else {echo $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.','');} ?></td>
|
||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Incentives)){echo $record->Incentives;}else{ echo number_format(0.00,2,'.','');;} ?></td>
|
||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Other_Deductions)){echo $record->Other_Deductions; }else{ echo number_format(0.00,2,'.','');;} ?></td>
|
||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Festival_Bonus)){echo $record->Festival_Bonus; }else{ echo number_format(0.00,2,'.','');;} ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
@ -237,56 +238,47 @@ $('html').bind('keypress', function(e)
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(function () {
|
||||
|
||||
|
||||
// $('#monthlylistings').DataTable({
|
||||
// "paging": true,
|
||||
// "lengthChange": true,
|
||||
// "searching": true,
|
||||
// "ordering": true,
|
||||
// "aaSorting": [[ 0, "asc" ]],
|
||||
// "info": true,
|
||||
// "autoWidth": true
|
||||
/* $('#monthlylisting').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"aaSorting": [[ 0, "asc" ]],
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
// });
|
||||
|
||||
|
||||
|
||||
var t = $('#monthlylistings').DataTable( {
|
||||
|
||||
"columnDefs": [ {
|
||||
|
||||
"searchable": false,
|
||||
|
||||
"orderable": false,
|
||||
|
||||
"targets": 0
|
||||
} ],
|
||||
"searching": true,
|
||||
"lengthChange": true,
|
||||
"info": true,
|
||||
"autoWidth": true,
|
||||
"order": [[ 1, 'asc' ]]
|
||||
} );
|
||||
|
||||
|
||||
t.on( 'order.dt search.dt', function () {
|
||||
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = i+1;
|
||||
} );
|
||||
} ).draw();
|
||||
} );
|
||||
var s = "<?php echo $drop; ?>";
|
||||
}); */
|
||||
|
||||
var t = $('#monthlylistings').DataTable( {
|
||||
"columnDefs": [ {
|
||||
"searchable": false,
|
||||
"orderable": false,
|
||||
"targets": 0
|
||||
} ],
|
||||
"searching": true,
|
||||
"lengthChange": true,
|
||||
"info": true,
|
||||
"paging": false,
|
||||
"autoWidth": true,
|
||||
"order": [[ 1, 'asc' ]]
|
||||
} );
|
||||
|
||||
t.on( 'order.dt search.dt', function () {
|
||||
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
|
||||
cell.innerHTML = i+1;
|
||||
} );
|
||||
} ).draw();
|
||||
|
||||
var s = "<?php echo $drop; ?>";
|
||||
$('#monthyear').val(s);
|
||||
|
||||
savebuttonvalidation();
|
||||
savebuttonvalidation();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function getAllData()
|
||||
@ -317,13 +309,15 @@ var s = "<?php echo $drop; ?>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$("#monthyear").change(function(){
|
||||
|
||||
$s = $('#monthyear').val();
|
||||
|
||||
//echo $dropdownvalue;
|
||||
//$('#monthyear').attr('selected',true);
|
||||
//alert($s);
|
||||
|
||||
$("#formid").attr("method", "post");
|
||||
|
||||
//alert($s);
|
||||
$("#formid").attr("action", "<?php echo base_url() ?>payslip/changeMonth");
|
||||
|
||||
$('#formid').submit();
|
||||
@ -333,19 +327,19 @@ var s = "<?php echo $drop; ?>";
|
||||
function savebuttonvalidation()
|
||||
{
|
||||
var curselection = $("#monthyear").val();
|
||||
|
||||
//alert('current selection'+curselection);
|
||||
var currentdate = new Date();
|
||||
var currentmonth = currentdate.getMonth();
|
||||
var currentyear = currentdate.getFullYear();
|
||||
currentmonth++;
|
||||
|
||||
//alert('currentmonth'+currentmonth);
|
||||
var res = curselection.split("-");
|
||||
var selmonth = res[0];
|
||||
var selyear = res[1];
|
||||
|
||||
//alert('current selec month '+ selmonth + 'current selec year '+ selyear);
|
||||
var savebuttonstatus = currentmonth - selmonth;
|
||||
var year = currentyear - selyear ;
|
||||
|
||||
//alert(selyear + currentyear);
|
||||
if(savebuttonstatus >= 2)
|
||||
{
|
||||
if(year == 1)
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
$SalaryAsPerPF = '';
|
||||
$FoodAllowance ='';
|
||||
$Incentive = '';
|
||||
$Festival_bonus = '';
|
||||
$TotalSalary = '';
|
||||
$Advance = '';
|
||||
$BalanceAdvance = '';
|
||||
@ -150,7 +151,18 @@ if(!empty($PayDetails))
|
||||
{
|
||||
$Incentive = $IncenAmt;
|
||||
}
|
||||
$TotalSalary = $WorkedSalary+$HRA+$Food+$IncenAmt+$OTSal+$Otherallowances;
|
||||
|
||||
$festbonus = $Pay->Festival_Bonus;
|
||||
if($festbonus == '')
|
||||
{
|
||||
$Festival_bonus = '0.00';
|
||||
}
|
||||
else
|
||||
{
|
||||
$Festival_bonus = $festbonus;
|
||||
}
|
||||
|
||||
$TotalSalary = $WorkedSalary+$HRA+$Food+$IncenAmt+$Festival_bonus+$OTSal+$Otherallowances;
|
||||
$Adv = $Pay->Advance;
|
||||
if($Adv == '')
|
||||
{
|
||||
@ -306,6 +318,14 @@ if($RecCount > 0)
|
||||
<td></td>
|
||||
<td style="text-align: right;"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> Festival Bonus</td>
|
||||
<td style="text-align: right;"><?php echo $Festival_bonus ?> </td>
|
||||
<td></td>
|
||||
<td style="text-align: right;"></td>
|
||||
</tr>
|
||||
|
||||
<tr><th nowrap> Total Earning (Rounded) (TE)</th>
|
||||
<td style="text-align: right;"> <?php echo number_format(round($TotalSalary),2,'.','')?> </td>
|
||||
<th nowrap> Total Deduction (Rounded)(TD)</th>
|
||||
|
||||
@ -259,7 +259,6 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc
|
||||
<br>
|
||||
|
||||
<table style="border-collapse: collapse;border-left-style:hidden;border-right-style:hidden;" cellpadding="0" cellspacing="0" border="1" width="100%">
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$i=0;
|
||||
@ -305,14 +304,13 @@ $OrderValue = (( $SubTotalAmount + $AfterCGST +$AfterIGST+$AfterSGST +$Insuranc
|
||||
{
|
||||
echo $rec->LineAmend ;
|
||||
}
|
||||
} }?>
|
||||
|
||||
<tr>
|
||||
} ?>
|
||||
<tr>
|
||||
<td style="text-align: center;"><strong>Total</strong></td>
|
||||
<td style="text-align: center;" rowspan="2"><b>Current Total Order :<?php echo $AmendmentPDF[0]->partenttotalorder ?></b></td>
|
||||
<td style="text-align: center;" rowspan="2"><b>Revised Total Order :<?php echo $AmendmentPDF[0]->TotalOrderValue ?></b></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user