diff --git a/Apollo/api/application/controllers/Dashboard_Controller.php b/Apollo/api/application/controllers/Dashboard_Controller.php index 54bd5bb3..e08234aa 100755 --- a/Apollo/api/application/controllers/Dashboard_Controller.php +++ b/Apollo/api/application/controllers/Dashboard_Controller.php @@ -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 diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php index 2724752d..6034d07f 100755 --- a/Apollo/api/application/controllers/Report.php +++ b/Apollo/api/application/controllers/Report.php @@ -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; diff --git a/Apollo/api/application/models/Calltracking_model.php b/Apollo/api/application/models/Calltracking_model.php index a28bcc74..308479eb 100755 --- a/Apollo/api/application/models/Calltracking_model.php +++ b/Apollo/api/application/models/Calltracking_model.php @@ -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']); diff --git a/Apollo/api/application/models/Dashboard_model.php b/Apollo/api/application/models/Dashboard_model.php index aead8583..f269ef39 100755 --- a/Apollo/api/application/models/Dashboard_model.php +++ b/Apollo/api/application/models/Dashboard_model.php @@ -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; diff --git a/Apollo/api/application/models/DayBook_model.php b/Apollo/api/application/models/DayBook_model.php index 7e8afd6f..2ccfbb05 100644 --- a/Apollo/api/application/models/DayBook_model.php +++ b/Apollo/api/application/models/DayBook_model.php @@ -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; } diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index ce80fca6..5e900608 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -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(); diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index 815ab3b5..84afc615 100644 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -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/', diff --git a/Apollo/assets/js/controllers/examAttendanceCtrl.js b/Apollo/assets/js/controllers/examAttendanceCtrl.js index d10c9705..0912a67b 100644 --- a/Apollo/assets/js/controllers/examAttendanceCtrl.js +++ b/Apollo/assets/js/controllers/examAttendanceCtrl.js @@ -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); + + } diff --git a/Apollo/assets/js/controllers/report_expenseCtrl.js b/Apollo/assets/js/controllers/report_expenseCtrl.js index 489ba138..dacffcf8 100755 --- a/Apollo/assets/js/controllers/report_expenseCtrl.js +++ b/Apollo/assets/js/controllers/report_expenseCtrl.js @@ -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; diff --git a/Apollo/assets/views/hallticket/editShedule.html b/Apollo/assets/views/hallticket/editShedule.html index f0169a57..f7d0dce2 100644 --- a/Apollo/assets/views/hallticket/editShedule.html +++ b/Apollo/assets/views/hallticket/editShedule.html @@ -11,7 +11,7 @@