From 9f0775f4996fef602c0edfdd328815ba24cb9b9f Mon Sep 17 00:00:00 2001 From: sriramv Date: Thu, 27 Dec 2018 11:58:31 +0530 Subject: [PATCH] New Reg report --- Apollo/api/application/config/database.php | 10 +++++----- Apollo/api/application/models/Reports_model.php | 16 +++++++++------- .../assets/js/controllers/newreg_reportCtrl.js | 2 +- Apollo/assets/views/newreg_report.html | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Apollo/api/application/config/database.php b/Apollo/api/application/config/database.php index ac3b188c..076996e4 100755 --- a/Apollo/api/application/config/database.php +++ b/Apollo/api/application/config/database.php @@ -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', + // 'password' => 'apollosit1234', + // 'database' => 'apollod4_ApolloDECNEWSIT', 'dbdriver' => 'mysqli', 'dbprefix' => '', diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index d1191213..84ea15d8 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -1113,9 +1113,11 @@ from T_Lead_Tracking_Followup as ltf // die(); -$subQuery="SELECT T_StudentDetails.StudentID,T_Student_CourseDetails.DOJ,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails. MobileNumber, T_StudentDetails.Fathername,CourseName,ReferredBy,ReferersMobileNumber,T_StaffDetails.Firstname as Fname,T_StaffDetails.Lastname as Lname,Sem_Year,UniversityName FROM T_Student_CourseDetails +$subQuery="SELECT T_StudentDetails.StudentID,T_Student_CourseDetails.DOJ,T_Students_Fees_PaidDetails.BillDate,BatchName,CourseName ,T_Student_CourseDetails.UniversityID, T_Student_CourseDetails.CourseID, T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails. MobileNumber, T_StudentDetails.Fathername,CourseName,ReferredBy,ReferersMobileNumber,T_StaffDetails.Firstname as Fname,T_StaffDetails.Lastname as Lname,Sem_Year,UniversityName 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 +JOIN T_UniversityMaster ON T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID + JOIN T_CourseMaster ON T_CourseMaster.CourseID=T_Student_CourseDetails.CourseID + join T_Students_Fees_PaidDetails ON T_Students_Fees_PaidDetails.StudentID = T_StudentDetails.StudentID 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 left JOIN T_StaffDetails ON T_StaffDetails.StaffID = T_StudentDetails.AdmittedBy @@ -1127,13 +1129,13 @@ T_Registration_Details.BranchCode= '".$branch."'"; // $fromd= date("Y-m-d",strtotime($from)); //and str_to_date(DOJ,?)>=? - $subQuery.=" and str_to_date(T_Student_CourseDetails.DOJ,'%d-%m-%Y')>='".$fromd."'"; + $subQuery.=" and str_to_date(T_Students_Fees_PaidDetails.BillDate,'%d-%m-%Y')>='".$fromd."'"; } if ($tod != ''){ // $tod=date("Y-m-d",strtotime($to)); - $subQuery.="and str_to_date(T_Student_CourseDetails.DOJ,'%d-%m-%Y')<='".$tod."'"; + $subQuery.="and str_to_date(T_Students_Fees_PaidDetails.BillDate,'%d-%m-%Y')<='".$tod."'"; } @@ -1145,14 +1147,14 @@ T_Registration_Details.BranchCode= '".$branch."'"; $subQuery.='group by T_Student_CourseDetails.ID'; - $subQuery.=' order by str_to_date(T_Student_CourseDetails.DOJ,?) desc'; + $subQuery.=' order by str_to_date(T_Students_Fees_PaidDetails.BillDate,?) desc'; $query = $this->db->query($subQuery,array('%d-%m-%Y')); $searchDetails =$query->result(); -//print_r( $this->db->last_query()); -//die(); +// print_r( $this->db->last_query()); +// die(); //print_r($searchDetails);die(); diff --git a/Apollo/assets/js/controllers/newreg_reportCtrl.js b/Apollo/assets/js/controllers/newreg_reportCtrl.js index 1740e9c9..6eae364b 100644 --- a/Apollo/assets/js/controllers/newreg_reportCtrl.js +++ b/Apollo/assets/js/controllers/newreg_reportCtrl.js @@ -231,7 +231,7 @@ $scope.tod = to_dt; }; // console.log(mystyle); - alasql('SELECT SL_NO,DOJ as InitialPaymentPaidDate,CONCAT(Firstname,Lastname) as StudentName,Fathername,Course,Sem_Year as SEM_or_YEAR,MobileNumber as Phone_No,University,ReferedBy,ReferersMobileNumber,CONCAT(Fname,Lname) as AdmittedBY INTO XLS("New Registration report.xls",?) FROM ?',[mystyle,$scope.newreglist]); + alasql('SELECT SL_NO,BillDate as InitialPaymentPaidDate,CONCAT(Firstname,Lastname) as StudentName,Fathername,CourseName,Sem_Year as SEM_or_YEAR,MobileNumber as Phone_No,UniversityName,ReferedBy,ReferersMobileNumber,CONCAT(Fname,Lname) as AdmittedBY INTO XLS("New Registration report.xls",?) FROM ?',[mystyle,$scope.newreglist]); //console.log($scope.fullincomedetail); // alasql('SELECT DOJ as RegistrationDate,Firstname as Name,Fathername,UniversityName,BatchName,CourseName,MobileNumber INTO XLS("New Registration report.xls",?) FROM ?',[mystyle,$scope.newreglist]); diff --git a/Apollo/assets/views/newreg_report.html b/Apollo/assets/views/newreg_report.html index d6792949..1665f0ac 100644 --- a/Apollo/assets/views/newreg_report.html +++ b/Apollo/assets/views/newreg_report.html @@ -202,7 +202,7 @@ {{p.SL_NO}} - {{p.DOJ}} + {{p.BillDate}} {{p.Firstname}} {{p.Lastname}} {{p.Fathername}} {{p.CourseName}}