Dashboard changes
This commit is contained in:
parent
a7129dfdde
commit
485ddbdf1a
@ -132,8 +132,8 @@ class Dashboard_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function getleadCountMonth_post(){
|
public function getleadCountMonth_post(){
|
||||||
$data = $this->post('data');
|
$branchId = $this->post('branchId');
|
||||||
$getleadCountMonth = $this->dashboard_model->leadCountMonth();
|
$getleadCountMonth = $this->dashboard_model->leadCountMonth( $branchId);
|
||||||
if ($getleadCountMonth) {
|
if ($getleadCountMonth) {
|
||||||
$getleadCountMonth['status'] = REST_Controller::HTTP_OK;
|
$getleadCountMonth['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
@ -149,8 +149,8 @@ class Dashboard_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function getleadCountDayClosed_post(){
|
public function getleadCountDayClosed_post(){
|
||||||
$data = $this->post('data');
|
$branchId = $this->post('branchId');
|
||||||
$getleadCountDayClosed = $this->dashboard_model->leadCountDayClosed();
|
$getleadCountDayClosed = $this->dashboard_model->leadCountDayClosed($branchId);
|
||||||
if ($getleadCountDayClosed) {
|
if ($getleadCountDayClosed) {
|
||||||
$getleadCountDayClosed['status'] = REST_Controller::HTTP_OK;
|
$getleadCountDayClosed['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
@ -166,8 +166,8 @@ class Dashboard_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function getleadCountMonthClosed_post(){
|
public function getleadCountMonthClosed_post(){
|
||||||
$data = $this->post('data');
|
$branchId = $this->post('branchId');
|
||||||
$getleadCountMonthClosed = $this->dashboard_model->leadCountMonthClosed();
|
$getleadCountMonthClosed = $this->dashboard_model->leadCountMonthClosed( $branchId);
|
||||||
if ($getleadCountMonthClosed) {
|
if ($getleadCountMonthClosed) {
|
||||||
$getleadCountMonthClosed['status'] = REST_Controller::HTTP_OK;
|
$getleadCountMonthClosed['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
@ -341,8 +341,10 @@ class Dashboard_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function admissionYear_post(){
|
public function admissionYear_post(){
|
||||||
$data = $this->post('data');
|
$fyear = $this->post('fyear');
|
||||||
$admissionYear = $this->dashboard_model->admissionYear();
|
$univ = $this->post('univ');
|
||||||
|
$branchId = $this->post('branchId');
|
||||||
|
$admissionYear = $this->dashboard_model->admissionYear( $fyear, $univ, $branchId);
|
||||||
if ($admissionYear) {
|
if ($admissionYear) {
|
||||||
$admissionYear['status'] = REST_Controller::HTTP_OK;
|
$admissionYear['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
@ -358,8 +360,9 @@ class Dashboard_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function feeOutstanding_post(){
|
public function feeOutstanding_post(){
|
||||||
$data = $this->post('data');
|
$branchId = $this->post('branchId');
|
||||||
$feeOutstanding = $this->dashboard_model->feeOutstanding();
|
$univ = $this->post('univ');
|
||||||
|
$feeOutstanding = $this->dashboard_model->feeOutstanding($branchId, $univ);
|
||||||
if ($feeOutstanding) {
|
if ($feeOutstanding) {
|
||||||
$feeOutstanding['status'] = REST_Controller::HTTP_OK;
|
$feeOutstanding['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
@ -411,8 +414,9 @@ class Dashboard_Controller extends REST_Controller {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function admissionBatch_post(){
|
public function admissionBatch_post(){
|
||||||
|
$branchId = $this->post('branchId');
|
||||||
$univ = $this->post('univ');
|
$univ = $this->post('univ');
|
||||||
$admissionBatch = $this->dashboard_model->admissionBatch($univ);
|
$admissionBatch = $this->dashboard_model->admissionBatch($univ,$branchId);
|
||||||
if ($admissionBatch) {
|
if ($admissionBatch) {
|
||||||
$admissionBatch['status'] = REST_Controller::HTTP_OK;
|
$admissionBatch['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
|
|||||||
@ -213,9 +213,16 @@ class Dashboard_model extends CI_Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
public function leadCountDay($branchId){
|
public function leadCountDay($branchId){
|
||||||
$ltsql = "select count(distinct TrackingID) as count from T_Lead_Tracking_Followup ltf
|
$ltsql = "select count(InteractionID) as count
|
||||||
|
from T_Lead_Tracking_Followup as ltf
|
||||||
|
left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
|
||||||
|
join T_Login l on l.ID=lt.AssignedTo
|
||||||
|
join T_StaffDetails sd on sd.StaffID=l.StaffID
|
||||||
|
left join T_Lead_Details ld on ld.LeadID=lt.LeadID
|
||||||
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where date(ltf.CreatedOn) = date(now()) and ltf.IsActive = 1 and InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID) ";
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
|
and date(ltf.CreatedOn) = date(now()) and ltf.IsActive = 1 and sd.BranchCode = '".$branchId."' ";
|
||||||
$ltCount=$this->db->query($ltsql);
|
$ltCount=$this->db->query($ltsql);
|
||||||
$lcount = $ltCount->result();
|
$lcount = $ltCount->result();
|
||||||
|
|
||||||
@ -230,10 +237,17 @@ if (count($lcount) > 0) {
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
public function leadCountMonth(){
|
public function leadCountMonth($branchId){
|
||||||
$ltsql = "select count(distinct TrackingID) as count from T_Lead_Tracking_Followup ltf
|
$ltsql = "select count(InteractionID) as count
|
||||||
|
from T_Lead_Tracking_Followup as ltf
|
||||||
|
left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
|
||||||
|
join T_Login l on l.ID=lt.AssignedTo
|
||||||
|
join T_StaffDetails sd on sd.StaffID=l.StaffID
|
||||||
|
left join T_Lead_Details ld on ld.LeadID=lt.LeadID
|
||||||
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where month(ltf.CreatedOn) = month(now()) and ltf.IsActive = 1 and InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)";
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
|
and month(ltf.CreatedOn) = month(now()) and ltf.IsActive = 1 and sd.BranchCode = '".$branchId."' ";
|
||||||
$ltCount=$this->db->query($ltsql);
|
$ltCount=$this->db->query($ltsql);
|
||||||
$lcount = $ltCount->result();
|
$lcount = $ltCount->result();
|
||||||
|
|
||||||
@ -247,10 +261,17 @@ public function leadCountMonth(){
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
public function leadCountDayClosed(){
|
public function leadCountDayClosed($branchId){
|
||||||
$ltsql = "select count(distinct TrackingID) as count from T_Lead_Tracking_Followup ltf
|
$ltsql = "select count(InteractionID) as count
|
||||||
|
from T_Lead_Tracking_Followup as ltf
|
||||||
|
left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
|
||||||
|
join T_Login l on l.ID=lt.AssignedTo
|
||||||
|
join T_StaffDetails sd on sd.StaffID=l.StaffID
|
||||||
|
left join T_Lead_Details ld on ld.LeadID=lt.LeadID
|
||||||
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where date(ltf.CreatedOn) = date(now()) and ltf.IsActive = 1 and list.ListName like 'CLOSE' and InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)";
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
|
and date(ltf.CreatedOn) = date(now()) and list.ListName like 'CLOSE' and ltf.IsActive = 1 and sd.BranchCode = '".$branchId."' ";
|
||||||
$ltCount=$this->db->query($ltsql);
|
$ltCount=$this->db->query($ltsql);
|
||||||
$lcount = $ltCount->result();
|
$lcount = $ltCount->result();
|
||||||
|
|
||||||
@ -265,10 +286,17 @@ public function leadCountMonth(){
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
public function leadCountMonthClosed(){
|
public function leadCountMonthClosed($branchId){
|
||||||
$ltsql = "select count(distinct TrackingID) as count from T_Lead_Tracking_Followup ltf
|
$ltsql = "select count(InteractionID) as count
|
||||||
|
from T_Lead_Tracking_Followup as ltf
|
||||||
|
left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
|
||||||
|
join T_Login l on l.ID=lt.AssignedTo
|
||||||
|
join T_StaffDetails sd on sd.StaffID=l.StaffID
|
||||||
|
left join T_Lead_Details ld on ld.LeadID=lt.LeadID
|
||||||
|
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||||
where month(ltf.CreatedOn) = month(now()) and ltf.IsActive = 1 and list.ListName like 'CLOSE' and InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)";
|
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||||
|
and month(ltf.CreatedOn) = month(now()) and list.ListName like 'CLOSE' and ltf.IsActive = 1 and sd.BranchCode = '".$branchId."' ";
|
||||||
$ltCount=$this->db->query($ltsql);
|
$ltCount=$this->db->query($ltsql);
|
||||||
$lcount = $ltCount->result();
|
$lcount = $ltCount->result();
|
||||||
|
|
||||||
@ -508,8 +536,60 @@ public function leadCountMonth(){
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
public function admissionMonth(){
|
public function admissionMonth($year = null,$month = null){
|
||||||
$sql = "SELECT * FROM admission_month ";
|
$sql = "select UniversityID as uid,university,
|
||||||
|
SUM(IF((wc.week_of_month = 1), wc.tot_cnt,0)) AS week1,
|
||||||
|
SUM(IF((wc.week_of_month = 2), wc.tot_cnt,0)) AS week2,
|
||||||
|
SUM(IF((wc.week_of_month = 3), wc.tot_cnt,0)) AS week3,
|
||||||
|
SUM(IF((wc.week_of_month = 4), wc.tot_cnt,0)) AS week4,
|
||||||
|
SUM(IF((wc.week_of_month = 5), wc.tot_cnt,0)) AS week5,
|
||||||
|
sum(tot_cnt) as total,
|
||||||
|
group_concat(AdmittedBy,'-',tot_cnt separator ',') as AdmissionTakenBy
|
||||||
|
from (SELECT
|
||||||
|
scd.UniversityID AS UniversityID,
|
||||||
|
um.UniversityName as university,
|
||||||
|
std.CreatedOn AS cdate,
|
||||||
|
std.AdmittedBy AS AdmittedBy,
|
||||||
|
(FLOOR(((DAYOFMONTH(std.CreatedOn) - 1) / 7)) + 1) AS week_of_month,
|
||||||
|
COUNT(scd.StudentID) AS tot_cnt
|
||||||
|
FROM
|
||||||
|
T_StudentDetails std
|
||||||
|
JOIN getUniv scd ON scd.StudentID = std.StudentID
|
||||||
|
left join T_UniversityMaster um on um.UniversityID = scd.UniversityID
|
||||||
|
WHERE
|
||||||
|
std.AdmittedBy IS NOT NULL
|
||||||
|
AND YEAR(std.CreatedOn) = YEAR(NOW())
|
||||||
|
AND MONTH(std.CreatedOn) = MONTH(NOW())
|
||||||
|
GROUP BY scd.UniversityID , std.AdmittedBy) wc
|
||||||
|
group by uid ";
|
||||||
|
|
||||||
|
if ($year != '' and $month != '') {
|
||||||
|
$sql = "select UniversityID as uid,university,
|
||||||
|
SUM(IF((wc.week_of_month = 1), wc.tot_cnt,0)) AS week1,
|
||||||
|
SUM(IF((wc.week_of_month = 2), wc.tot_cnt,0)) AS week2,
|
||||||
|
SUM(IF((wc.week_of_month = 3), wc.tot_cnt,0)) AS week3,
|
||||||
|
SUM(IF((wc.week_of_month = 4), wc.tot_cnt,0)) AS week4,
|
||||||
|
SUM(IF((wc.week_of_month = 5), wc.tot_cnt,0)) AS week5,
|
||||||
|
sum(tot_cnt) as total,
|
||||||
|
group_concat(AdmittedBy,'-',tot_cnt separator ',') as AdmissionTakenBy
|
||||||
|
from (SELECT
|
||||||
|
scd.UniversityID AS UniversityID,
|
||||||
|
um.UniversityName as university,
|
||||||
|
std.CreatedOn AS cdate,
|
||||||
|
std.AdmittedBy AS AdmittedBy,
|
||||||
|
(FLOOR(((DAYOFMONTH(std.CreatedOn) - 1) / 7)) + 1) AS week_of_month,
|
||||||
|
COUNT(scd.StudentID) AS tot_cnt
|
||||||
|
FROM
|
||||||
|
T_StudentDetails std
|
||||||
|
JOIN getUniv scd ON scd.StudentID = std.StudentID
|
||||||
|
left join T_UniversityMaster um on um.UniversityID = scd.UniversityID
|
||||||
|
WHERE
|
||||||
|
std.AdmittedBy IS NOT NULL
|
||||||
|
AND YEAR(std.CreatedOn) = '".$year."'
|
||||||
|
AND MONTH(std.CreatedOn) = '".$month."'
|
||||||
|
GROUP BY scd.UniversityID , std.AdmittedBy) wc
|
||||||
|
group by uid ";
|
||||||
|
}
|
||||||
$ltd=$this->db->query($sql);
|
$ltd=$this->db->query($sql);
|
||||||
$tlead = $ltd->result();
|
$tlead = $ltd->result();
|
||||||
if (count($tlead) > 0) {
|
if (count($tlead) > 0) {
|
||||||
@ -522,7 +602,7 @@ public function leadCountMonth(){
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
public function admissionYear(){
|
public function admissionYear( $fyear = null, $univ = null, $branchId = null){
|
||||||
if (date('m') >= 4) {
|
if (date('m') >= 4) {
|
||||||
$yearl = date('Y').'-'.(date('Y')+1);
|
$yearl = date('Y').'-'.(date('Y')+1);
|
||||||
} else {
|
} else {
|
||||||
@ -552,13 +632,76 @@ public function leadCountMonth(){
|
|||||||
FROM
|
FROM
|
||||||
T_StudentDetails std
|
T_StudentDetails std
|
||||||
JOIN getUniYear scd ON scd.StudentID = std.StudentID
|
JOIN getUniYear scd ON scd.StudentID = std.StudentID
|
||||||
JOIN staff_count sc ON sc.UniversityID = scd.UniversityID
|
JOIN (select UniversityID,AdmittedBy,cnt,sname,group_concat(sname,'-',cnt) as staf from (SELECT scd.UniversityID AS UniversityID,
|
||||||
|
std.BranchCode,
|
||||||
|
std.CreatedOn,
|
||||||
|
COUNT(std.StudentID) AS cnt,
|
||||||
|
IFNULL(std.AdmittedBy, '-') AS AdmittedBy,
|
||||||
|
CONCAT(sd.Firstname, sd.Lastname) AS sname
|
||||||
|
FROM
|
||||||
|
T_StudentDetails std
|
||||||
|
left JOIN T_Student_CourseDetails scd ON scd.StudentID = std.StudentID
|
||||||
|
JOIN T_StaffDetails sd ON sd.StaffID = std.AdmittedBy
|
||||||
|
WHERE
|
||||||
|
std.AdmittedBy IS NOT NULL and std.BranchCode = '".$branchId."' and (date(std.CreatedOn) >= '".$fa."-06-01' and date(std.CreatedOn) <= '".$aa."-05-31')
|
||||||
|
GROUP BY std.AdmittedBy , scd.UniversityID) a group by UniversityID,AdmittedBy ) sc ON sc.UniversityID = scd.UniversityID
|
||||||
AND sc.AdmittedBy = std.AdmittedBy
|
AND sc.AdmittedBy = std.AdmittedBy
|
||||||
LEFT JOIN T_UniversityMaster um ON um.UniversityID = scd.UniversityID
|
LEFT JOIN T_UniversityMaster um ON um.UniversityID = scd.UniversityID
|
||||||
WHERE
|
WHERE
|
||||||
std.AdmittedBy IS NOT NULL and (date(std.CreatedOn) >= '".$fa."-06-01' and date(std.CreatedOn) <= '".$aa."-05-31')";
|
std.AdmittedBy IS NOT NULL and std.BranchCode = '".$branchId."' and (date(std.CreatedOn) >= '".$fa."-06-01' and date(std.CreatedOn) <= '".$aa."-05-31')
|
||||||
|
GROUP BY scd.UniversityID ";
|
||||||
|
|
||||||
$sql.=" GROUP BY scd.UniversityID";
|
if($fyear != ''){
|
||||||
|
// print_r($fyear);
|
||||||
|
$ab=$fyear;
|
||||||
|
$fa1 = substr($ab,0,-5);
|
||||||
|
$aa1 = substr($ab,5,5);
|
||||||
|
|
||||||
|
$sql =" SELECT month(std.CreatedOn),
|
||||||
|
std.AdmittedBy AS AdmittedBy,
|
||||||
|
um.UniversityName AS university,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 6), 1, 0)) AS June,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 7), 1, 0)) AS July,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 8), 1, 0)) AS August,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 9), 1, 0)) AS September,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 10), 1, 0)) AS October,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 11), 1, 0)) AS November,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 12), 1, 0)) AS December,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 1), 1, 0)) AS January,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 2), 1, 0)) AS February,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 3), 1, 0)) AS March,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 4), 1, 0)) AS April,
|
||||||
|
SUM(IF((MONTH(std.CreatedOn) = 5), 1, 0)) AS May,
|
||||||
|
COUNT(DISTINCT std.StudentID) AS total,
|
||||||
|
GROUP_CONCAT(DISTINCT sc.sname, '-', sc.cnt SEPARATOR ';') AS AdmissionTakenBy
|
||||||
|
FROM
|
||||||
|
T_StudentDetails std
|
||||||
|
JOIN getUniYear scd ON scd.StudentID = std.StudentID
|
||||||
|
JOIN (select UniversityID,AdmittedBy,cnt,sname,group_concat(sname,'-',cnt) as staf from (SELECT scd.UniversityID AS UniversityID,
|
||||||
|
std.BranchCode,
|
||||||
|
std.CreatedOn,
|
||||||
|
COUNT( distinct std.StudentID) AS cnt,
|
||||||
|
IFNULL(std.AdmittedBy, '-') AS AdmittedBy,
|
||||||
|
CONCAT(sd.Firstname, sd.Lastname) AS sname
|
||||||
|
FROM
|
||||||
|
T_StudentDetails std
|
||||||
|
left JOIN T_Student_CourseDetails scd ON scd.StudentID = std.StudentID
|
||||||
|
JOIN T_StaffDetails sd ON sd.StaffID = std.AdmittedBy
|
||||||
|
WHERE
|
||||||
|
std.AdmittedBy IS NOT NULL and std.BranchCode = '".$branchId."' and (date(std.CreatedOn) >= '".$fa1."-06-01' and date(std.CreatedOn) <= '".$aa1."-05-31')
|
||||||
|
GROUP BY std.AdmittedBy , scd.UniversityID) a group by UniversityID,AdmittedBy ) sc ON sc.UniversityID = scd.UniversityID
|
||||||
|
AND sc.AdmittedBy = std.AdmittedBy
|
||||||
|
LEFT JOIN T_UniversityMaster um ON um.UniversityID = scd.UniversityID
|
||||||
|
WHERE
|
||||||
|
std.AdmittedBy IS NOT NULL and std.BranchCode = '".$branchId."' and (date(std.CreatedOn) >= '".$fa1."-06-01' and date(std.CreatedOn) <= '".$aa1."-05-31')
|
||||||
|
GROUP BY scd.UniversityID ";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// print_r($fa);
|
||||||
|
// print_r($aa);
|
||||||
|
//print_r($sql);
|
||||||
$ltd=$this->db->query($sql);
|
$ltd=$this->db->query($sql);
|
||||||
$tlead = $ltd->result();
|
$tlead = $ltd->result();
|
||||||
if (count($tlead) > 0) {
|
if (count($tlead) > 0) {
|
||||||
@ -571,13 +714,45 @@ public function leadCountMonth(){
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
public function feeOutstanding(){
|
|
||||||
$sql = "select b.bcode,b.Batches,sum(b.totalpayable) as TotalPayableFee,sum(b.totalpaid) as TotalPaidFee,sum(b.balpayable) as TotalBalance,round(ifnull(((sum(b.balpayable)/sum(b.totalpayable))*100),0),2) as BalancePercentage,
|
|
||||||
scb.staff as BalancePercentageByStaff
|
|
||||||
from BalFees b
|
public function feeOutstanding($branchId = null, $univ = null){
|
||||||
left join (select bcode,sum(totalpayable) as tot,sum(totalpaid) as paid,sum(balpayable) as balance,((sum(balpayable)/sum(totalpayable)) * 100) as balPercentage,group_concat(staff,'-',bal_percentage) as staff from staff_count_batch
|
$sql = "select bcode,Batches,uid,staff,admittedby,sum(totalpayable) as TotalPayableFee,sum(totalpaid) as TotalPaidFee,(sum(totalpayable) - sum(totalpaid)) as TotalBalance,
|
||||||
group by bcode) scb on scb.bcode = b.bcode
|
round((((sum(totalpayable) - sum(totalpaid)) / sum(totalpayable)) * 100),0) as BalancePercentage,
|
||||||
group by b.bcode ";
|
group_concat(staff,'-',bal_percentage separator ',') as BalancePercentageByStaff
|
||||||
|
from
|
||||||
|
(SELECT
|
||||||
|
a.BatchCode AS bcode,
|
||||||
|
bm.UniversityID AS uid,
|
||||||
|
bm.BatchName as Batches,
|
||||||
|
IFNULL(std.AdmittedBy, '-') AS admittedby,
|
||||||
|
IFNULL(CONCAT(sd.Firstname, sd.Lastname),
|
||||||
|
'-') AS staff,
|
||||||
|
SUM((((a.CourseFees + a.STFOrWR) + a.Waiver) + a.Others)) AS totalpayable,
|
||||||
|
IFNULL(SUM(bb.BillAmount), 0) AS totalpaid,
|
||||||
|
(SUM((((a.CourseFees + a.STFOrWR) + a.Waiver) + a.Others)) - IFNULL(SUM(bb.BillAmount), 0)) AS balpayable,
|
||||||
|
ROUND((((SUM((((a.CourseFees + a.STFOrWR) + a.Waiver) + a.Others)) - IFNULL(SUM(bb.BillAmount), 0)) / SUM((((a.CourseFees + a.STFOrWR) + a.Waiver) + a.Others))) * 100),
|
||||||
|
0) AS bal_percentage
|
||||||
|
FROM
|
||||||
|
T_Students_Fees_Status a
|
||||||
|
LEFT JOIN BalFeesChild bb ON a.FeesID = bb.FeesId
|
||||||
|
LEFT JOIN T_Course_Fees_Details c ON c.ID = a.FeesType
|
||||||
|
LEFT JOIN T_StudentDetails std ON std.StudentID = a.StudentID
|
||||||
|
LEFT JOIN T_StaffDetails sd ON sd.StaffID = std.AdmittedBy
|
||||||
|
LEFT JOIN T_BatchMaster bm ON bm.BatchCode = a.BatchCode
|
||||||
|
where a.BranchCode = '".$branchId."'
|
||||||
|
GROUP BY std.AdmittedBy , bcode) b
|
||||||
|
|
||||||
|
|
||||||
|
";
|
||||||
|
|
||||||
|
if($univ != ''){
|
||||||
|
$sql.= " where uid = '".$univ."' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql.= " group by bcode ";
|
||||||
|
//print_r($sql);
|
||||||
$ltd=$this->db->query($sql);
|
$ltd=$this->db->query($sql);
|
||||||
$tlead = $ltd->result();
|
$tlead = $ltd->result();
|
||||||
if (count($tlead) > 0) {
|
if (count($tlead) > 0) {
|
||||||
@ -666,14 +841,14 @@ group by bcode) scb on scb.bcode = b.bcode
|
|||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
public function admissionBatch($univ = null){
|
public function admissionBatch($univ = null, $branchId = null){
|
||||||
$sql = "SELECT sfs.BatchCode as bcode,scd.UniversityID as uid,ifnull(bm.BatchName,'-') as Batches,month(std.CreatedOn),ifnull(concat(sd.Firstname,' ',sd.Lastname),'-') as Staff,ifnull(std.AdmittedBy,'-') as admittedby,count(distinct std.StudentID) as TotalNoOfAdmissions
|
$sql = "SELECT sfs.BatchCode as bcode,scd.UniversityID as uid,ifnull(bm.BatchName,'-') as Batches,month(std.CreatedOn),ifnull(concat(sd.Firstname,' ',sd.Lastname),'-') as Staff,ifnull(std.AdmittedBy,'-') as admittedby,count(distinct std.StudentID) as TotalNoOfAdmissions
|
||||||
FROM T_StudentDetails std
|
FROM T_StudentDetails std
|
||||||
join T_Student_CourseDetails scd on scd.StudentID = std.StudentID
|
join T_Student_CourseDetails scd on scd.StudentID = std.StudentID
|
||||||
left join T_Students_Fees_Status sfs on sfs.StudentID =scd.StudentID and sfs.CourseID = scd.CourseID
|
left join T_Students_Fees_Status sfs on sfs.StudentID =scd.StudentID and sfs.CourseID = scd.CourseID
|
||||||
left join T_BatchMaster bm on bm.BatchCode = sfs.BatchCode
|
left join T_BatchMaster bm on bm.BatchCode = sfs.BatchCode
|
||||||
left join T_StaffDetails sd on sd.StaffID = std.AdmittedBy
|
left join T_StaffDetails sd on sd.StaffID = std.AdmittedBy
|
||||||
where year(std.CreatedOn) = year(now())
|
where year(std.CreatedOn) = year(now()) and std.BranchCode = '".$branchId."'
|
||||||
";
|
";
|
||||||
|
|
||||||
if($univ != ''){
|
if($univ != ''){
|
||||||
@ -707,12 +882,21 @@ group by bcode) scb on scb.bcode = b.bcode
|
|||||||
$usql = "select UniversityID,UniversityName from T_UniversityMaster ";
|
$usql = "select UniversityID,UniversityName from T_UniversityMaster ";
|
||||||
$uf=$this->db->query($usql);
|
$uf=$this->db->query($usql);
|
||||||
$univf = $uf->result();
|
$univf = $uf->result();
|
||||||
|
//get fiscal
|
||||||
|
$ysql = "SELECT CASE WHEN MONTH(CreatedOn)>=6 THEN
|
||||||
|
concat(YEAR(CreatedOn), '-',YEAR(CreatedOn)+1)
|
||||||
|
ELSE concat(YEAR(CreatedOn)-1,'-', YEAR(CreatedOn)) END AS fy
|
||||||
|
FROM T_StudentDetails
|
||||||
|
GROUP BY fy ";
|
||||||
|
$yf=$this->db->query($ysql);
|
||||||
|
$univyf = $yf->result();
|
||||||
|
|
||||||
if (count($year) > 0) {
|
if (count($year) > 0) {
|
||||||
$results['yearList'] = true;
|
$results['yearList'] = true;
|
||||||
$results['year'] = $year;
|
$results['year'] = $year;
|
||||||
$results['branch'] = $branchf;
|
$results['branch'] = $branchf;
|
||||||
$results['univ'] = $univf;
|
$results['univ'] = $univf;
|
||||||
|
$results['fyr'] = $univyf;
|
||||||
} else {
|
} else {
|
||||||
$results['yearList'] = false;
|
$results['yearList'] = false;
|
||||||
$results['message'] = 'No record found';
|
$results['message'] = 'No record found';
|
||||||
|
|||||||
@ -106,17 +106,20 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
};
|
};
|
||||||
/*For dashboard tab*/
|
/*For dashboard tab*/
|
||||||
//To filters
|
//To filters
|
||||||
//Fees outstanding
|
|
||||||
$scope.filters = {
|
$scope.filters = {
|
||||||
"year": "",
|
"year": "",
|
||||||
"month": "",
|
"month": "",
|
||||||
"batch": "",
|
"batch": "",
|
||||||
"univ" : ""
|
"univ": "",
|
||||||
|
"fout_univ": "",
|
||||||
|
"fout_year": ""
|
||||||
}
|
}
|
||||||
|
//to store filter data
|
||||||
$scope.year = '';
|
$scope.year = '';
|
||||||
$scope.branch = '';
|
$scope.branch = '';
|
||||||
$scope.univ = '';
|
$scope.univ = '';
|
||||||
|
$scope.fyr = '';
|
||||||
var fYear = {
|
var fYear = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: apiPoint.url + 'filterYear/',
|
url: apiPoint.url + 'filterYear/',
|
||||||
@ -135,6 +138,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
$scope.year = response.data.year;
|
$scope.year = response.data.year;
|
||||||
$scope.branch = response.data.branch;
|
$scope.branch = response.data.branch;
|
||||||
$scope.univ = response.data.univ;
|
$scope.univ = response.data.univ;
|
||||||
|
$scope.fyr = response.data.fyr;
|
||||||
|
|
||||||
console.log($scope.branch);
|
console.log($scope.branch);
|
||||||
} else {
|
} else {
|
||||||
@ -167,6 +171,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
$scope.Dt_dataMonthClosed = '';
|
$scope.Dt_dataMonthClosed = '';
|
||||||
$scope.Dt_ftoday = '';
|
$scope.Dt_ftoday = '';
|
||||||
$scope.Dt_fpending = '';
|
$scope.Dt_fpending = '';
|
||||||
|
$scope.grid;
|
||||||
$scope.initDashboardDetails = function () {
|
$scope.initDashboardDetails = function () {
|
||||||
//lead today
|
//lead today
|
||||||
var leadToday = {
|
var leadToday = {
|
||||||
@ -460,10 +465,13 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
data: {
|
data: {
|
||||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType
|
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
|
||||||
|
year: $scope.filters.year,
|
||||||
|
month: $scope.filters.month
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$http(admissionMonth).then(function (response) {
|
$http(admissionMonth).then(function (response) {
|
||||||
if (response.data.lList == true) {
|
if (response.data.lList == true) {
|
||||||
$scope.adMonth = response.data.l_data;
|
$scope.adMonth = response.data.l_data;
|
||||||
@ -514,10 +522,13 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
}, {
|
}, {
|
||||||
dataField: "week4",
|
dataField: "week4",
|
||||||
dataType: "number"
|
dataType: "number"
|
||||||
|
}, {
|
||||||
|
dataField: "week5",
|
||||||
|
dataType: "number"
|
||||||
}, {
|
}, {
|
||||||
dataField: "total",
|
dataField: "total",
|
||||||
dataType: "number"
|
dataType: "number"
|
||||||
}, 'AdmissionTakenBy&Count']
|
}, 'AdmissionTakenBy']
|
||||||
};
|
};
|
||||||
|
|
||||||
//Admissions Year-wise
|
//Admissions Year-wise
|
||||||
@ -865,6 +876,8 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
univ: $scope.filters.univ
|
univ: $scope.filters.univ
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -932,17 +945,9 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
};
|
};
|
||||||
|
|
||||||
//function for batch filter
|
//function for batch filter
|
||||||
$scope.buttonOptions = {
|
|
||||||
text: "Test",
|
|
||||||
onClick: function(){
|
|
||||||
$scope.adBatchfilter = $scope.adBatchfilter;
|
|
||||||
|
|
||||||
$scope.pivot.getDataSource().reload();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
$scope.batchFilter = function () {
|
$scope.batchFilter = function () {
|
||||||
|
|
||||||
$scope.adBatchgrid1 = '';
|
$scope.adBatchgrid1 = '';
|
||||||
//Admissions batch
|
//Admissions batch
|
||||||
var AdmissionsBatch = {
|
var AdmissionsBatch = {
|
||||||
@ -952,6 +957,8 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
univ: $scope.filters.univ
|
univ: $scope.filters.univ
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -974,7 +981,9 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
|
|
||||||
$scope.adBatchgrid1 = {
|
$scope.adBatchgrid1 = {
|
||||||
|
|
||||||
|
onInitialized: function (e) {
|
||||||
|
$scope.grid = e.component;
|
||||||
|
},
|
||||||
allowSortingBySummary: true,
|
allowSortingBySummary: true,
|
||||||
allowSorting: true,
|
allowSorting: true,
|
||||||
allowFiltering: true,
|
allowFiltering: true,
|
||||||
@ -989,6 +998,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
fileName: "AdmissionsBatch"
|
fileName: "AdmissionsBatch"
|
||||||
},
|
},
|
||||||
|
|
||||||
dataSource: {
|
dataSource: {
|
||||||
|
|
||||||
fields: [{
|
fields: [{
|
||||||
@ -1007,23 +1017,329 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
|||||||
summaryType: "sum",
|
summaryType: "sum",
|
||||||
area: "data"
|
area: "data"
|
||||||
}],
|
}],
|
||||||
store: new DevExpress.data.CustomStore({
|
|
||||||
load: function(loadOptions) {
|
store: $scope.adBatchfilter
|
||||||
var d = $.Deferred();
|
|
||||||
setTimeout(function() {
|
|
||||||
d.resolve($scope.adBatchfilter);
|
|
||||||
}, 500);
|
|
||||||
return d.promise();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
$scope.batchFilterClick();
|
||||||
} else {
|
} else {
|
||||||
$scope.fbselect = false;
|
$scope.fbselect = false;
|
||||||
$scope.message = response.data.message;
|
$scope.message = response.data.message;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$scope.batchFilterClick = function () {
|
||||||
|
$scope.grid.option('dataSource', {
|
||||||
|
fields: [{
|
||||||
|
caption: "Batches",
|
||||||
|
width: 100,
|
||||||
|
dataField: "Batches",
|
||||||
|
area: "row"
|
||||||
|
}, {
|
||||||
|
caption: "staff",
|
||||||
|
dataField: "Staff",
|
||||||
|
dataType: "string",
|
||||||
|
width: 200,
|
||||||
|
area: "column"
|
||||||
|
}, {
|
||||||
|
caption: "TotalNoOfAdmissions",
|
||||||
|
dataField: "TotalNoOfAdmissions",
|
||||||
|
dataType: "number",
|
||||||
|
summaryType: "sum",
|
||||||
|
width: 100,
|
||||||
|
area: "data"
|
||||||
|
}],
|
||||||
|
store: $scope.adBatchfilter
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.foutFilter = function(){
|
||||||
|
$scope.fout = '';
|
||||||
|
var fOut = {
|
||||||
|
method: 'POST',
|
||||||
|
url: apiPoint.url + 'feeOutstanding/',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
univ: $scope.filters.fout_univ,
|
||||||
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
|
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
console.log($scope.filters.fout_univ);
|
||||||
|
console.log(JSON.parse(localStorage.getItem('localObj')).localBranchID);
|
||||||
|
|
||||||
|
$http(fOut).then(function (response) {
|
||||||
|
if (response.data.lList == true) {
|
||||||
|
$scope.fout = response.data.l_data;
|
||||||
|
for (var i = 0; i < $scope.fout.length; i++)
|
||||||
|
$scope.fout[i].Sl_No = i + 1;
|
||||||
|
$scope.fo = false;
|
||||||
|
console.log($scope.fout);
|
||||||
|
} else {
|
||||||
|
$scope.fo = true;
|
||||||
|
$scope.message = response.data.message;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//Data grid
|
||||||
|
$scope.showColumnLines = true;
|
||||||
|
$scope.showRowLines = true;
|
||||||
|
$scope.rowAlternationEnabled = true;
|
||||||
|
$scope.FeeOut = {
|
||||||
|
columnAutoWidth: true,
|
||||||
|
showBorders: true,
|
||||||
|
"export": {
|
||||||
|
enabled: true,
|
||||||
|
fileName: "FeesOutstanding",
|
||||||
|
allowExportSelectedData: true
|
||||||
|
},
|
||||||
|
paging: {
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
pager: {
|
||||||
|
showPageSizeSelector: true,
|
||||||
|
allowedPageSizes: [5, 10, 20],
|
||||||
|
showInfo: true
|
||||||
|
},
|
||||||
|
bindingOptions: {
|
||||||
|
showColumnLines: "showColumnLines",
|
||||||
|
showRowLines: "showRowLines",
|
||||||
|
rowAlternationEnabled: "rowAlternationEnabled",
|
||||||
|
dataSource: 'fout'
|
||||||
|
},
|
||||||
|
columns: [{
|
||||||
|
dataField: "Sl_No",
|
||||||
|
dataType: "number",
|
||||||
|
//width:50
|
||||||
|
}, {
|
||||||
|
dataField: "Batches",
|
||||||
|
dataType: "number",
|
||||||
|
// width:100
|
||||||
|
}, {
|
||||||
|
dataField: "TotalPayableFee",
|
||||||
|
dataType: "number",
|
||||||
|
// width:80
|
||||||
|
}, {
|
||||||
|
dataField: "TotalPaidFee",
|
||||||
|
dataType: "number",
|
||||||
|
// width:80
|
||||||
|
}, {
|
||||||
|
dataField: "TotalBalance",
|
||||||
|
dataType: "number",
|
||||||
|
// width:80
|
||||||
|
}, {
|
||||||
|
dataField: "BalancePercentage",
|
||||||
|
dataType: "number",
|
||||||
|
// width:80
|
||||||
|
}, {
|
||||||
|
dataField: "BalancePercentageByStaff",
|
||||||
|
cssClass: 'WrappedColumnClass',
|
||||||
|
width: 300
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$scope.fyearFilter = function(){
|
||||||
|
var admissionYear = {
|
||||||
|
method: 'POST',
|
||||||
|
url: apiPoint.url + 'admissionYear/',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
|
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
|
||||||
|
fyear: $scope.filters.fout_year
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
console.log($scope.filters.fout_year);
|
||||||
|
console.log(JSON.parse(localStorage.getItem('localObj')).localBranchID);
|
||||||
|
$http(admissionYear).then(function (response) {
|
||||||
|
if (response.data.lList == true) {
|
||||||
|
$scope.adYear = response.data.l_data;
|
||||||
|
for (var i = 0; i < $scope.adYear.length; i++)
|
||||||
|
$scope.adYear[i].Sl_No = i + 1;
|
||||||
|
$scope.ady = false;
|
||||||
|
//console.log($scope.adYear);
|
||||||
|
} else {
|
||||||
|
$scope.ady = true;
|
||||||
|
$scope.message = response.data.message;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Data grid
|
||||||
|
$scope.filterRow = {
|
||||||
|
visible: true,
|
||||||
|
applyFilter: "auto"
|
||||||
|
};
|
||||||
|
$scope.showColumnLines = true;
|
||||||
|
$scope.showRowLines = true;
|
||||||
|
$scope.rowAlternationEnabled = true;
|
||||||
|
$scope.adYeargrid = {
|
||||||
|
showBorders: true,
|
||||||
|
columnAutoWidth: true,
|
||||||
|
//columnWidth: 100,
|
||||||
|
|
||||||
|
"export": {
|
||||||
|
enabled: true,
|
||||||
|
fileName: "AdmissionsYear",
|
||||||
|
allowExportSelectedData: true
|
||||||
|
},
|
||||||
|
paging: {
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
pager: {
|
||||||
|
showPageSizeSelector: true,
|
||||||
|
allowedPageSizes: [5, 10, 20],
|
||||||
|
showInfo: true
|
||||||
|
},
|
||||||
|
bindingOptions: {
|
||||||
|
//filterRow: "filterRow",
|
||||||
|
showColumnLines: "showColumnLines",
|
||||||
|
showRowLines: "showRowLines",
|
||||||
|
rowAlternationEnabled: "rowAlternationEnabled",
|
||||||
|
dataSource: 'adYear'
|
||||||
|
},
|
||||||
|
columns: [{ dataField: 'Sl_No', width: 50 }, { dataField: 'university', width: 200 }, {
|
||||||
|
dataField: "June",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "July",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "August",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "September",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "October",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "November",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "December",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "January",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "February",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "March",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "April",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "May",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, {
|
||||||
|
dataField: "total",
|
||||||
|
dataType: "number",
|
||||||
|
width: 60
|
||||||
|
}, { dataField: 'AdmissionTakenBy', cssClass: 'WrappedColumnClass', width: 300 }]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
$scope.fbwFilter = function(){
|
||||||
|
var admissionMonth = {
|
||||||
|
method: 'POST',
|
||||||
|
url: apiPoint.url + 'admissionMonth/',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
|
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||||
|
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
|
||||||
|
year: $scope.filters.year,
|
||||||
|
month: $scope.filters.month
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
console.log($scope.filters.year);
|
||||||
|
console.log($scope.filters.month);
|
||||||
|
$http(admissionMonth).then(function (response) {
|
||||||
|
if (response.data.lList == true) {
|
||||||
|
$scope.adMonth = response.data.l_data;
|
||||||
|
for (var i = 0; i < $scope.adMonth.length; i++)
|
||||||
|
$scope.adMonth[i].Sl_No = i + 1;
|
||||||
|
$scope.ad = false;
|
||||||
|
// console.log($scope.adMonth);
|
||||||
|
} else {
|
||||||
|
$scope.ad = true;
|
||||||
|
$scope.message = response.data.message;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//Data grid
|
||||||
|
$scope.showColumnLines = true;
|
||||||
|
$scope.showRowLines = true;
|
||||||
|
$scope.rowAlternationEnabled = true;
|
||||||
|
$scope.admgrid = {
|
||||||
|
columnAutoWidth: true,
|
||||||
|
showBorders: true,
|
||||||
|
"export": {
|
||||||
|
enabled: true,
|
||||||
|
fileName: "AdmissionsMonth",
|
||||||
|
allowExportSelectedData: true
|
||||||
|
},
|
||||||
|
paging: {
|
||||||
|
pageSize: 10
|
||||||
|
},
|
||||||
|
pager: {
|
||||||
|
showPageSizeSelector: true,
|
||||||
|
allowedPageSizes: [5, 10, 20],
|
||||||
|
showInfo: true
|
||||||
|
},
|
||||||
|
bindingOptions: {
|
||||||
|
showColumnLines: "showColumnLines",
|
||||||
|
showRowLines: "showRowLines",
|
||||||
|
rowAlternationEnabled: "rowAlternationEnabled",
|
||||||
|
dataSource: 'adMonth'
|
||||||
|
},
|
||||||
|
columns: ['Sl_No', 'university', {
|
||||||
|
dataField: "week1",
|
||||||
|
dataType: "number"
|
||||||
|
}, {
|
||||||
|
dataField: "week2",
|
||||||
|
dataType: "number"
|
||||||
|
}, {
|
||||||
|
dataField: "week3",
|
||||||
|
dataType: "number"
|
||||||
|
}, {
|
||||||
|
dataField: "week4",
|
||||||
|
dataType: "number"
|
||||||
|
}, {
|
||||||
|
dataField: "week5",
|
||||||
|
dataType: "number"
|
||||||
|
}, {
|
||||||
|
dataField: "total",
|
||||||
|
dataType: "number"
|
||||||
|
}, 'AdmissionTakenBy']
|
||||||
|
};
|
||||||
|
}
|
||||||
/*end dashboard tab*/
|
/*end dashboard tab*/
|
||||||
/*For dashboard tiles*/
|
/*For dashboard tiles*/
|
||||||
$scope.lead_dataToday = 0;
|
$scope.lead_dataToday = 0;
|
||||||
|
|||||||
@ -34,11 +34,7 @@
|
|||||||
<h5 class="text-dark">No Leads!</h5>
|
<h5 class="text-dark">No Leads!</h5>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="cl-effect-13" style="float: right" ng-if="lt==false">
|
|
||||||
<a ui-sref="app.call.tracking">
|
|
||||||
view more
|
|
||||||
</a>
|
|
||||||
</div><br> -->
|
|
||||||
<div dx-data-grid="todayLead" ng-if="lt==false"></div>
|
<div dx-data-grid="todayLead" ng-if="lt==false"></div>
|
||||||
|
|
||||||
<!-- <table class="table table-hover no-margin" ng-if="lt==false">
|
<!-- <table class="table table-hover no-margin" ng-if="lt==false">
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<tab heading="Admissions-Month : {{adMonth.length}}" class="padding-top-5 padding-left-5">
|
<tab heading="Admissions-Month : {{adMonth.length}}" class="padding-top-5 padding-left-5">
|
||||||
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
||||||
suppress-scroll-x="true">
|
suppress-scroll-x="true">
|
||||||
<!-- <div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>
|
<label>
|
||||||
Year
|
Year
|
||||||
@ -76,13 +76,13 @@
|
|||||||
<div class="col-md-2" style="padding-top: 2.3%;">
|
<div class="col-md-2" style="padding-top: 2.3%;">
|
||||||
<div >
|
<div >
|
||||||
|
|
||||||
<button type="submit" class="btn btn-success btn-o" ng-click = "getFilteredData()" tabindex="8">
|
<button type="submit" class="btn btn-success btn-o" ng-click = "fbwFilter()" tabindex="8">
|
||||||
Submit
|
Submit
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
<div ng-if="ad==true">
|
<div ng-if="ad==true">
|
||||||
<center>
|
<center>
|
||||||
<h5 class="text-dark">No Admissions!</h5>
|
<h5 class="text-dark">No Admissions!</h5>
|
||||||
@ -94,36 +94,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div dx-data-grid="admgrid" ng-if="ad==false"></div>
|
<div dx-data-grid="admgrid" ng-if="ad==false"></div>
|
||||||
<!-- <table class="table table-hover no-margin" ng-if="ad==false">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<th> University</th>
|
|
||||||
<th>1st Week</th>
|
|
||||||
<th>2nd Week </th>
|
|
||||||
<th>3rd Week</th>
|
|
||||||
<th>4th Week</th>
|
|
||||||
<th>Total </th>
|
|
||||||
<th>Admissions Taken By & Count</th>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr ng-repeat="today in adMonth">
|
|
||||||
<td>{{today.university}}</td>
|
|
||||||
<td>{{today.w1}}</td>
|
|
||||||
<td>{{today.w2}}</td>
|
|
||||||
<td>{{today.w3}}</td>
|
|
||||||
<td>{{today.w4}}</td>
|
|
||||||
<td>{{today.total}}</td>
|
|
||||||
<td>{{today.gad}}</td>
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table> -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</tab>
|
</tab>
|
||||||
@ -133,7 +104,7 @@
|
|||||||
|
|
||||||
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
||||||
suppress-scroll-x="true">
|
suppress-scroll-x="true">
|
||||||
<!-- <div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>
|
<label>
|
||||||
University
|
University
|
||||||
@ -158,15 +129,15 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><br> -->
|
</div><br>
|
||||||
<div ng-if="adb==true">
|
<div ng-if="adb==true">
|
||||||
<center>
|
<center>
|
||||||
<h5 class="text-dark">No Admissions!</h5>
|
<h5 class="text-dark">No Admissions!</h5>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div id="dxPivotGrid" dx-pivot-grid="adBatchgrid" ng-if="adb==false"></div> -->
|
||||||
<div dx-pivot-grid="adBatchgrid" ng-if="adb==false && fbselect==false"></div>
|
<div id="dxPivotGrid" dx-pivot-grid="adBatchgrid" ng-if="adb==false && fbselect==false"></div>
|
||||||
<div style="width:600px;display:block;overflow: auto" dx-pivot-grid="adBatchgrid1" ng-if="fbselect==true"></div>
|
<div dx-pivot-grid="adBatchgrid1" ng-if="fbselect==true"></div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -177,6 +148,34 @@
|
|||||||
<tab heading="Admissions-Yearly : {{adYear.length}}" class="padding-top-5">
|
<tab heading="Admissions-Yearly : {{adYear.length}}" class="padding-top-5">
|
||||||
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
||||||
suppress-scroll-x="true">
|
suppress-scroll-x="true">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label>
|
||||||
|
Year
|
||||||
|
</label><br>
|
||||||
|
|
||||||
|
<select style="width: 250px;" ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="univ" ng-model="filters.fout_year" required>
|
||||||
|
<option value="" selected>Select Year</option>
|
||||||
|
|
||||||
|
<option ng-repeat="b in fyr" value="{{b.fy}}">{{b.fy}}</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-2" style="padding-top: 2.3%;">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-success btn-o" ng-click = "fyearFilter()" tabindex="8">
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><br>
|
||||||
|
|
||||||
|
|
||||||
<div ng-if="ady==true">
|
<div ng-if="ady==true">
|
||||||
<center>
|
<center>
|
||||||
<h5 class="text-dark">No Admissions!</h5>
|
<h5 class="text-dark">No Admissions!</h5>
|
||||||
@ -197,6 +196,32 @@
|
|||||||
<tab heading="Fees Outstanding : {{fout.length}}" class="padding-top-5">
|
<tab heading="Fees Outstanding : {{fout.length}}" class="padding-top-5">
|
||||||
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
<div ng-if="getLoginType=='R004' || getLoginType=='R003'" class="panel-scroll height-500" perfect-scrollbar wheel-propagation="false"
|
||||||
suppress-scroll-x="true">
|
suppress-scroll-x="true">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label>
|
||||||
|
University
|
||||||
|
</label><br>
|
||||||
|
|
||||||
|
<select style="width: 250px;" ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="univ" ng-model="filters.fout_univ" required>
|
||||||
|
<option value="" selected>Select University</option>
|
||||||
|
|
||||||
|
<option ng-repeat="b in univ" value="{{b.UniversityID}}">{{b.UniversityName}}</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-2" style="padding-top: 2.3%;">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-success btn-o" ng-click = "foutFilter()" tabindex="8">
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><br>
|
||||||
<div ng-if="fo==true">
|
<div ng-if="fo==true">
|
||||||
<center>
|
<center>
|
||||||
<h5 class="text-dark">No Outstanding Fee!</h5>
|
<h5 class="text-dark">No Outstanding Fee!</h5>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user