0001620: Admission
This commit is contained in:
parent
c4b8a3bc29
commit
c2c41ba1a2
@ -76,13 +76,13 @@ $query_builder = TRUE;
|
||||
$db['default'] = array(
|
||||
'dsn' => '',
|
||||
'hostname' => 'apollodec.com',
|
||||
'username' => 'apollod4_DEV',
|
||||
'password' => 'apollo1234',
|
||||
'database' => 'apollod4_ApolloDECDev',
|
||||
// 'username' => 'apollod4_DEV',
|
||||
// 'password' => 'apollo1234',
|
||||
// 'database' => 'apollod4_ApolloDECDev',
|
||||
|
||||
// 'username' => 'apollod4_SIT',
|
||||
// 'password' => 'apollosit1234',
|
||||
// 'database' => 'apollod4_ApolloDECNEWSIT',
|
||||
'username' => 'apollod4_SIT',
|
||||
'password' => 'apollosit1234',
|
||||
'database' => 'apollod4_ApolloDECNEWSIT',
|
||||
|
||||
// 'username' => 'apollod4_PROD',
|
||||
// 'password' => 'approd!2017',
|
||||
|
||||
@ -454,6 +454,9 @@ class Dashboard_Controller extends REST_Controller {
|
||||
public function admissionBatch_post(){
|
||||
$branchId = $this->post('branchId');
|
||||
$univ = $this->post('univ');
|
||||
// print_r($univ);
|
||||
// print_r($branchId);
|
||||
|
||||
$admissionBatch = $this->dashboard_model->admissionBatch($univ,$branchId);
|
||||
if ($admissionBatch) {
|
||||
$admissionBatch['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -893,21 +893,26 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
||||
public function admissionBatch($univ = null, $branchId = null){
|
||||
|
||||
|
||||
$sql="SELECT BatchName, BatchDate,University,AdmittedBy,count(*)as count FROM admissions
|
||||
WHERE CASE WHEN MONTH(curdate()) >= 6 THEN CreatedYear = YEAR(curdate())
|
||||
ELSE (CreatedYear = YEAR(curdate()) - 1 AND CreatedMonth >= 6) OR CreatedYear = YEAR(curdate()) END
|
||||
// $sql="SELECT BatchName, BatchDate,University,AdmittedBy,count(*)as count FROM admissions
|
||||
// WHERE CASE WHEN MONTH(curdate()) >= 6 THEN CreatedYear = YEAR(curdate())
|
||||
// ELSE (CreatedYear = YEAR(curdate()) - 1 AND CreatedMonth >= 6) OR CreatedYear = YEAR(curdate()) END
|
||||
// and BranchCode ='".$branchId."' and UniversityID ='".$univ."'";
|
||||
|
||||
$sql="SELECT BatchName, BatchDate,University,AdmittedBy,1 as count FROM admissions where CASE WHEN MONTH(curdate())>=6 THEN CreatedYear =
|
||||
concat(YEAR(curdate()), '-',right(YEAR(curdate())+1,2))
|
||||
ELSE CreatedYear = concat(YEAR(curdate())-1,'-' ,right(YEAR(curdate()),2)) END
|
||||
and BranchCode ='".$branchId."' and UniversityID ='".$univ."'";
|
||||
|
||||
// if($univ != ''){
|
||||
// $sql.= " and UniversityID ='".$univ."'";
|
||||
// }
|
||||
|
||||
$sql.= " GROUP BY BatchName,AdmittedBy";
|
||||
//$sql.= " GROUP BY BatchName";
|
||||
|
||||
|
||||
$sql.= " ORDER BY BatchDate DESC";
|
||||
//$sql.= " ORDER BY BatchDate DESC";
|
||||
|
||||
// print_r($sql); //die();
|
||||
|
||||
|
||||
|
||||
$ltd=$this->db->query($sql);
|
||||
@ -919,7 +924,7 @@ and BranchCode ='".$branchId."' and UniversityID ='".$univ."'";
|
||||
$results['lList'] = false;
|
||||
$results['message'] = 'No record found';
|
||||
}
|
||||
|
||||
//print_r($sql); die();
|
||||
return $results;
|
||||
}
|
||||
//To Filters
|
||||
|
||||
@ -2188,6 +2188,7 @@ $REGID='';
|
||||
$result['deleteStatus']=false;
|
||||
$result['message']="Something went wrong.please try again";
|
||||
}
|
||||
print_r($this->db->last_query());die();
|
||||
return $result;
|
||||
|
||||
|
||||
|
||||
@ -60,6 +60,8 @@ group by sid,sem) as apdate on apdate.sid=sms.sid and apdate.sem=sms.sem
|
||||
|
||||
$leadDet=$this->db->query($sql);
|
||||
$statusDetails = $leadDet->result();
|
||||
//print_r($this->db->last_query());die();
|
||||
|
||||
if (count($statusDetails) > 0) {
|
||||
$results['statusList'] = true;
|
||||
$results['statusr'] = $statusDetails;
|
||||
@ -612,8 +614,9 @@ where STU.IsActive = '1' and APFS.ID in (select max(ID) from T_ApplicationFormS
|
||||
|
||||
}
|
||||
|
||||
$sql.="and STU_COUR.IsActive='1'";
|
||||
$sql.="and STU.BranchCode='".$br."'";
|
||||
$sql.=" and STU_COUR.IsActive='1'";
|
||||
$sql.=" and STU.BranchCode='".$br."'";
|
||||
$sql.=" and sfs.FeesID IS not null";
|
||||
$sql.=" group by regid,Student_id,RD.CourseID,Sem_Year ";
|
||||
$sql.=" ORDER BY StatusUpdationOn,InitialPayDate ASC ";
|
||||
|
||||
|
||||
@ -897,82 +897,85 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
||||
columns: ['TrackingId', 'name', 'mobileNo', 'course', 'university', 'activity', 'AssignTo', 'FollowUpDate', 'status']
|
||||
};
|
||||
//Admissions batch
|
||||
var AdmissionsBatch = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'admissionBatch/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
univ: $scope.filters.univ
|
||||
// var AdmissionsBatch = {
|
||||
// method: 'POST',
|
||||
// url: apiPoint.url + 'admissionBatch/',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// data: {
|
||||
// requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
// branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
|
||||
// univ: $scope.filters.univ
|
||||
|
||||
}
|
||||
};
|
||||
// }
|
||||
// };
|
||||
//var gridData = 0;
|
||||
$http(AdmissionsBatch).then(function (response) {
|
||||
if (response.data.lList == true) {
|
||||
$scope.fbselect = false;
|
||||
$scope.adBatch = response.data.l_data;
|
||||
for (var i = 0; i < $scope.adBatch.length; i++)
|
||||
$scope.adBatch[i].Sl_No = i + 1;
|
||||
// var gridData = $scope.adBatch;
|
||||
$scope.adb = false;
|
||||
//console.log($scope.adBatch);
|
||||
$scope.adBatchgrid = {
|
||||
// $http(AdmissionsBatch).then(function (response) {
|
||||
// console.log(response);
|
||||
// if (response.data.lList == true) {
|
||||
// $scope.fbselect = false;
|
||||
// $scope.adBatch = response.data.l_data;
|
||||
// for (var i = 0; i < $scope.adBatch.length; i++)
|
||||
// $scope.adBatch[i].Sl_No = i + 1;
|
||||
// // var gridData = $scope.adBatch;
|
||||
// $scope.adb = false;
|
||||
// //console.log($scope.adBatch);
|
||||
// $scope.adBatchgrid = {
|
||||
|
||||
allowSortingBySummary: true,
|
||||
allowSorting: true,
|
||||
allowFiltering: true,
|
||||
height: 440,
|
||||
showBorders: true,
|
||||
fieldChooser: {
|
||||
enabled: false
|
||||
},
|
||||
// scrolling: {
|
||||
// mode: "virtual"
|
||||
// allowSortingBySummary: true,
|
||||
// allowSorting: true,
|
||||
// allowFiltering: true,
|
||||
// height: 440,
|
||||
// showBorders: true,
|
||||
// fieldChooser: {
|
||||
// enabled: false
|
||||
// },
|
||||
"export": {
|
||||
enabled: true,
|
||||
fileName: "AdmissionsBatch"
|
||||
// // scrolling: {
|
||||
// // mode: "virtual"
|
||||
// // },
|
||||
// "export": {
|
||||
// enabled: true,
|
||||
// fileName: "AdmissionsBatch"
|
||||
|
||||
},
|
||||
dataSource: {
|
||||
fields: [{
|
||||
caption: "BatchName",
|
||||
width: 100,
|
||||
dataField: "BatchName",
|
||||
area: "row"
|
||||
},
|
||||
{
|
||||
caption: "AdmittedBy",
|
||||
dataField: "AdmittedBy",
|
||||
area: "column"
|
||||
}, {
|
||||
caption: "count",
|
||||
dataField: "count",
|
||||
dataType: "number",
|
||||
//summaryType: "sum",
|
||||
width: 100,
|
||||
area: "data"
|
||||
}],
|
||||
store: $scope.adBatch
|
||||
}
|
||||
};
|
||||
} else {
|
||||
$scope.adb = true;
|
||||
$scope.message = response.data.message;
|
||||
}
|
||||
});
|
||||
// },
|
||||
// dataSource: {
|
||||
// fields: [{
|
||||
// caption: "BatchName",
|
||||
// width: 100,
|
||||
// dataField: "BatchName",
|
||||
// area: "row"
|
||||
// },
|
||||
// {
|
||||
// caption: "AdmittedBy",
|
||||
// dataField: "AdmittedBy",
|
||||
// area: "column"
|
||||
// }, {
|
||||
// caption: "count",
|
||||
// dataField: "count",
|
||||
// dataType: "number",
|
||||
// //summaryType: "sum",
|
||||
// width: 100,
|
||||
// area: "data"
|
||||
// }],
|
||||
// store: $scope.adBatch
|
||||
// }
|
||||
// };
|
||||
// } else {
|
||||
// $scope.adb = true;
|
||||
// $scope.message = response.data.message;
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
//function for batch filter
|
||||
|
||||
$scope.batchFilter = function () {
|
||||
|
||||
console.log('hi');
|
||||
|
||||
$scope.adBatchgrid1 = '';
|
||||
//Admissions batch
|
||||
@ -989,8 +992,10 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
//var gridData = 0;
|
||||
$http(AdmissionsBatch).then(function (response) {
|
||||
|
||||
if (response.data.lList == true) {
|
||||
$scope.adBatch = '';
|
||||
|
||||
@ -1003,7 +1008,8 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
||||
// var gridData = $scope.adBatch;
|
||||
|
||||
$scope.adb = false;
|
||||
// console.log($scope.adBatchfilter);
|
||||
|
||||
|
||||
|
||||
$scope.adBatchgrid1 = {
|
||||
|
||||
@ -1050,15 +1056,17 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
||||
|
||||
|
||||
};
|
||||
$scope.batchFilterClick();
|
||||
// $scope.batchFilterClick();
|
||||
|
||||
} else {
|
||||
$scope.fbselect = false;
|
||||
$scope.message = response.data.message;
|
||||
}
|
||||
});
|
||||
}
|
||||
$scope.batchFilterClick = function () {
|
||||
$scope.grid.option('dataSource', {
|
||||
$scope.batchFilterClick = function ()
|
||||
{
|
||||
$scope.grid.option('dataSource', {
|
||||
fields: [{
|
||||
caption: "BatchName",
|
||||
width: 100,
|
||||
@ -1078,10 +1086,10 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
|
||||
// width: 100,
|
||||
area: "data"
|
||||
}],
|
||||
store: $scope.adBatchfilter
|
||||
// store: $scope.adBatchfilter
|
||||
});
|
||||
}
|
||||
|
||||
////
|
||||
$scope.foutFilter = function(){
|
||||
$scope.fout = '';
|
||||
var fOut = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user