This commit is contained in:
gandhimathi 2018-08-20 17:50:54 +05:30
commit db59014808
10 changed files with 577 additions and 2 deletions

View File

@ -170,4 +170,9 @@ defined('RE_REGISTRATION_CONST') OR define('RE_REGISTRATION_CONST','Re-registrat
//encripted password -> md5
defined('ENCR_PASSWORD') OR define('ENCR_PASSWORD','e99a18c428cb38d5f260853678922e03');
//end of encripted password
//end of encripted password
//new registration
defined('NewReg') OR define('NewReg','New-Reg');
//end new reg

View File

@ -192,6 +192,10 @@ $route['getAllDayBookDetails'] = 'DayBook_Controller/getAllDayBookDetails';
$route['update_DayBookDetails'] = 'DayBook_Controller/update_DayBookDetailsData';
$route['AllgetUniversity'] = 'Report/getAllUniversity';
$route['NewregDetails'] = 'Report/NewregDetails';
/* Add New Contact Group */
$route['addNewGroup'] = 'Broadcast_Controller/addNewGroup';
$route['getGroups'] = 'Broadcast_Controller/getGroups';

View File

@ -383,6 +383,65 @@ class Report extends REST_Controller {
}
public function getAllUniversity_post()
{
//echo 'in';
$branchId = $this->post('branchId');
// echo $branchId;
// die();
$univlist = $this->report_model->GetAllUniversity($branchId);
if($univlist)
{
$univlist['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($univlist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}
public function NewregDetails_post()
{
$det['from'] = $this->post('from');
$det['to'] = $this->post('to');
$det['university'] = $this->post('university');
// print_r($det);
$newlist = $this->report_model->GetNewRegList($det);
if($newlist)
{
$newlist['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($newlist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND);
}
}

View File

@ -837,5 +837,82 @@ from T_Lead_Tracking_Followup as ltf
$batchDetails = $this->db->get(BATCH);
return $batchDetails->result();
}
public function GetAllUniversity($branchId)
{
$this->db->select('UniversityID,UniversityName');
$this->db->from('T_UniversityMaster');
$this->db->where('T_UniversityMaster.BranchCode',$branchId);
$searchDetails = $this->db->get();
if($searchDetails->result())
{
//print_r($searchDetails->result());
$result_array['UnivStatus'] = true;
$result_array['details'] = $searchDetails->result();
}
else
{
$result_array['UnivStatus'] = false;
$result_array['details'] = "No records found!";
}
return $result_array;
}
public function GetNewRegList($det)
{
$fdate=$det['from'];
$tdate=$det['to'];
$fromd= date("Y-m-d",strtotime($fdate));
$tod=date("Y-m-d",strtotime($tdate));
$university = $det['university'];
// echo 'f'.$fromd.'t'.$tod;
// die();
$subQuery='SELECT T_StudentDetails.StudentID,DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, Firstname,T_StudentDetails. MobileNumber, Fathername, UniversityName,CourseName FROM T_Student_CourseDetails
JOIN T_StudentDetails ON T_StudentDetails.StudentID=T_Student_CourseDetails.StudentID
JOIN T_UniversityMaster ON T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID JOIN T_CourseMaster ON T_CourseMaster.CourseID=T_Student_CourseDetails.CourseID
left JOIN T_Registration_Details ON T_Registration_Details.CourseID = T_Student_CourseDetails.CourseID and T_Registration_Details.StudentID=T_Student_CourseDetails.StudentID
left JOIN T_BatchMaster ON T_BatchMaster.BatchCode = T_Registration_Details.BatchCode
WHERE T_Registration_Details.RegistrationType = ? and str_to_date(DOJ,?)>=? and str_to_date(DOJ,?)<=? and T_Registration_Details.RegistrationMode=?';
$query = $this->db->query($subQuery,array(NewReg,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1'));
$searchDetails =$query->result();
//print_r( $this->db->last_query());
//die();
//print_r($searchDetails);die();
if($searchDetails)
{
//print_r($searchDetails->result());
$result_array['searchst'] = true;
$result_array['details'] = $query->result();
}
else
{
$result_array['searchst'] = false;
$result_array['details'] = "No records found!";
}
return $result_array;
}
}

View File

@ -91,7 +91,8 @@
"wav_ref": "WAIVER AND REFERAL REPORT",
"examfee": "EXAM WRITING FEE REPORT",
"balfee": "FEE BALANCE REPORT",
"lead": "LEAD TRACKING REPORT"
"lead": "LEAD TRACKING REPORT",
"newreg":"NEW REG REPORT"
},
"student": {

View File

@ -138,6 +138,10 @@ app.constant('JS_REQUIRES', {
'datacorrectionCtrl': 'assets/js/controllers/datacorrectionCtrl.js',
/*
* */
'newreg_reportCtrl': 'assets/js/controllers/newreg_reportCtrl.js',
/*

View File

@ -186,6 +186,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
ncyBreadcrumb: {
label: 'datacorrection'
},
}).state('app.daybooksuperadmin.datacorrection', {
url: '/datacorrection',
templateUrl: "assets/views/data_correction.html",
resolve: loadSequence('datacorrectionCtrl','ngTable', 'ladda', 'angular-ladda'),
title: 'datacorrection',
ncyBreadcrumb: {
label: 'datacorrection'
},
}).state('app.master.studentStatusUpdate', {
url: '/default activity',
templateUrl: "assets/views/studentStatusUpdate.html",

View File

@ -0,0 +1,193 @@
'use strict';
/*** controller***/
app.controller('newreg_reportCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage" ,"$http", "$state","$modal","$log",
function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http,ipCookie ,$state,$modal,$log){
//function ($scope, apiPoint, $http, SweetAlert, $state,$modal, md5, ipCookie, $window, dateListDescService) {
// DataTables configurable options
$scope.filters = {
"from_date": "",
"to_date": "",
};
var localDetails = JSON.parse(localStorage.getItem('localObj'));
//var localDetails = ipCookie('cookiechk');
console.log(localDetails);
// $scope.initHead = function() {
//console.log('rfd');
var logcheck = JSON.parse(localStorage.getItem('localObj'));
const LOCALTYPE = logcheck.localType;
if (logcheck != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' || LOCALTYPE == 'R002' || LOCALTYPE == 'R005')) {
console.log("if");
}else {
if(logcheck != null && LOCALTYPE !='R001') {
console.log("else if");
$state.go('app.dashboard');
} else {
console.log("else else");
//ipCookie.remove('cookiechk');
window.localStorage.clear();
$state.go('login.signin');
}
}
// }
$scope.universitySearchData = '';
$scope.init = function()
{
// alert()
var getuniv = {
method: 'POST',
url: apiPoint.url + 'AllgetUniversity/',
headers: {
'Content-Type': 'application/json'
},
data: {
branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID,
}
};
$http(getuniv).then(function (response) {
if(response.status == 200)
{
$scope.universitySearchData=response.data.details;
}
});
};
//$scope.opinctotal='';
$scope.newreglist='';
$scope.isLoaderShow ='';
$scope.getDetails = function (form,myModel)
{
// alert('in')
console.log(form.$dirty);
var from = $scope.filters.from_date;
var to = $scope.filters.to_date;
var university = myModel.myUnivSearch
// console.log(from)
var getstudentdetails = {
method: 'POST',
url: apiPoint.url + 'NewregDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
university: university,
from : $scope.filters.from_date,
to : $scope.filters.to_date
}
}
$http(getstudentdetails).then(function (response) {
if(response.data.status == 200)
{
$scope.newreglist = response.data.details;
$scope.isLoaderShow = true;
}
else
{
$scope.isLoaderShow=false;
}
});
}
var mystyle = {
sheetid: 'New Registration List',
headers: true,
caption: {
title:'New Registration List',
width: '500px',
style:'font-size:50px;bold:true'
},
// style:'background:#00FF00',
column: {
style:'font-size:12px'
},
};
$scope.exportData = function ()
{
//alert()
//console.log($scope.fullincomedetail);
alasql('SELECT Firstname as Name,Fathername,CourseName,BatchName,UniversityName,DOJ as RegistrationDate,MobileNumber INTO XLS("New Registration report.xls",?) FROM ?',[mystyle,$scope.newreglist]);
};
$scope.OpenWindowStatus = false;
$scope.editId = -1;
$scope.setEditId = function (P)
{
//alert(P);
$scope.editId = P;
}
$scope.close = function ()
{
$scope.editId = -1;
}
$scope.fdate ='';
$scope.tdate ='';
//$scope.Subtypes = '';
}]);

View File

@ -0,0 +1,210 @@
<style type="text/css">
.pad {
background-color: #eee;
padding: 4px;
}
.fif {
/* background-color: #ddd;*/
display: inline-block;
margin: 0 175px 0 0;
padding: 8px 8px;
text-align: left;
width: 200px;
}
.right {
/* background-color: #ddd;*/
display: inline-block;
/*margin: 0 25px 0 0;*/
padding: 1px 1px;
text-align: right;
}
.rightac {
/* background-color: #ddd;*/
display: inline-block;
margin: 0 175px 0 0;
padding: 8px 8px;
text-align: left;
width: 200px;
}
.a {
word-spacing: 9cm;
}
</style>
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle">New Registration Report</h1>
</div>
<!-- <div ncy-breadcrumb></div> -->
</div>
</section>
<style>
/* .sort-icon {
font-size: 9px;
margin-left: 5px;
}
th {
cursor: pointer;
} */
</style>
<script type="text/javascript" src="bower_components/ng-table-excel-export/ng-table-excel-export.min.js">
</script>
<div class="container-fluid container-fullw bg-white">
<div ng-controller="newreg_reportCtrl" data-ng-init="init()">
<form name="Form" id="form" novalidates method="post">
<fieldset>
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<!--<pre>{{searchData.date}}</pre>-->
<div data-ng-controller="DatepickerDemoCtrl">
<label>
From Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="filters.from_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-3">
<!--<pre>{{searchData.date}}</pre>-->
<div data-ng-controller="DatepickerDemoCtrl">
<label>
To Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="filters.to_date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeToDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-3" >
<label for="form-field-select-2">
University
</label>
<select class="form-control" tabindex="3" class="cs-select cs-skin-elastic" name="university" ng-model="myModel.myUnivSearch"
ng-click="getEmployeeList()">
<option value="" disabled selected>Select University</option>
<option ng-repeat="item in universitySearchData" value="{{item.UniversityID}}">{{item.UniversityName}}</option>
</select>
</div>
<div class="col-md-2" style="padding-top: 2.3%;">
<div class="pull-right">
<button type="submit" class="btn btn-success btn-o" ng-click="getDetails(Form,myModel);" tabindex="8">
Submit
</button>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</form>
<!-- <pre>{{statusr | json}}</pre> -->
<div class="row" style="text-align: right;">
<div class="col-md-4">
<!-- <input class="form-control" type="text" ng-model="search" id="searchIn" autofocus tabindex="2" placeholder="Search" /> -->
</div>
<button class="btn btn-success btn-o" ng-click="exportData()">Export to Excel</button>
<!-- <button type="button" ladda="ldloading1.zoom_in" tabindex="5" class="btn btn-success btn-o" data-style="zoom-in" ng-click="changeSem(myModel.universityName,myModel.courseName);">Generate PDF</button> -->
<!-- <button class="btn btn-success" id="print" ng-click="generatePDF();">Print</button></div> -->
</div>
<div>
<div ng-if="isLoaderShow">
<center> <h1>{{load}}</h1> </center>
</div>
<div class="col-md-12">
<div class="table-responsive">
<table id="datatable" class="table table-hover">
<thead>
<tr >
<th style="font-size: 12px;">Student Name</th>
<th style="font-size: 12px;">Father Name</th>
<th style="font-size: 12px;">Course</th>
<th style="font-size: 12px;">Batch</th>
<th style="font-size: 12px">University</th>
<th style="font-size: 12px;">Date Of Registration</th>
<th style="font-size: 12px;">Mobile</th>
<!-- <th style="font-size: 12px;">Amount</th>
<th style="font-size: 12px;">Action</th> -->
</tr>
</thead>
<tbody dir-paginate="p in newreglist|filter:search:strict|itemsPerPage:10">
<tr>
<td>{{p.Firstname}}</td>
<td>{{p.Fathername}}</td>
<td>{{p.CourseName}}</td>
<td>{{p.BatchName}}</td>
<td>{{p.UniversityName}}</td>
<td>{{p.DOJ}}</td>
<td>{{p.MobileNumber}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- <div ng-if="load=0">
<b><h1 style="color:black;"><center> No Records Found</h1></center></b>
</div> -->
<!-- <dir-pagination-controls direction-links="true" boundary-links="true">
</dir-pagination-controls> -->
</div>
</div>

View File

@ -483,6 +483,13 @@
<span class="title" translate="sidebar.nav.report.lead">Lead Tracking Report</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.reports.newreg" ng-click="checkSuperAdmin()">
<span class="title" translate="sidebar.nav.report.newreg">New Registration</span>
</a>
</li>
@ -955,6 +962,13 @@
<span class="title" translate="sidebar.nav.report.lead">Lead Tracking Report</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.reports.newreg" ng-click="checkAdmin()">
<span class="title" translate="sidebar.nav.report.newreg">New Registration</span>
</a>
</li>