diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php
index 00f8fd93..7554fb19 100755
--- a/Apollo/api/application/config/constants.php
+++ b/Apollo/api/application/config/constants.php
@@ -163,8 +163,6 @@ defined('APPLICATION_CONST') OR define('APPLICATION_CONST','APPLICATION');
// registration type constant
defined('NEWREGISTRATION_CONST') OR define('NEWREGISTRATION_CONST','New Registration');
defined('RE_REGISTRATION_CONST') OR define('RE_REGISTRATION_CONST','Re-registration');
-// define DMC constant name
-defined('DMC_CONST') OR define('DMC_CONST','DMC');
@@ -173,4 +171,3 @@ defined('DMC_CONST') OR define('DMC_CONST','DMC');
//encripted password -> md5
defined('ENCR_PASSWORD') OR define('ENCR_PASSWORD','e99a18c428cb38d5f260853678922e03');
//end of encripted password
-
diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php
index 09952634..d43f6524 100755
--- a/Apollo/api/application/config/routes.php
+++ b/Apollo/api/application/config/routes.php
@@ -196,6 +196,8 @@ $route['update_DayBookDetails'] = 'DayBook_Controller/update_DayBookDetailsData'
$route['AllgetUniversity'] = 'Report/getAllUniversity';
$route['NewregDetails'] = 'Report/NewregDetails';
+$route['feepaidDetails'] = 'Report/feepaidDetails';
+
/* Add New Contact Group */
$route['addNewGroup'] = 'Broadcast_Controller/addNewGroup';
$route['getGroups'] = 'Broadcast_Controller/getGroups';
diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php
index e61fc126..0f8c0b51 100755
--- a/Apollo/api/application/controllers/Report.php
+++ b/Apollo/api/application/controllers/Report.php
@@ -439,6 +439,32 @@ class Report extends REST_Controller {
], REST_Controller::HTTP_NOT_FOUND);
}
}
+
+
+
+
+ public function feepaidDetails_post()
+ {
+ $det['from'] = $this->post('from');
+ $det['to'] = $this->post('to');
+ $det['university'] = $this->post('university');
+
+ $feelist = $this->report_model->GetFeePaidDetails($det);
+
+ if($feelist)
+ {
+ $feelist['status'] = REST_Controller::HTTP_OK;
+ // Set the response and exit
+ $this->response($feelist, 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);
+ }
+ }
diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php
index 4994c8f8..60b15d3e 100755
--- a/Apollo/api/application/models/Reports_model.php
+++ b/Apollo/api/application/models/Reports_model.php
@@ -200,7 +200,8 @@ left join
left join
(SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
left join
- (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid and sms.branch = '".$br."'
+ (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid
+ where sms.branch = '".$br."'
";
if ($bat!= ''){
@@ -422,10 +423,10 @@ group by sid,Sem
}
public function app_pending($bat=null,$br=null,$u=null){
- $sql = "SELECT
- APFS.ListCode as StatusCode,
- APFS.AppFormDate as StatusUpdationOn,
- APFS.Comments as StatusComments,
+ $sql = "SELECT
+ APFS.ListCode as StatusCode,
+ APFS.AppFormDate as StatusUpdationOn,
+ APFS.Comments as StatusComments,
PKL.ListName as StatusName,
concat(STU.Firstname,' ', STU.Lastname) as Student_name,
STU.Fathername as FatherName,
@@ -438,14 +439,17 @@ group by sid,Sem
CFD.Sem_Year as Sem_Year,
RD.RegistrationType as FormType,
STU.StudentID
-FROM T_ApplicationFormStatus as APFS +LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID
-LEFT JOIN T_PickListDetails as PKL ON PKL.ListCode = APFS.ListCode +LEFT JOIN T_StudentDetails as STU ON STU.StudentID = RD.StudentID +LEFT JOIN T_CourseMaster as COUR ON COUR.CourseID = RD.CourseID +LEFT JOIN T_Student_CourseDetails as STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
+FROM T_ApplicationFormStatus as APFS
+LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID
+LEFT JOIN T_PickListDetails as PKL ON PKL.ListCode = APFS.ListCode
+LEFT JOIN T_StudentDetails as STU ON STU.StudentID = RD.StudentID
+LEFT JOIN T_CourseMaster as COUR ON COUR.CourseID = RD.CourseID
+LEFT JOIN T_Student_CourseDetails as STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
LEFT JOIN T_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType
LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID
LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM apollod4_ApolloDECDev.T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id
where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
group by APFS.Registration_Details_ID";
-
$leadDet=$this->db->query($sql);
$answer = $leadDet->result();
if (count($answer) > 0) {
@@ -858,395 +862,59 @@ $query = $this->db->query($subQuery,array(NEWREGISTRATION_CONST,'%d-%m-%Y',$from
}
-
-}
- public function doc_pending($bat=null,$br=null,$u=null){
-
- $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(sfs.cid,'-') as Course_id,ifnull(sfs.batch,'-') as Batch_code,ifnull(sfs.branch,'-') as Branch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sms.status,'-') as Status,sms.certname as certname,ifnull(sfp.bdate,'-') as Admission_date,sms.follow_date as fdate
- from
- (select StudentID as sid,Details as certname,DocumentDate as follow_date,StatusName as status
-from T_Student_DocumentTrack_Details
-where StatusName not like 'CLOSED') as sms
-left join
- (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype,BranchCode as branch
- FROM T_Students_Fees_Status
- group by sid,fid,cid,batch)
- as sfs on sfs.sid=sms.sid
-left join
- (SELECT ID,StudentID as sid,FeesId as fid,BillDate as bdate,sum(BillAmount) as bamount,BillNO as billno FROM T_Students_Fees_PaidDetails
-WHERE IsActive = 1 and ID IN (SELECT min(ID) FROM T_Students_Fees_PaidDetails group by StudentID,FeesID)
- group by sid,fid,billno)
- as sfp on sfp.sid=sfs.sid and sfp.fid=sfs.fid
-left join
- (SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sfs.cid and cfd.cid=sfs.ftype
-left join
- (SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course,
- UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm
- left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID
- group by cid
- order by CourseID)
- as cm on cm.cid=cfd.ccid
-left join
- (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
-left join (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid
- where std.active = 1 and sfs.branch = '".$br."'
- ";
-
- if ($bat!= ''){
-
- $sql.=" and sfs.batch = '".$bat."'";
-
- }
- if ($u!= ''){
-
- $sql.=" and cm.uid = '".$u."'";
-
- }
- $sql.="group by Student_id,Course_id,Batch_code,Branch_code,certname";
-
-
-
- $leadDet=$this->db->query($sql);
- $answer = $leadDet->result();
- if (count($answer) > 0) {
- $results['doc_pendingList'] = true;
- $results['doc_pending_data'] = $answer;
- } else {
- $results['doc_pendingList'] = false;
- $results['message'] = 'No record found';
- }
-
- return $results;
-
- }
- public function wav_ref($bat=null,$br=null,$u=null){
-
- $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(cfd.syear,'-') as Sem_year,ifnull(sfs.batch,'-') as Batch_code,ifnull(scd.branch,'-') as Branch_code,ifnull(sfs.cid,'-') as Course_id,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,staff.FirstName as staffname,ifnull(sms.waiver_bill,'-') as Waiver_bill,ifnull(sms.waiver,0) as Waiver_amount,ifnull(sms.referal_bill,'-') as Referal_bill,ifnull(sms.referal,0) as Referal_amount,ifnull(sms.cmts,'-') as Comments,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber
- from
- (SELECT StudentID as sid,CreatedBy as lid,CommentsForStudent as cmts,FeesId as fid,
- IF(ModeOfPayment = 'WAIVER', BillNO,'-') AS waiver_bill,
- IF(ModeOfPayment = 'WAIVER', sum(BillAmount), 0) AS waiver,
- IF(ModeOfPayment = 'REFERRAL', BillNO,'-') AS referal_bill,
- IF(ModeOfPayment = 'REFERRAL', sum(BillAmount), 0) AS referal FROM T_Students_Fees_PaidDetails
- where IsActive = 1 and ModeOfPayment = 'WAIVER' or ModeOfPayment = 'REFERRAL'
- group by fid,waiver_bill,referal_bill) as sms
-left join
- (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype FROM T_Students_Fees_Status
- group by sid,cid,fid,batch) as sfs on sfs.sid=sms.sid and sfs.fid=sms.fid
- left join
- (SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sfs.cid and cfd.cid=sfs.ftype
-left join
- (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sfs.sid and scd.cid=sfs.cid
-left join
- (SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course,
- UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm
- left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID
- group by cid
- order by CourseID)
- as cm on cm.cid=cfd.ccid
-left join
- (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
-left join
- T_Login as login on login.ID=sms.lid
-left join
- T_StaffDetails as staff on staff.StaffID=login.StaffID
- where std.active = 1 and scd.branch = '".$br."'
-
- ";
-
- if ($bat!= ''){
-
- $sql.=" and sfs.batch = '".$bat."'";
-
- }
- if ($u!= ''){
-
- $sql.=" and cm.uid = '".$u."'";
-
- }
- $sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Waiver_bill,Referal_bill,Sem_year";
-
-
-
- $leadDet=$this->db->query($sql);
- $answer = $leadDet->result();
- if (count($answer) > 0) {
- $results['wav_refList'] = true;
- $results['wav_ref_data'] = $answer;
- } else {
- $results['wav_refList'] = false;
- $results['message'] = 'No record found';
- }
-
- return $results;
-
- }
- public function examfee($bat=null,$br=null,$u=null){
-
- $sql = "select ifnull(sms.sid,'-') as Student_id,ifnull(scd.eid,'-') as Enrollment_id,ifnull(std.name,'-') as Student_name,ifnull(std.father,'-') as Father_name,ifnull(std.phone,'-') as Phone_number,ifnull(cfd.syear,'-') as Sem_year,ifnull(sms.batch,'-') as Batch_code,ifnull(cm.course,'-') as Course_name,ifnull(cm.uname,'-') as University,ifnull(sms.cid,'-') as Course_id,ifnull(sms.cmts,'-') as Comments,ifnull(sms.stf,'-') as Amount,ifnull(sms.branch,'-') as Branch_code,ifnull(std.address,'-') as address,ifnull(std.AlternateNumber,'') as AlternateNumber
- from
- (SELECT FeesID as fid,BatchCode as batch,StudentID as sid,CourseID as cid,FeesType as ftype,sum(CourseFees) as cf,Sum(STFOrWR) as stf,sum(Others) as others,Comments as cmts,BranchCode as branch FROM T_Students_Fees_Status
-where STFOrWR != ''
-group by sid,fid,batch,cid) as sms
-left join
- (SELECT StudentID as sid,UniversityID as uid,CourseID as cid,EnrollmentID as eid,BranchID as branch FROM T_Student_CourseDetails) as scd on scd.sid=sms.sid and scd.cid=sms.cid
-left join
- (SELECT ID as cid,CourseID as ccid,FeesType as ftype,Sem_Year as syear FROM T_Course_Fees_Details) as cfd on cfd.ccid=sms.cid and cfd.cid=sms.ftype
-left join
- (SELECT CourseID as cid,cm.UniversityID as cuid,u.UniversityID as uid,CourseName as course,
- UniversityName as uname,cm.BranchCode as branch FROM T_CourseMaster as cm
- left join T_UniversityMaster as u on u.UniversityID=cm.UniversityID
- group by cid
- order by CourseID)
- as cm on cm.cid=sms.cid
-left join
- (SELECT StudentID as sid,MobileNumber as phone,IsActive as active,FirstName as name,Fathername as father,PermanentAddress as address,AlternateNumber FROM T_StudentDetails) as std on std.sid=sms.sid
- where std.active = 1 and sms.branch = '".$br."'
-
-";
-
- if ($bat!= ''){
-
- $sql.=" and sms.batch = '".$bat."'";
-
- }
- if ($u!= ''){
-
- $sql.=" and cm.uid = '".$u."'";
-
- }
- $sql.=" group by Student_id,Course_id,Batch_code,Branch_code,Sem_year";
-
-
-
- $leadDet=$this->db->query($sql);
- $answer = $leadDet->result();
- if (count($answer) > 0) {
- $results['examfeeList'] = true;
- $results['examfee_data'] = $answer;
- } else {
- $results['examfeeList'] = false;
- $results['message'] = 'No record found';
- }
-
- return $results;
- }
- public function balfee($bat=null,$br=null,$u=null){
-
- $sql = "SELECT ifnull(sfp.StudentID,'-') as Student_id,scd.EnrollmentID as eid,sfs.CourseID as cid,std.MobileNumber as Phone_number,FirstName as Student_name,Fathername as Father_name,PermanentAddress as address,AlternateNumber,date_format(std.CreatedOn,'%d-%m-%Y') as regdate,cm.CourseName as Course_name,u.UniversityName as University,sfp.FeesID as fid,(CourseFees + STFOrWR + Others) as Total,ifnull((sfp.BillAmount),0) as Paid_fee,((CourseFees + STFOrWR + Others) - sfp.BillAmount) as balance,cfd.Sem_Year as Sem_year,std.PermanentAddress as address,std.AlternateNumber as AlternateNumber,
- ifnull(MAX(CASE WHEN Installment = 1 THEN sfp.BillNO END),'-') as billno1,
- ifnull(MAX(CASE WHEN Installment = 1 THEN sfp.BillAmount END),0) as billamt1,
- ifnull(MAX(CASE WHEN Installment = 2 THEN sfp.BillNO END),'-') as billno2,
- ifnull(MAX(CASE WHEN Installment = 2 THEN sfp.BillAmount END),0) as billamt2,
- ifnull(MAX(CASE WHEN Installment = 3 THEN sfp.BillNO END),'-') as billno3,
- ifnull(MAX(CASE WHEN Installment = 3 THEN sfp.BillAmount END),0) as billamt3,
- ifnull(MAX(CASE WHEN Installment = 4 THEN sfp.BillNO END),'-') as billno4,
- ifnull(MAX(CASE WHEN Installment = 4 THEN sfp.BillAmount END),0) as billamt4,
- ifnull(MAX(CASE WHEN Installment = 5 THEN sfp.BillNO END),'-') as billno5,
- ifnull(MAX(CASE WHEN Installment = 5 THEN sfp.BillAmount END),0) as billamt5,
- ifnull(MAX(CASE WHEN Installment = 6 THEN sfp.BillNO END),'-') as billno6,
- ifnull(MAX(CASE WHEN Installment = 6 THEN sfp.BillAmount END),0) as billamt6,
- ifnull(MAX(CASE WHEN Installment = 7 THEN sfp.BillNO END),'-') as billno7,
- ifnull(MAX(CASE WHEN Installment = 7 THEN sfp.BillAmount END),0) as billamt7,
- ifnull(MAX(CASE WHEN Installment = 8 THEN sfp.BillNO END),'-') as billno8,
- ifnull(MAX(CASE WHEN Installment = 8 THEN sfp.BillAmount END),0) as billamt8,
- ifnull(MAX(CASE WHEN Installment = 9 THEN sfp.BillNO END),'-') as billno9,
- ifnull(MAX(CASE WHEN Installment = 9 THEN sfp.BillAmount END),0) as billamt9,
- ifnull(MAX(CASE WHEN Installment = 10 THEN sfp.BillNO END),'-') as billno10,
- ifnull(MAX(CASE WHEN Installment = 10 THEN sfp.BillAmount END),0) as billamt10
-
- FROM T_Students_Fees_PaidDetails as sfp
- left join T_Students_Fees_Status sfs on sfs.FeesID=sfp.FeesID
- left join T_Course_Fees_Details cfd on cfd.ID=sfs.FeesType
- left join T_CourseMaster cm on cm.CourseID=sfs.CourseID
- left join T_UniversityMaster u on u.UniversityID=cm.UniversityID
- left join T_StudentDetails std on std.StudentID=sfp.StudentID and std.IsActive = 1
- left join T_Student_CourseDetails scd on scd.StudentID=sfs.StudentID and scd.CourseID=sfs.CourseID
- where sfp.IsActive = 1 and sfp.UpdatedBy = '".$br."'
+ public function GetFeePaidDetails($det)
+ {
- ";
-
- if ($bat!= ''){
-
- $sql.=" and sfs.BatchCode = '".$bat."'";
-
- }
- if ($u!= ''){
-
- $sql.=" and u.UniversityID = '".$u."'";
-
- }
- $sql.=" group by Student_id,fid";
-
-
-
- $leadDet=$this->db->query($sql);
- $answer = $leadDet->result();
-
-
-
- if (count($answer) > 0) {
- $results['balfeeList'] = true;
- $results['balfee_data'] = $answer;
- } else {
- $results['balfeeList'] = false;
- $results['message'] = 'No record found';
- }
-
- return $results;
-
- }
- public function lead($from=null,$to=null,$br=null){
-
- $sql = "select InteractionID,date_format(ltf.CreatedOn,'%d-%m-%Y') as date,ltf.TrackingID as tid,ltf.FollowupOn as fup,ld.LeadName as name,ld.MobileNumber as mobile,lt.University as univ,lt.Course as course,lt.Course as prvStatus,list.ListName as prsStatus,ltf.FollowupComments as cmnts,ifnull(am.ActivityName,'-') as activity,sd.FirstName as AssignTo
-from T_Lead_Tracking_Followup as ltf
- left join T_Lead_Tracking lt on lt.TrackingID=ltf.TrackingID
- join T_Login l on l.ID=lt.AssignedTo
- join T_StaffDetails sd on sd.StaffID=l.StaffID
- left join T_Lead_Details ld on ld.LeadID=lt.LeadID
- 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 lt.CreatedBranch = '".$br."'
+ $start_date= $det['from'];
+ $end_date = $det['to'];
- ";
-
- if ($from and $to != ''){
- $fromd= date("Y-m-d",strtotime($from));
- $tod=date("Y-m-d",strtotime($to));
+ //echo $det['university'];die() ;
+
+ $this->db->select('T_Student_CourseDetails.UniversityID,UniversityName,
+ SUM(IF(ModeOfPayment ="CASH", BillAmount, 0)) AS Cash,
+ SUM(IF(ModeOfPayment ="CHEQUE",BillAmount, 0)) AS Cheque,
+ SUM(IF(ModeOfPayment ="REFERRAL", BillAmount, 0)) AS Referal,
+ 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(T_Students_Fees_PaidDetails.BillAmount) AS Total');
+ $this->db->from('T_Students_Fees_PaidDetails');
+ $this->db->join('T_Student_CourseDetails','T_Student_CourseDetails.StudentID=T_Students_Fees_PaidDetails.StudentID');
+ $this->db->join('T_UniversityMaster','T_UniversityMaster.UniversityID=T_Student_CourseDetails.UniversityID');
+ // $this->db->where('T_Students_Fees_PaidDetails.CreatedOn BETWEEN "'.date('Y-m-d', strtotime($start_date)). '" and "'. date('Y-m-d', strtotime($end_date)).'"');
+
+
+ $this->db->where('T_Students_Fees_PaidDetails.CreatedOn>=',date('Y-m-d', strtotime($start_date)));
+
+ $this->db->where('T_Students_Fees_PaidDetails.CreatedOn<=',date('Y-m-d', strtotime($end_date)));
+ // $this->db->where(' BillDate <= str_to_date("'.$end_date.'",%d-%m-%Y)');
- $sql.=" and date(ltf.CreatedOn) >= '".$fromd."'
- and date(ltf.CreatedOn) <= '".$tod."'";
-
- }
-
-
-
-
- $leadDet=$this->db->query($sql);
- $answer = $leadDet->result();
-
- //echo $sql;
-
- if (count($answer) > 0) {
- $results['leadList'] = true;
- $results['lead_data'] = $answer;
- } else {
- $results['leadList'] = false;
- $results['message'] = 'No record found';
- }
-
- return $results;
-
- }
- public function getUniversity($br=null)
- {
- $this->db->select('UniversityID,UniversityName');
- $this->db->where('IsActive','1');
- $this->db->where('BranchCode',$br);
- $this->db->order_by('CreatedOn','DESC');
- $university = $this->db->get(UNIVERSITY);
+
- if($university->result()){
- $result = array();
- $result['univlist'] = true;
- foreach ($university->result() as $row)
- {
+ $this->db->where('T_Students_Fees_PaidDetails.IsActive','1');
- $university_array['universityID'] = $row->UniversityID;
- $university_array['universityName'] = $row->UniversityName;
- $university_array['batchDetails']= $this->getBatch($row->UniversityID,$br);
- $result_array[]=$university_array;
- }
- $result['university']= $result_array;
- }
- else {
- $result['univlist'] = false;
- $result['message'] = "No records found!";
- $result['universityID'] = "";
- $result['universityName'] = "";
- $result['batchDetails']= "";
- }
-
-
- return $result;
-
- }
-
- public function getBatch($universityID=null,$br=null)
- {
- $this->db->select('BatchCode,BatchName');
- $this->db->where('UniversityID',$universityID);
- $this->db->where('IsActive','1');
- $this->db->where('BranchCode',$br);
- $this->db->order_by('BatchCode','ASC');
- $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
+ if($det['university']!='')
{
- $result_array['UnivStatus'] = false;
- $result_array['details'] = "No records found!";
+ $this->db->where('T_Student_CourseDetails.UniversityID',$det['university']);
}
+ $this->db->group_by('UniversityID');
- return $result_array;
- }
+ $feeDetails = $this->db->get()->result();
+ // print_r( $this->db->last_query());
+// die();
- 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=? and T_Student_CourseDetails.UniversityID=? group by T_Registration_Details.StudentID';
-
-$query = $this->db->query($subQuery,array(NEWREGISTRATION_CONST,'%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'1',$university));
-
-
- $searchDetails =$query->result();
-//print_r( $this->db->last_query());
-//die();
-
- //print_r($searchDetails);die();
-
-
- if($searchDetails)
+ // print_r($feeDetails);
+if($feeDetails)
{
//print_r($searchDetails->result());
$result_array['searchst'] = true;
- $result_array['details'] = $query->result();
+ $result_array['details'] = $feeDetails;
}
else
{
@@ -1256,8 +924,7 @@ $query = $this->db->query($subQuery,array(NEWREGISTRATION_CONST,'%d-%m-%Y',$from
return $result_array;
-
-
+
}
}
\ No newline at end of file
diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json
index 43b1900a..0eb26179 100755
--- a/Apollo/assets/i18n/en.json
+++ b/Apollo/assets/i18n/en.json
@@ -92,7 +92,8 @@
"examfee": "EXAM WRITING FEE REPORT",
"balfee": "FEE BALANCE REPORT",
"lead": "LEAD TRACKING REPORT",
- "newreg":"NEW REG REPORT"
+ "newreg":"NEW REG REPORT",
+ "feeCollect":"FEE COLLECTED"
},
"student": {
diff --git a/Apollo/assets/js/config.constant.js b/Apollo/assets/js/config.constant.js
index d0574559..ec23adc5 100755
--- a/Apollo/assets/js/config.constant.js
+++ b/Apollo/assets/js/config.constant.js
@@ -142,7 +142,9 @@ app.constant('JS_REQUIRES', {
'newreg_reportCtrl': 'assets/js/controllers/newreg_reportCtrl.js',
/*
-
+ * */
+ 'FeeCollected_reportCtrl': 'assets/js/controllers/FeeCollected_reportCtrl.js',
+ /*
* student status updation
diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js
index afab87b3..05809016 100755
--- a/Apollo/assets/js/config.router.js
+++ b/Apollo/assets/js/config.router.js
@@ -194,6 +194,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
ncyBreadcrumb: {
label: 'newreg'
},
+ }).state('app.reports.feeCollect', {
+ url: '/feeCollect',
+ templateUrl: "assets/views/feecollected.html",
+ resolve: loadSequence('FeeCollected_reportCtrl','ngTable', 'ladda', 'angular-ladda'),
+ title: 'feeCollect',
+ ncyBreadcrumb: {
+ label: 'feeCollect'
+ },
}).state('app.master.studentStatusUpdate', {
url: '/default activity',
templateUrl: "assets/views/studentStatusUpdate.html",
diff --git a/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js
new file mode 100644
index 00000000..68724f7c
--- /dev/null
+++ b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js
@@ -0,0 +1,261 @@
+'use strict';
+/*** controller***/
+app.controller('FeeCollected_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.load = '';
+$scope.isShow= '';
+$scope.fromd='';
+$scope.tod='';
+$scope.universityId='';
+$scope.getDetails = function (form,myModel)
+{
+
+
+var firstError = null;
+ if (form.$invalid) {
+ var field = null, firstError = null;
+ $scope.show = true;
+ for (field in form) {
+ if (field[0] != '$') {
+ if (firstError === null && !form[field].$valid) {
+ firstError = form[field].$batch;
+ }
+ if (form[field].$pristine) {
+ form[field].$dirty = true;
+ }
+ }
+ }
+ angular.element('.ng-invalid[batch=' + firstError + ']').focus();
+ }
+
+ else
+ {
+ var from = $scope.filters.from_date;
+ var to = $scope.filters.to_date;
+
+if(myModel === undefined)
+{
+ $scope.universityId='';
+}
+else
+{
+
+ $scope.universityId = myModel.myUnivSearch;
+}
+
+var f = new Date(from),
+month = '' + (f.getMonth() + 1),
+day = '' + f.getDate(),
+year = f.getFullYear();
+
+if (month.length < 2) month = '0' + month;
+if (day.length < 2) day = '0' + day;
+
+var from_dt = [day, month ,year].join('-');
+
+
+
+var t = new Date(to),
+month = '' + (t.getMonth() + 1),
+day = '' + t.getDate(),
+year = t.getFullYear();
+
+if (month.length < 2) month = '0' + month;
+if (day.length < 2) day = '0' + day;
+
+var to_dt = [day, month ,year].join('-');
+
+
+$scope.fromd = from_dt;
+$scope.tod = to_dt;
+
+
+ var getstudentdetails = {
+
+ method: 'POST',
+ url: apiPoint.url + 'feepaidDetails/',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ data: {
+ university: $scope.universityId,
+ from : $scope.fromd ,
+ to : $scope.tod
+
+ }
+ }
+
+ $http(getstudentdetails).then(function (response) {
+
+ if(response.data.status == 200 && response.data.searchst==true)
+ {
+
+ //console.log(response.data);
+ $scope.newreglist = response.data.details;
+ $scope.isShow=true;
+ $scope.isLoaderShow=false;
+
+ console.log($scope.newreglist);
+
+ }
+
+ else
+ {
+ $scope.isLoaderShow=true;
+ $scope.isShow=false;
+ }
+
+
+ });
+ }
+
+}
+
+
+
+
+
+
+
+
+ $scope.exportData = function ()
+ {
+ //alert()
+
+ $scope.sam = 'Fee Paid list from '+$scope.fromd+' to '+$scope.tod;
+
+
+ var mystyle = {
+ sheetid:$scope.sam,
+ headers: true,
+ caption: {
+ title: $scope.sam,
+ width: '1000px',
+ style:'font-size:50px;bold:true'
+ },
+ // style:'background:#00FF00',
+ column: {
+ style:'font-size:12px'
+ },
+
+ };
+ console.log(mystyle);
+
+ alasql('SELECT UniversityName,Cash,Cheque,Referal,Onlinec as OnlineTransaction,WAIVER,Card as CardTransaction,Total INTO XLS("Fee Paid List 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 = '';
+
+
+
+
+
+
+
+ }]);
+
+
+
+
diff --git a/Apollo/assets/js/controllers/report_ans_bookletCtrl.js b/Apollo/assets/js/controllers/report_ans_bookletCtrl.js
index 21ed7cad..3e05c526 100755
--- a/Apollo/assets/js/controllers/report_ans_bookletCtrl.js
+++ b/Apollo/assets/js/controllers/report_ans_bookletCtrl.js
@@ -114,6 +114,7 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
}else {
//alert($scope.batch.name);
+ $scope.filterUniv = angular.fromJson($scope.univModel.university);
$scope.ans_book_data = '';
$scope.message = '';
var response_data = {
@@ -124,7 +125,7 @@ app.controller('report_ans_bookletCtrl', ["$scope", "$filter","$rootScope","$mod
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
- university: $scope.univModel.university.universityID,
+ university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch
}
diff --git a/Apollo/assets/js/controllers/report_app_pendingCtrl.js b/Apollo/assets/js/controllers/report_app_pendingCtrl.js
index 1deaa197..7b40d759 100755
--- a/Apollo/assets/js/controllers/report_app_pendingCtrl.js
+++ b/Apollo/assets/js/controllers/report_app_pendingCtrl.js
@@ -167,7 +167,7 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
$scope.exportData = function () {
- alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,InitialPayDate as InititalPaymentDate,EnrollmentNumber as EnrollmentID,StudentName as StudentName,FatherName as FatherName,CourseName as CourseName,Sem_Year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,UniversityName as University,StatusName as ApplicationPendingStatus,FormType as FormType,StatusUpdationOn as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_pending_data]);
+ alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,InitialPayDate as InititalPaymentDate,EnrollmentNumber as EnrollmentID,Student_name as StudentName,FatherName as FatherName,CourseName as CourseName,Sem_Year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,UniversityName as University,StatusName as ApplicationPendingStatus,FormType as FormType,StatusUpdationOn as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_pending_data]);
};
diff --git a/Apollo/assets/js/controllers/report_balfeeCtrl.js b/Apollo/assets/js/controllers/report_balfeeCtrl.js
index f8a92377..54e6d92c 100755
--- a/Apollo/assets/js/controllers/report_balfeeCtrl.js
+++ b/Apollo/assets/js/controllers/report_balfeeCtrl.js
@@ -124,6 +124,7 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal",
}
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
}else {
+ $scope.filterUniv = angular.fromJson($scope.univModel.university);
$scope.balfee_data = '';
$scope.message = '';
var response_data = {
@@ -134,7 +135,7 @@ app.controller('report_balfeeCtrl', ["$scope", "$filter","$rootScope","$modal",
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
- university: $scope.univModel.university.universityID,
+ university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch
}
diff --git a/Apollo/assets/js/controllers/report_certificateCtrl.js b/Apollo/assets/js/controllers/report_certificateCtrl.js
index ab4cd9c0..03237e32 100755
--- a/Apollo/assets/js/controllers/report_certificateCtrl.js
+++ b/Apollo/assets/js/controllers/report_certificateCtrl.js
@@ -110,6 +110,7 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod
});
$scope.onSubmit = function () {
+ $scope.filterUniv = angular.fromJson($scope.univModel.university);
//alert($scope.batch.name);
$scope.cert_data = '';
$scope.message = '';
@@ -121,7 +122,7 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
- university: $scope.univModel.university.universityID,
+ university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch,
from : $scope.univModel.from_date,
to : $scope.univModel.to_date
@@ -160,7 +161,7 @@ app.controller('report_certificateCtrl', ["$scope", "$filter","$rootScope","$mod
$scope.exportData = function () {
- alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,Document_fee_paid_date as DocumentFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father as FatherName,Course_name as CourseName,Sem_year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(Balance_fee AS NUMBER) as Balance,Certificate_name as CertificateName,Status as CertificateStatus,Date as Date INTO XLS("Certificate_status.xls",?) FROM ?',[mystyle,$scope.cert_data]);
+ alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,initialPaid as DocumentFeePaidDate,Enrollment_id as EnrollmentID,Student_name as StudentName,Father_name as FatherName,Course_name as CourseName,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,CAST(balance AS NUMBER) as Balance,certname as CertificateName,status as CertificateStatus,adate as Date INTO XLS("Certificate_status.xls",?) FROM ?',[mystyle,$scope.cert_data]);
};
/*modal controller
diff --git a/Apollo/assets/js/controllers/report_doc_pendingCtrl.js b/Apollo/assets/js/controllers/report_doc_pendingCtrl.js
index b1b0906e..591b0fb6 100755
--- a/Apollo/assets/js/controllers/report_doc_pendingCtrl.js
+++ b/Apollo/assets/js/controllers/report_doc_pendingCtrl.js
@@ -116,6 +116,7 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
}else {
//alert($scope.batch.name);
+ $scope.filterUniv = angular.fromJson($scope.univModel.university);
$scope.doc_pending_data = '';
$scope.message = '';
var response_data = {
@@ -126,7 +127,7 @@ app.controller('report_doc_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
- university: $scope.univModel.university.universityID,
+ university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch
}
diff --git a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js
index 93bf760d..4bc370dc 100755
--- a/Apollo/assets/js/controllers/report_markcard_statusCtrl.js
+++ b/Apollo/assets/js/controllers/report_markcard_statusCtrl.js
@@ -114,6 +114,7 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope",
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
}else {
//alert($scope.batch.name);
+ $scope.filterUniv = angular.fromJson($scope.univModel.university);
$scope.markcard_data = '';
$scope.message = '';
var response_data = {
@@ -124,7 +125,7 @@ app.controller('report_markcard_statusCtrl', ["$scope", "$filter","$rootScope",
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
- university: $scope.univModel.university.universityID,
+ university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch
}
diff --git a/Apollo/assets/js/controllers/report_waiver_referalCtrl.js b/Apollo/assets/js/controllers/report_waiver_referalCtrl.js
index e1d3824c..5e215f86 100755
--- a/Apollo/assets/js/controllers/report_waiver_referalCtrl.js
+++ b/Apollo/assets/js/controllers/report_waiver_referalCtrl.js
@@ -81,6 +81,7 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S
angular.element('.ng-invalid[batch=' + firstError + ']').focus();
}else {
//alert($scope.batch.name);
+ $scope.filterUniv = angular.fromJson($scope.univModel.university);
$scope.waiver_referal_data = '';
$scope.message = '';
console.log($scope.waiver_referal_data);
@@ -92,7 +93,7 @@ app.controller('report_waiver_referalCtrl', ["$scope", "API_POINTS", "$http", "S
},
data: {
branch: JSON.parse(localStorage.getItem('localObj')).localBranchID,
- university: $scope.univModel.university.universityID,
+ university: $scope.filterUniv.universityID,
batch: $scope.univModel.batch
}
diff --git a/Apollo/assets/views/feecollected.html b/Apollo/assets/views/feecollected.html
new file mode 100644
index 00000000..e2c12846
--- /dev/null
+++ b/Apollo/assets/views/feecollected.html
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+Fee Collected Report
+
| University | +Cash | +Cheque | +Referral | +Online Transaction | +Waiver | +Credit/Debit Card | +Total | + +
|---|---|---|---|---|---|---|---|
| {{p.UniversityName}} | +{{p.Cash}} | +{{p.Cheque}} | +{{p.Referal}} | +{{p.Onlinec}} | +{{p.WAIVER}} | +{{p.Card}} | +{{p.Total}} | + +