dashboard report examatt calltrack and hallticket
This commit is contained in:
parent
6a072bfe52
commit
c3c555a828
@ -304,6 +304,7 @@ class Dashboard_Controller extends REST_Controller {
|
||||
$requestedBy = $this->post('requestedBy');
|
||||
$logintype = $this->post('requestedDept');
|
||||
$leadMonth = $this->dashboard_model->leadMonth($branchId,$requestedBy,$logintype);
|
||||
|
||||
if ($leadMonth) {
|
||||
$leadMonth['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
|
||||
@ -94,7 +94,7 @@ class Report extends REST_Controller {
|
||||
$from = $this->post('from');
|
||||
$to = $this->post('to');
|
||||
$getStatus = $this->report_model->certificate_status($bat,$br,$u,$from,$to);
|
||||
//print_r($getStatus);
|
||||
// print_r($getStatus);
|
||||
if ($getStatus)
|
||||
{
|
||||
$getStatus['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -619,7 +619,7 @@ $msg='Dear '.$name.', Thank you for enquiring with Apollo Distance Education Col
|
||||
$this->db->join(ACTIVITY.' as AV', 'AV.ActivityID = LT.ActivityStatus');
|
||||
$this->db->join(PICK_LIST_DETAILS.' as PLD1', 'PLD1.ListCode = LT.StatusCode');
|
||||
|
||||
$this->db->where('PLD1.ListName !=', 'CLOSED');
|
||||
// $this->db->where('PLD1.ListName !=', 'CLOSED');
|
||||
$this->db->where('LTF.IsActive', '1');
|
||||
if($search['CreatedBranch'] !='All'){
|
||||
$this->db->where('LT.CreatedBranch', $search['CreatedBranch']);
|
||||
|
||||
@ -867,7 +867,7 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||
and list.ListName not like 'CLOSED' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and lt.CreatedBranch = '".$branchId."' ";
|
||||
and list.ListName not like 'CLOSED' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') <= curdate() and lt.CreatedBranch = '".$branchId."' ";
|
||||
$ltd=$this->db->query($sql);
|
||||
$tlead = $ltd->result();
|
||||
//To staff
|
||||
@ -880,7 +880,7 @@ $sql="select sum(TotalBalance) as total FROM (select (sum(totalpayable) - sum(to
|
||||
left join T_ActivityMaster am on am.ActivityID=lt.ActivityStatus
|
||||
join T_PickListDetails list on list.ListCode=ltf.StatusName
|
||||
where InteractionID in (select max(InteractionID) from T_Lead_Tracking_Followup group by TrackingID)
|
||||
and list.ListName not like 'CLOSED' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and lt.CreatedBranch = '".$branchId."' and ltf.AssignedStaff = '".$requestedBy."' ";
|
||||
and list.ListName not like 'CLOSED' and month(STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y')) = month(now()) and STR_TO_DATE(ltf.FollowupOn,'%d-%m-%Y') <= curdate() and lt.CreatedBranch = '".$branchId."' and ltf.AssignedStaff = '".$requestedBy."' ";
|
||||
$sltd=$this->db->query($ssql);
|
||||
$stlead = $sltd->result();
|
||||
//echo $requestedBy;
|
||||
|
||||
@ -1003,17 +1003,18 @@ class DayBook_model extends CI_Model
|
||||
FROM
|
||||
T_DayBookMaster AS p
|
||||
join T_PickListDetails on T_PickListDetails.ListCode = p.name
|
||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? or p.Name=?) and Status !=? and p.BranchCode=? and p.Isdaybook=?
|
||||
where str_to_date(Date,?)>=? and str_to_date(Date,?)<=? and p.IsActive=? and (p.Name=? or p.Name=?) and (p.ModeOfPayment != ? and p.ModeOfPayment != ? ) and Status !=? and p.BranchCode=? and p.Isdaybook=?
|
||||
GROUP BY p.`Name`';
|
||||
$query = $this->db->query($subQuery,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','Cancel',$br,'1'));
|
||||
|
||||
$query = $this->db->query($subQuery,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','WAIVER','REFERRAL','Cancel',$br,'1'));
|
||||
$expense = $query->result();
|
||||
|
||||
if(count($query)>0)
|
||||
// print_r($this->db->last_query());die();
|
||||
if(count($expense) > 0)
|
||||
{
|
||||
$results['expense_data'] = $expense;
|
||||
}
|
||||
|
||||
// print_r($this->db->last_query());die();
|
||||
|
||||
|
||||
$subQueryNON= 'SELECT
|
||||
DISTINCT(q.Name) AS TID,ListName,T_Income_Outcome_Master.TypeID as Orgtype,
|
||||
@ -1032,14 +1033,14 @@ class DayBook_model extends CI_Model
|
||||
|
||||
|
||||
$querynon = $this->db->query($subQueryNON,array($incomecode,$expensecode,$incomecode,$expensecode,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1','I001','I002','Cancel',$br,'1'));
|
||||
$expensenon = $querynon->result();
|
||||
$expensenon = $querynon->result();
|
||||
|
||||
if(count($querynon)>0)
|
||||
if(count($expensenon)>0)
|
||||
{
|
||||
$results['expense_data_nonop'] = $expensenon;
|
||||
}
|
||||
|
||||
//print_r($expensenon);die();
|
||||
// print_r($results);die();
|
||||
return $results;
|
||||
|
||||
}
|
||||
@ -1063,7 +1064,7 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Can
|
||||
$expense = $query->result();
|
||||
|
||||
|
||||
if(count($query)>0)
|
||||
if(count($expense)>0)
|
||||
{
|
||||
$results['fullexpense_detail'] = $expense;
|
||||
}
|
||||
@ -1084,7 +1085,7 @@ $queryNon = $this->db->query($subQueryNON,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$to
|
||||
$expenseNon = $queryNon->result();
|
||||
|
||||
|
||||
if(count($queryNon)>0)
|
||||
if(count($expenseNon)>0)
|
||||
{
|
||||
$results['fullNonOpexpense_detail'] = $expenseNon;
|
||||
}
|
||||
@ -1177,7 +1178,7 @@ $subQuery='select Name,ListName,q.Date as dat,month(str_to_date(Date,?)) as mont
|
||||
$expenseNon = $query->result();
|
||||
|
||||
|
||||
if(count($query)>0)
|
||||
if(count($expenseNon)>0)
|
||||
{
|
||||
$results['exceldetails'] = $expenseNon;
|
||||
}
|
||||
|
||||
@ -298,6 +298,7 @@ LEFT JOIN
|
||||
|
||||
}
|
||||
$sql.=" group by Student_id,cid,ctype";
|
||||
$sql.=" ORDER BY adate ASC";
|
||||
//echo $sql;
|
||||
|
||||
//print_r($sql);
|
||||
@ -387,7 +388,7 @@ LEFT JOIN
|
||||
ifnull(sms.rcvedate,'-') as rdate,sms.acmts,ifnull(sms.balance,0) as Balance_fee,std.name as Student_name,std.father as Father_name,std.phone as Phone_number,cm.course as Course_name,cm.uname as University,mdate,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber
|
||||
from
|
||||
(
|
||||
SELECT g.ID, g.sid,g.cid,g.sem,g.branch, g.fid, g.certname, g.ctype, g.issuedate, h.rcvedate, concat(g.acmts,' ; ',h.acmts)as acmts,h.balance,g.mdate FROM
|
||||
SELECT g.ID, g.sid,g.cid,g.sem,g.branch, g.fid, g.certname, g.ctype, g.issuedate, h.rcvedate,if ((g.acmts is null or g.acmts = ''), h.acmts, g.acmts)as acmts,h.balance,g.mdate FROM
|
||||
(SELECT c.ID,c.StudentID AS sid,sfs.CourseID AS cid,sfs.BranchCode AS branch,sfs.FeesID AS fid,Sem AS sem,c.CertificationType AS certname,c.CertificationType AS ctype,CDate AS mdate,balpayable AS balance,
|
||||
IF(ListName = 'ISSUED TO STUDENT', CDate,'-') AS issuedate,IF(ListName = 'ISSUED TO STUDENT', ListName,'-') AS istatus,
|
||||
IF(ListName = 'RECEIVED', CDate,'-') AS rcvedate,IF(ListName = 'RECEIVED', ListName,'-') AS rstatus,c.Comments AS acmts
|
||||
@ -408,7 +409,7 @@ SELECT g.ID, g.sid,g.cid,g.sem,g.branch, g.fid, g.certname, g.ctype, g.issuedate
|
||||
ON g.sid = h.sid AND g.cid = h.cid AND g.sem = h.sem AND g.ctype = h.ctype
|
||||
GROUP BY sid,cid,sem,ctype
|
||||
union
|
||||
SELECT g.ID, g.sid,g.cid,g.sem,g.branch, g.fid, g.ctype, g.ctype, g.issuedate, h.rcvedate, concat(g.acmts,' ; ',h.acmts)as acmts,h.balance,g.mdate FROM
|
||||
SELECT g.ID, g.sid,g.cid,g.sem,g.branch, g.fid, g.ctype, g.ctype, g.issuedate, h.rcvedate,if ((g.acmts is null or g.acmts = ''), h.acmts, g.acmts)as acmts,h.balance,g.mdate FROM
|
||||
(SELECT a.ID,a.StudentID AS sid,a.CourseID AS cid,sfs.BranchCode AS branch,sfs.FeesID AS fid,'-' AS sem, a.CertificationType AS ctype,AppDate AS mdate,bal.balpayable AS balance,
|
||||
AppDate AS issuedate, ListName AS istatus, a.Comments AS acmts
|
||||
FROM T_ApplicationStatus a
|
||||
@ -483,7 +484,7 @@ GROUP BY sid,cid,sem,ctype
|
||||
}
|
||||
|
||||
|
||||
// echo $sql;
|
||||
// echo $sql;
|
||||
|
||||
$leadDet=$this->db->query($sql);
|
||||
$mcert_statusDetails = $leadDet->result();
|
||||
|
||||
@ -272,7 +272,7 @@ $scope.get_uni = function()
|
||||
rowAlternationEnabled: "rowAlternationEnabled",
|
||||
dataSource: 'Dt_leadtoday'
|
||||
},
|
||||
columns: ['TrackingId', 'name', 'mobileNo', 'course', 'university', 'activity', 'AssignTo', 'followUpDate', 'status']
|
||||
columns: ['TrackingId','date', 'name', 'mobileNo', 'course', 'university', 'activity', 'AssignTo', 'followUpDate', 'status']
|
||||
};
|
||||
|
||||
//lead month
|
||||
@ -342,9 +342,9 @@ $scope.get_uni = function()
|
||||
rowAlternationEnabled: "rowAlternationEnabled",
|
||||
dataSource: 'Dt_leadmonth'
|
||||
},
|
||||
columns: ['TrackingId', 'name', 'mobileNo', 'course', 'university', 'activity', 'AssignTo', 'followUpDate', 'status']
|
||||
columns: ['TrackingId','date','name', 'mobileNo', 'course', 'university', 'activity', 'AssignTo', 'followUpDate','status',]
|
||||
};
|
||||
//lead closed today
|
||||
//lead closed today
|
||||
var leadTodayClosed = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'leadTodayClosed/',
|
||||
|
||||
@ -278,14 +278,14 @@ $scope.isLoaderTxt = "Loading...";
|
||||
top: 70,
|
||||
bottom: 40,
|
||||
left: 30,
|
||||
width: 550
|
||||
width: 550
|
||||
};
|
||||
var doc1 = new jsPDF('l', 'pt');
|
||||
// doc1.setPage(10);
|
||||
doc1.autoTableSetDefaults({
|
||||
// rowWidth: 'wrap',
|
||||
//
|
||||
columnWidth: 'wrap',
|
||||
styles: {cellPadding: 3.0, fontSize: 7, height:70, overflow: 'linebreak',columnWidth: 'wrap'},
|
||||
styles: {cellPadding: 5.0, fontSize: 8, height:70, overflow: 'linebreak',columnWidth: 'wrap'},
|
||||
headerStyles: {fillColor: [245, 245, 240], textColor: 0}
|
||||
});
|
||||
|
||||
@ -294,7 +294,7 @@ $scope.isLoaderTxt = "Loading...";
|
||||
doc2.autoTableSetDefaults({
|
||||
// rowWidth: 'wrap',
|
||||
columnWidth: 'wrap',
|
||||
styles: {cellPadding: 5.0, fontSize: 7, height:70},
|
||||
styles: {cellPadding: 5.0, fontSize: 8, height:70,overflow: 'linebreak',columnWidth: 'wrap'},
|
||||
headerStyles: {fillColor: [245, 245, 240], textColor: 0}
|
||||
});
|
||||
|
||||
@ -386,22 +386,29 @@ $scope.isLoaderTxt = "Loading...";
|
||||
|
||||
var options1 = {
|
||||
addPageContent: headerAM,
|
||||
|
||||
drawRow: function(row,data){
|
||||
row.height=50
|
||||
},
|
||||
|
||||
margin: {
|
||||
top: 50
|
||||
},
|
||||
|
||||
theme :'grid'
|
||||
|
||||
};
|
||||
|
||||
var options2 = {
|
||||
addPageContent: headerPM,
|
||||
drawRow: function(row,data){
|
||||
row.height=50
|
||||
},
|
||||
|
||||
|
||||
margin: {
|
||||
top: 50
|
||||
},
|
||||
|
||||
theme :'grid'
|
||||
|
||||
};
|
||||
@ -409,7 +416,8 @@ $scope.isLoaderTxt = "Loading...";
|
||||
if(AttendanceTableID_AM != "")
|
||||
{
|
||||
console.log('AttendanceTableID_AM');
|
||||
doc1.autoTable(AttendanceTableID_AM.columns, AttendanceTableID_AM.data, options1);
|
||||
doc1.autoTable(AttendanceTableID_AM.columns, AttendanceTableID_AM.data,
|
||||
options1);
|
||||
doc1.save(fileNameAM);
|
||||
}
|
||||
|
||||
@ -419,6 +427,8 @@ $scope.isLoaderTxt = "Loading...";
|
||||
console.log('AttendanceTableID_PM');
|
||||
doc2.autoTable(AttendanceTableID_PM.columns, AttendanceTableID_PM.data, options2);
|
||||
doc2.save(fileNamePM);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -23,8 +23,10 @@ app.controller('report_expenseCtrl', ["$scope", "API_POINTS", "$http", "SweetAle
|
||||
$scope.isLoader = false;
|
||||
$scope.isLoaderShow = false;
|
||||
$scope.isLoaderShow1 =false;
|
||||
$scope.isLoaderShow2 = false;
|
||||
$scope.isLoaderTxt = "Loading...";
|
||||
$scope.isLoaderTxt1 ="Selected Date Range is wrong";
|
||||
$scope.isLoaderTxt2 ="Select the Date Range 12 month only accepted";
|
||||
$scope.generateButtonTxt = "GENERATE";
|
||||
$scope.generateButtonStatus = false;
|
||||
$scope.currentPage = 1;
|
||||
@ -85,6 +87,7 @@ $scope.generateButtonStatus = false;
|
||||
$scope.Total = 0;
|
||||
|
||||
$scope.onSubmit = function (form) {
|
||||
|
||||
$scope.isLoaderShow1 =true;
|
||||
|
||||
var firstError = null;
|
||||
@ -120,6 +123,29 @@ $scope.generateButtonStatus = false;
|
||||
}
|
||||
|
||||
};
|
||||
if($scope.filters.from_date <= $scope.filters.to_date){
|
||||
|
||||
var months;
|
||||
months = ($scope.filters.to_date .getFullYear() - $scope.filters.from_date .getFullYear()) * 12;
|
||||
months -= $scope.filters.from_date .getMonth() + 1;
|
||||
months += $scope.filters.to_date.getMonth();
|
||||
|
||||
if(months <= 10){
|
||||
console.log('True');
|
||||
console.log(months);
|
||||
$scope.isLoaderShow2=true;
|
||||
|
||||
}else{
|
||||
console.log('False');
|
||||
console.log(months);
|
||||
// $scope.isLoaderShow = false;
|
||||
// $scope.isLoaderShow1 = false;
|
||||
$scope.isLoaderShow2 = false;
|
||||
alert('Select the Date Range 12 month only accepted');
|
||||
$scope.message = response.data.message;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($scope.filters.from_date > $scope.filters.to_date){
|
||||
$scope.isLoaderShow =true;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<div class="panel-heading border-light">
|
||||
<!--<h4 class="panel-title text-pink">Schedule Details</h4>
|
||||
<paneltool class="panel-tools" tool-collapse="tool-collapse" tool-refresh="load1" tool-dismiss="tool-dismiss"></paneltool>-->
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-4">
|
||||
<h4 class="panel-title text-green">Subject</h4>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
@ -34,7 +34,7 @@
|
||||
<!--<pre>{{unsheduledetails | json}}</pre>-->
|
||||
<div class="row" ng-repeat="s in unsheduledetails" style="margin-top:30px;">
|
||||
|
||||
<div class="col-md-2 form-group"
|
||||
<div class="col-md-4 form-group"
|
||||
ng-class="{'has-error':Form.SubjectName.$dirty && Form.SubjectName.$invalid, 'has-success':Form.batchcode.$valid}">
|
||||
<!--<label>
|
||||
Subject Name <span class="symbol required"></span>
|
||||
@ -115,7 +115,7 @@
|
||||
Shedule Ending Time <span class="symbol required"></span>
|
||||
</label>-->
|
||||
|
||||
<div class="col-md-3" style="margin-top: 0px;">
|
||||
<div class="col-md-2" style="margin-top: 0px;">
|
||||
<div class="form-group">
|
||||
<!-- <label class="text-blue"> <b>Start Time</b>
|
||||
</label>-->
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
<tbody>
|
||||
<tr ng-repeat="student in dataForExamAttendanceAM" >
|
||||
<td height="50">{{($index+1)}}</td>
|
||||
<td>{{student.Firstname}} {{student.Lastname}} </td>
|
||||
<td height="50">{{student.Firstname}} {{student.Lastname}} </td>
|
||||
<td>{{student.CourseName}}</td>
|
||||
<td>{{student.Sem_Year}}</td>
|
||||
<td>{{student.EnrollmentID}}</td>
|
||||
@ -107,7 +107,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="student in dataForExamAttendancePM" >
|
||||
<td height="50">{{($index+1)}}</td>
|
||||
<td>{{($index+1)}}</td>
|
||||
<td>{{student.Firstname}} {{student.Lastname}} </td>
|
||||
<td>{{student.CourseName}}</td>
|
||||
<td>{{student.Sem_Year}}</td>
|
||||
|
||||
@ -137,6 +137,7 @@ td,th {
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<th><input type="checkbox" ng-model="myModel.all" id="all" name="all" ng-click="isCheckAll($event);"></th>
|
||||
<th>SL.No</th>
|
||||
<th style=" white-space: pre-wrap;text-align:left;width: 100px;"!important>Certificate Fee Paid Date</th>
|
||||
@ -154,6 +155,7 @@ td,th {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr dir-paginate="p in cert_data|filter:search:strict|itemsPerPage:10" current-page="currentPage">
|
||||
<td><input type="checkbox" ng-checked="myModel.all" id="{{p.Student_id}}" name="{{p.Student_id}}" class="form-control" ng-click="isClick($event);" /></td>
|
||||
<td>{{10 * (currentPage-1)+$index+1}}</td>
|
||||
@ -166,7 +168,7 @@ td,th {
|
||||
<td>{{p.University}}</td>
|
||||
<td style="text-align:right;">{{p.balance || "0"}}</td>
|
||||
<td>{{p.certname}}</td>
|
||||
<td>{{p.status}}</td>
|
||||
<td>{{p.acmts}}</td>
|
||||
<td>{{p.adate || "-"}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
} */
|
||||
|
||||
<!-- table {border-collapse:collapse; table-layout:fixed; width:310px;} -->
|
||||
td {border:solid 1px #fab; width:100px; word-wrap:break-word;}
|
||||
<!-- td {border:solid 1px #fab; width:100px; word-wrap:break-word;} -->
|
||||
</style>
|
||||
<script type="text/javascript" src="bower_components/ng-table-excel-export/ng-table-excel-export.min.js">
|
||||
|
||||
@ -141,20 +141,20 @@
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th><input type="checkbox" style="margin-right: 20px;" ng-model="myModel.all" id="all" name="all" ng-click="isCheckAll($event);"></th>
|
||||
<th>SL.No</th>
|
||||
<th style="width:20px"><input type="checkbox" style="margin-right: 20px;" ng-model="myModel.all" id="all" name="all" ng-click="isCheckAll($event);"></th>
|
||||
<th style="width:40px">SL.No</th>
|
||||
<th>Student Name</th>
|
||||
<th>Father Name</th>
|
||||
<th>University</th>
|
||||
<th style="width:70px">University</th>
|
||||
<th>Course</th>
|
||||
<th>Sem/Year</th>
|
||||
<th style="width:60px">Sem/Year</th>
|
||||
<th>Certificates Name</th>
|
||||
<!-- <th>Received Status</th> -->
|
||||
<th>Received Date</th>
|
||||
<!-- <th>Issued Status</th> -->
|
||||
<th>Issued Date</th>
|
||||
<th>Certificate Issued Comments</th>
|
||||
<th>Balance Fee</th>
|
||||
<th style="width:100px">Certificate Issued Comments</th>
|
||||
<th style="width:60px">Balance Fee</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user