Report-Dropdown batch_code fixes

This commit is contained in:
gandhimathi 2018-05-29 17:16:36 +05:30
parent 2f6f169c52
commit 5d5f1f84ca
14 changed files with 188 additions and 54 deletions

View File

@ -64,12 +64,12 @@ left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,Enrollmen
} }
public function filters($br){ public function filters($br){
$sql = "SELECT distinct BatchCode as batchcode,BatchName as batch FROM T_BatchMaster $sql = "SELECT distinct BatchCode as batchcode,BatchName as batch,BatchDate FROM T_BatchMaster
where BranchCode = '".$br."'"; where BranchCode = '".$br."'";
$b=$this->db->query($sql); $b=$this->db->query($sql);
$batch = $b->result(); $batch = $b->result();
if (count($batch) > 0) { if (count($batch) > 0) {
$results['batchlist'] = true; $results['batchlist'] = true;
$results['batch'] = $batch; $results['batch'] = $batch;
} else { } else {
$results['batchlist'] = false; $results['batchlist'] = false;

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_ans_bookletCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_ans_bookletCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -29,9 +29,21 @@ app.controller('report_ans_bookletCtrl', ["$scope", "API_POINTS", "$http", "Swee
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_app_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_app_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -29,9 +29,21 @@ app.controller('report_app_pendingCtrl', ["$scope", "API_POINTS", "$http", "Swee
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_balfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_balfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// to generate serial number // to generate serial number
$scope.currentPage=1; $scope.currentPage=1;
@ -37,9 +37,21 @@ app.controller('report_balfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAler
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -28,9 +28,21 @@ app.controller('report_certificateCtrl', ["$scope", "API_POINTS", "$http", "Swee
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_doc_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_doc_pendingCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -29,9 +29,21 @@ app.controller('report_doc_pendingCtrl', ["$scope", "API_POINTS", "$http", "Swee
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_examfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_examfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -29,9 +29,21 @@ app.controller('report_examfeeCtrl', ["$scope", "API_POINTS", "$http", "SweetAle
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -28,9 +28,21 @@ app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAle
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_markcard_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_markcard_certificateCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -30,9 +30,21 @@ app.controller('report_markcard_certificateCtrl', ["$scope", "API_POINTS", "$htt
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_markcard_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_markcard_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -28,10 +28,23 @@ app.controller('report_markcard_statusCtrl', ["$scope", "API_POINTS", "$http", "
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//console.log($scope.branch); //Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
console.log(response.data.batch);
console.log($scope.batch);
} else { } else {
} }
}); });

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_study_material_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_study_material_statusCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope,apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, DTOptionsBuilder, DTColumnBuilder) { function ($scope,apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -28,10 +28,23 @@ app.controller('report_study_material_statusCtrl', ["$scope", "API_POINTS", "$ht
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//console.log($scope.branch); //Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
// console.log(response.data.batch);
// console.log($scope.batch);
} else { } else {
} }
}); });

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
/*** controller***/ /*** controller***/
app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window', app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', '$window',"dateListDescService",
function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window) { function ($scope, apiPoint, $http, SweetAlert, $state, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options // DataTables configurable options
@ -29,9 +29,21 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S
}; };
$http(filterlist).then(function (response) { $http(filterlist).then(function (response) {
if (response.data) { if (response.data) {
$scope.batch = response.data.batch; $scope.batch=[];
$scope.branch = response.data.branch; $scope.batchlist = response.data.batch;
$scope.university = response.data.university; $scope.university = response.data.university;
//Desc order Batchlist
angular.forEach($scope.batchlist,function (values,key) {
var parts = values.BatchDate.split("-");
$scope.batch.push({
"batchcode":values.batchcode,
"batch":values.batch + '('+ values.batchcode + ')',
"BatchDate":values.BatchDate,
"givenDateObject":new Date(parts[2], parts[1] - 1, parts[0])
})
});
// call service for make a list in desc order based on date
$scope.batch=dateListDescService.getOrderByList($scope.batch);
//console.log($scope.branch); //console.log($scope.branch);
} else { } else {
} }