1603,0001617,0001602 and 1610

This commit is contained in:
sriramv 2019-01-24 17:34:48 +05:30
parent 5d22a7454a
commit 36ee15ed37
13 changed files with 247 additions and 40 deletions

View File

@ -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',

View File

@ -353,6 +353,7 @@ $route['getCenterDetails'] = 'Center_Controller/getCenterDetails';
//subject
$route['getSubjectDetails'] = 'Subject_Controller/getSubjectDetails';
$route['getSubjectDetails1'] = 'Subject_Controller/getSubjectDetails1';
$route['updateSubjectDetails'] = 'Subject_Controller/updateSubjectDetails';
$route['addSubjectDetails'] = 'Subject_Controller/addSubjectDetails';

View File

@ -475,7 +475,10 @@ class Dashboard_Controller extends REST_Controller {
//To filters
public function filterYear_post(){
$branch = $this->post('branchId');
$filterYear = $this->dashboard_model->getYear($branch);
$univ =$this->post('univ');
//print_r($univ);
$filterYear = $this->dashboard_model->getYear($branch,$univ);
if ($filterYear) {
$filterYear['status'] = REST_Controller::HTTP_OK;
// Set the response and exit

View File

@ -18,7 +18,7 @@ class Subject_Controller extends REST_Controller {
$this->methods['addSubjectDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
$this->methods['getSubjectDetails_post']['limit'] = 500; // 50 requests per hour per user/key
$this->methods['updateSubjectDetails_post']['limit'] = 500;// 500 requests per hour per user/key
$this->methods['getSubjectDetails1_post']['limit'] =500;
// load the model
$this->load->model('Subject_model', 'subject_model');
@ -128,6 +128,32 @@ class Subject_Controller extends REST_Controller {
}
}
public function getSubjectDetails1_post()
{
$requestedBy = $this->post('requestedBy');
$branchCode = $this->post('branchCode');
$getSubject = $this->subject_model->getSubject1($requestedBy,$branchCode);
if ($getSubject)
{
$getSubject['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getSubject, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}

View File

@ -933,18 +933,25 @@ and BranchCode ='".$branchId."' and UniversityID ='".$univ."'";
return $results;
}
//To Filters
public function getYear($branch = null){
public function getYear($branch = null,$univ = null){
$sql = "select year(CreatedOn) as year from T_StudentDetails where year(CreatedOn) != 0 group by year ";
$ltd=$this->db->query($sql);
$year = $ltd->result();
//get batch
$brsql = "select BatchCode,BatchName from T_BatchMaster ";
$brf=$this->db->query($brsql);
$branchf = $brf->result();
//get university
$usql = "select UniversityID,UniversityName from T_UniversityMaster group by UniversityID ";
$usql = "select UniversityID,UniversityName from T_UniversityMaster where BranchCode ='".$branch."' ";
$uf=$this->db->query($usql);
$univf = $uf->result();
//get batch
$brsql = "select BatchCode,BatchName from T_BatchMaster
where BranchCode ='".$branch."' and UniversityID ='".$univ."'";
$brf=$this->db->query($brsql);
$branchf = $brf->result();
//get fiscal
$ysql = "SELECT CASE WHEN MONTH(CreatedOn)>=6 THEN
concat(YEAR(CreatedOn), '-',YEAR(CreatedOn)+1)

View File

@ -1197,7 +1197,7 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y'));
$fromd= date("Y-m-d",strtotime($start_date));
$tod=date("Y-m-d",strtotime($end_date));
//echo $det['branchId'];die() ;
//echo $det['branchId'];die() ; sum(a.BillAmount) AS Total,
$this->db->select('d.UniversityID,UniversityName,
sum(IF(ModeOfPayment ="CASH", BillAmount, 0)) AS Cash,
@ -1206,7 +1206,7 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y'));
sum(IF(ModeOfPayment ="ONLINE TRANSACTION", BillAmount, 0)) AS Onlinec,
sum(IF(ModeOfPayment ="WAIVER",BillAmount, 0)) AS WAIVER,
sum(IF(ModeOfPayment ="Credit/Debit Card",BillAmount, 0)) AS Card,
sum(a.BillAmount) AS Total,a.CreatedOn');
a.CreatedOn');
$this->db->from('T_Students_Fees_PaidDetails a');
$this->db->join('T_Students_Fees_Status b','b.FeesId = a.FeesID','left');
$this->db->join('T_CourseMaster c','c.CourseID = b.CourseID','left');
@ -1251,7 +1251,7 @@ if($feeDetails)
}
// print_r( $this->db->last_query());
// print_r( $this->db->last_query());
// die();

View File

@ -84,11 +84,13 @@ public function updateSubject($arrayDetails=null,$SubjectID=null)
public function getSubject($requestedBy=null,$branchCode=null)
{
$this->db->select('*');
$this->db->where('Isactive','1');
$this->db->where('BranchCode',$branchCode);
$this->db->order_by('SubjectID','DESC');
$subjectDetails = $this->db->get(SUBJECTMASTER);
// print_r($this->db->last_query());die();
if($subjectDetails->result()){
$result['SubjectStatus'] = true;
@ -99,6 +101,31 @@ public function updateSubject($arrayDetails=null,$SubjectID=null)
$result['message'] = "No records found!";
}
return $result;
}
public function getSubject1($requestedBy=null,$branchCode=null)
{
$this->db->select('*');
$this->db->where('BranchCode',$branchCode);
//$this->db->where('Isactive' !='0');
$this->db->order_by('SubjectID','DESC');
$subjectDetails = $this->db->get(SUBJECTMASTER);
if($subjectDetails->result()){
$result['SubjectStatus'] = true;
$result['details'] = $subjectDetails->result();
}
else {
$result['SubjectStatus'] = false;
$result['message'] = "No records found!";
}
return $result;
}

View File

@ -202,6 +202,8 @@ $scope.tod = to_dt;
$scope.isLoaderShow=false;
$scope.isLoaderShow1 =false;
$scope.Totalfee =0;
// $scope.cash=0;
// $scope.C
console.log($scope.newreglist);
@ -209,9 +211,11 @@ $scope.tod = to_dt;
angular.forEach(($scope.newreglist),function(newreglist,key)
{
console.log(newreglist)
//console.log(newreglist)
$scope.Totalfee= parseFloat($scope.Totalfee)+parseFloat(newreglist.Total);
$scope.Totalfee= parseFloat($scope.Totalfee)+ parseFloat(newreglist.Cash)+parseFloat(newreglist.Cheque)+parseFloat(newreglist.Onlinec)+parseFloat(newreglist.Card);
//console.log( $scope.Totalfee);
});
}

View File

@ -104,22 +104,42 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
});
};
//this function used to filter the university
var univb ;
$scope.get_uni = function()
{
//console.log($scope.filters.univ);
univb = $scope.filters.univ;
console.log(univb)
}
/*For dashboard tab*/
//To filters
$scope.filters = {
"year": "",
"month": "",
"batch": "",
"univ": "",
"fout_univ": "",
"fout_year": ""
"fout_year": "",
//"univb": "" ,
}
//to store filter data
$scope.year = '';
$scope.branch = '';
$scope.univ = '';
$scope.fyr = '';
$scope.batch ='';
// $scope.univb='',
var fYear = {
method: 'POST',
url: apiPoint.url + 'filterYear/',
@ -129,7 +149,8 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType
requestedDept: JSON.parse(localStorage.getItem('localObj')).localType,
batch: JSON.parse(localStorage.getItem('localObj')).localBatch,
}
};
@ -139,6 +160,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
$scope.branch = response.data.branch;
$scope.univ = response.data.univ;
$scope.fyr = response.data.fyr;
$scope.batch =response.data.batch;
// console.log($scope.branch);
} else {
@ -471,6 +493,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
}
};
$http(admissionMonth).then(function (response) {
if (response.data.lList == true) {
@ -906,6 +929,7 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
batch:$scope.filters.batch,
univ: $scope.filters.univ
}
@ -934,6 +958,14 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
// scrolling: {
// mode: "virtual"
// },
fieldPanel: {
showColumnFields: true,
showDataFields: true,
showFilterFields: true,
showRowFields: true,
allowFieldDragging: true,
visible: true
},
"export": {
enabled: true,
fileName: "AdmissionsBatch"
@ -1025,7 +1057,14 @@ app.controller('dashboardCtrl', ["$scope", "$rootScope", "toaster", "$filter", "
fieldChooser: {
enabled: false
},
fieldPanel: {
showColumnFields: true,
showDataFields: true,
showFilterFields: true,
showRowFields: true,
allowFieldDragging: true,
visible: true
},
"export": {
enabled: true,
fileName: "AdmissionsBatch"
@ -2080,8 +2119,8 @@ app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items", "Words
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1", "WordsService", function ($scope, $modalInstance, items1, WordsService) {

View File

@ -218,9 +218,8 @@ app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngT
$scope.loader='';
var getsubject = {
$scope.loader='';
var getsubject = {
method: 'POST',
url: apiPoint.url + 'getSubjectDetails/',
headers: {
@ -251,9 +250,88 @@ app.controller('subjectCtrl', ["$scope", "$rootScope","toaster", "$filter", "ngT
}
});
$scope.deactivevalue = 0;
/*De Active */
$scope.deact = function (){
//if(deactivevalue ==0){
$scope.loader='';
var getsubject = {
method: 'POST',
url: apiPoint.url + 'getSubjectDetails1/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getsubject).then(function (response) {
if (response.data.status==200 && response.data.SubjectStatus) {
$scope.emptyData=true;
$scope.loader=true;
$scope.data = response.data.details;
} else {
$scope.emptyData=false;
$scope.loader=true;
$scope.data = response.data.details;
}
});
// }else {
// var getsubject = {
// method: 'POST',
// url: apiPoint.url + 'getSubjectDetails/',
// headers: {
// 'Content-Type': 'application/json'
// },
// data: {
// requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
// branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
// }
// };
// $http(getsubject).then(function (response) {
// if (response.data.status==200 && response.data.SubjectStatus) {
// $scope.emptyData=true;
// $scope.loader=true;
// $scope.data = response.data.details;
// } else {
// $scope.emptyData=false;
// $scope.loader=true;
// $scope.data = response.data.details;
// }
// });
//}
}
};

View File

@ -113,14 +113,28 @@
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.univ" required>
<select style="width: 250px;" ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="univ" ng-change="get_uni()" ng-model="filters.univ" required>
<option value="" selected>Select University</option>
<option ng-repeat="b in univ" value="{{b.UniversityID}}">{{b.UniversityName}}</option>
</select>
</div>
</div>
<!-- <div class="col-md-4"> -->
<!-- <label> -->
<!-- BatchName -->
<!-- </label><br> -->
<!-- <select style="width: 250px;" ui-select2 class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="branch" ng-model="filters.branch" > -->
<!-- <option value="" selected>Select Batch</option> -->
<!-- <option ng-repeat="b in branch" value="{{b.BatchCode}}">{{b.BatchCode}}</option> -->
<!-- </select> -->
<!-- </div> -->
<div class="col-md-2" style="padding-top: 2.3%;">

View File

@ -177,27 +177,30 @@
<th style="font-size: 12px;">University</th>
<th style="font-size: 12px;">Cash</th>
<th style="font-size: 12px;">Cheque</th>
<th style="font-size: 12px">Referral</th>
<th style="font-size: 12px;">Online Transaction</th>
<th style="font-size: 12px;">Waiver</th>
<th style="font-size: 12px;">Credit/Debit Card</th>
<th style="font-size: 12px;">Total</th>
<th style="font-size: 12px;">Waiver</th>
<th style="font-size: 12px">Referral</th>
<!-- <th style="font-size: 12px;">Amount</th>
<th style="font-size: 12px;">Action</th> -->
</tr>
</thead>
<tbody>
<tr dir-paginate="p in newreglist|filter:search:strict|itemsPerPage:10">
<td>{{p.UniversityName}}</td>
<td>{{p.Cash}}</td>
<td>{{p.Cheque}}</td>
<td>{{p.Referal}}</td>
<td>{{p.Onlinec}}</td>
<td>{{p.WAIVER}}</td>
<td>{{p.Card}}</td>
<td>{{p.Total}}</td>
<td>{{p.Card -- p.Cash -- p.Cheque -- p.Onlinec }}</td>
<td>{{p.WAIVER}}</td>
<td>{{p.Referal}}</td>
</tr>
</tbody>
@ -208,7 +211,7 @@
<td></td>style="font-size:35px;"
<td></td>
<td></td> -->
<td colspan="7" align="right"><span style="font-size:15px;font-weight:bold">Total</span></td>
<td colspan="5" align="right"><span style="font-size:15px;font-weight:bold">Total</span></td>
<!-- <td></td>
<td></td> -->
<td><span style="font-size:15px;font-weight:bold">{{Totalfee}}</span></td>

View File

@ -52,6 +52,11 @@
id="search" autofocus tabindex="1"
placeholder="Search"/><br><br>
</div>
<div class="col-md-3">
<!-- <button ng-click="deact()">De-Active</button> -->
<input type="checkbox" name="vehicle1" ng-click="deact()"> Show In-Active<br>
</div>
</div>
@ -81,7 +86,7 @@
<td>{{p.SubjectCode}}</td>
<td>{{p.SubjectName}}</td>
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">De-Active</span></td>
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">In-Active</span></td>
<td>
<a class="text-azure" id="editRowBtn{{p.SubjectID}}" ng-click="setEditId(p.SubjectID,p);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a>