diff --git a/application/controllers/payslip.php b/application/controllers/payslip.php
index 7a165833..569065cf 100755
--- a/application/controllers/payslip.php
+++ b/application/controllers/payslip.php
@@ -1260,12 +1260,25 @@ $amountInWords = "Rupees " . $result ." Paise ". $points." Only";
$fin_year = $this->input->post('finyear');
//echo "values are,".$year.$fin_year;
- $data['dropdownvalue'] = $fin_year;
+ $data['finyear'] = $fin_year;
$data['Reportvalue'] = $this->monthlypay_model->reportvalue($fin_year);
$this->loadViews("Bonusreport", $this->global,$data,NULL);
}
+ function MonthwiseBonusreport()
+ {
+ //echo"in controller";
+ $EmployeeID = $_GET['EID'];
+ $Fin_year = $_GET['Finyear'];
+ $data['finyear'] = $Fin_year;
+ //echo $EmployeeID;
+ //echo $Fin_year;
+ $this->global['pageTitle'] = 'Siddharth : Monthwise Incentive and Bonus Reports';
+ $data['MonthwiseReport'] = $this->monthlypay_model->Monthwisereportvalue($Fin_year,$EmployeeID);
+ //print_r($data['MonthwiseReport']);
+ $this->loadViews("Bonusreportmonthwise", $this->global,$data,NULL);
+ }
}
?>
\ No newline at end of file
diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php
index 59a43804..998e407e 100755
--- a/application/models/monthlypay_model.php
+++ b/application/models/monthlypay_model.php
@@ -370,6 +370,25 @@ join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA
$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();
+ }
diff --git a/application/views/Bonusreport.php b/application/views/Bonusreport.php
index c3c1af99..831b1caf 100644
--- a/application/views/Bonusreport.php
+++ b/application/views/Bonusreport.php
@@ -85,11 +85,9 @@
- |
+ |
EmpID ?> |
- FirstName ." ". $record->LastName ?> |
-
+ FirstName ." ". $record->LastName ?> |
Incentives)){$total+=$record->Incentives; echo $record->Incentives;}else{echo "0.00";}?> |
Bonus)){$totalbonus+=$record->Bonus ;echo $record->Bonus;}else{echo "0.00";} ?> |
@@ -175,8 +173,8 @@ $(function () {
});
/*------after reload display the value text box (fin_year text box)------- */
-//if(!empty($dropdownvalue)){
- var s = "";
+//if(!empty($finyear)){
+ var s = "";
$('#finyearttext').val(s);
///}
});
@@ -195,7 +193,7 @@ $('#formid').submit();
});
/*-----------------for export execl button------------------------------- */
-var name = "";
+var name = "";
$("#monthlylistings").tableExport({
bootstrap: true,
separator: ",",
diff --git a/application/views/Bonusreportmonthwise.php b/application/views/Bonusreportmonthwise.php
new file mode 100644
index 00000000..ec7946ec
--- /dev/null
+++ b/application/views/Bonusreportmonthwise.php
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | S.No |
+ Employee Id |
+ Employee Name |
+ Month Year |
+ Incentives in ₹ |
+ Festival Bonus in ₹ |
+
+
+
+
+
+
+
+
+ |
+ EmpID ?> |
+ FirstName ." ". $record->LastName ?> |
+ 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
+ ?> |
+ Incentives)){$total+=$record->Incentives; echo $record->Incentives;}else{echo "0.00";}?> |
+ Bonus)){$totalbonus+=$record->Bonus ;echo $record->Bonus;}else{echo "0.00";} ?> |
+
+
+
+
+
+
+
+ |
+ |
+ |
+ |
+
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file