bug fixes and Changes : ps
This commit is contained in:
parent
1be9249ef4
commit
973c3cb230
@ -74,7 +74,7 @@ class Report extends REST_Controller {
|
||||
|
||||
if(!empty($result)){$getStatus['markcardstatus'] = $result;
|
||||
$cnt = count($getStatus['markcardstatus']);
|
||||
$getStatus['markcardstatus'][$cnt+1]["ListCode"] = "blank";
|
||||
$getStatus['markcardstatus'][$cnt+1]["ListCode"] = FEESUPDATE;
|
||||
$getStatus['markcardstatus'][$cnt+1]["ListName"] = "BLANK";
|
||||
$getStatus['markcardstatus'][$cnt+1]["StudentActivityCode"]= 'C001';
|
||||
}
|
||||
@ -134,7 +134,7 @@ class Report extends REST_Controller {
|
||||
if(!empty($result)){$getStatus['certificatestatus'] = $result;
|
||||
$cnt = count($getStatus['certificatestatus']);
|
||||
$getStatus['certificatestatus'][$cnt+1]["StudentActivityCode"]= 'A001';
|
||||
$getStatus['certificatestatus'][$cnt+1]["ListCode"] = "blank";
|
||||
$getStatus['certificatestatus'][$cnt+1]["ListCode"] = FEESUPDATE;
|
||||
$getStatus['certificatestatus'][$cnt+1]["ListName"] = "BLANK";
|
||||
}
|
||||
else{ $getStatus['certificatestatus'] = array();}
|
||||
|
||||
@ -500,7 +500,10 @@ class Fees_status_model extends CI_Model
|
||||
|
||||
public function updateFees($feesPaidDetails=null,$courseID=null,$feesName=null,$smsDetails=null)
|
||||
{
|
||||
|
||||
// print_r($feesPaidDetails);
|
||||
// echo $courseID;
|
||||
// echo $feesName;
|
||||
// die();
|
||||
|
||||
|
||||
if($feesPaidDetails['UpdatedBy']=='All'){
|
||||
@ -797,12 +800,15 @@ class Fees_status_model extends CI_Model
|
||||
* created by kms
|
||||
* */
|
||||
public function getFeesStructureAssign($student=null){
|
||||
|
||||
// print_r($student);die();
|
||||
$this->db->select('ID,CourseID,ProgramType,FeesAmount,Sem_Year');
|
||||
$this->db->where('CourseID',$student['CourseID']);
|
||||
$this->db->order_by('ProgramType');
|
||||
$feesDetails = $this->db->get(COURSE_FEES);
|
||||
$SNoValue=0;
|
||||
|
||||
// echo 'count'.count($feesDetails->result());
|
||||
// print_r($this->db->last_query());die();
|
||||
if($feesDetails->result()){
|
||||
|
||||
$result_array['feesStatus']=true;
|
||||
@ -810,7 +816,7 @@ class Fees_status_model extends CI_Model
|
||||
$SNoValue=$SNoValue+1;
|
||||
$this->db->select('SFS.FeesID,SFS.CourseFees,SFS.Comments,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.SessionName,SFS.ToSessionName,SFS.RollNo,SFS.BatchCode,SM.SessionName as MasterSessionName,SM1.SessionName as MasterToSessionName,bm.BatchName');
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
$this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName');
|
||||
$this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName','left');
|
||||
$this->db->join(SESSIONMASTER.' as SM1', 'SM1.SessionID = SFS.ToSessionName','left');
|
||||
$this->db->join(BATCH.' as bm','bm.BatchCode = SFS.BatchCode','left');
|
||||
// $this->db->join(STUDENTS_FEES_PAID.' as SFP', 'SFP.FeesId = SFS.FeesID','left');
|
||||
@ -821,14 +827,16 @@ class Fees_status_model extends CI_Model
|
||||
// $this->db->where('SFS.BatchCode',$student['BatchCode']);
|
||||
// }
|
||||
$existFeesDetails = $this->db->get();
|
||||
|
||||
// print_r($this->db->last_query());die();
|
||||
// print_r($this->db->last_query());die();
|
||||
|
||||
// echo 'check Details'.$SNoValue;
|
||||
// die();
|
||||
if($existData=$existFeesDetails->result()){
|
||||
// count the total paid fees details
|
||||
$this->db->select('FeesId');
|
||||
$this->db->where('FeesId',$existData[0]->FeesID);
|
||||
$this->db->where('IsActive','1');
|
||||
$countExistPaid = $this->db->get(STUDENTS_FEES_PAID);
|
||||
// $this->db->where('IsActive','1');
|
||||
$countExistPaid = $this->db->get(STUDENTS_FEES_PAID);
|
||||
if($countExistPaid->num_rows()<=0){
|
||||
$fetchData['PaidStatus']=0;
|
||||
}
|
||||
@ -921,6 +929,8 @@ class Fees_status_model extends CI_Model
|
||||
}
|
||||
|
||||
}
|
||||
// print_r($fetchData);
|
||||
// die();
|
||||
// filter data
|
||||
$KilterKey = array_search(1, array_column($CourseFeesArray, 'ExistValue'));
|
||||
if($KilterKey=='' OR $KilterKey==null){
|
||||
@ -928,8 +938,11 @@ class Fees_status_model extends CI_Model
|
||||
|
||||
}
|
||||
else{
|
||||
$FilterCourseArray=$CourseFeesArray;
|
||||
|
||||
|
||||
/* // by Sanjeev Due to Requirement Need The Changes Fees for existing Deletetion
|
||||
$FilterSNoValue=0;
|
||||
|
||||
foreach ($CourseFeesArray as $key => $FilterRow){
|
||||
if($KilterKey<=$key){
|
||||
$FilterSNoValue=$FilterSNoValue+1;
|
||||
@ -937,6 +950,7 @@ class Fees_status_model extends CI_Model
|
||||
$FilterCourseArray[]=$FilterRow;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
@ -955,7 +969,8 @@ class Fees_status_model extends CI_Model
|
||||
else{
|
||||
$result_array['feesStatus']=false;
|
||||
}
|
||||
|
||||
// die();
|
||||
// print_r($result_array);die();
|
||||
$result_array['sessionDetails'] = $this->getSession($student);
|
||||
$result_array['feesetDetails'] = $this->GetFeeSetDetails($student);
|
||||
|
||||
@ -1232,8 +1247,21 @@ class Fees_status_model extends CI_Model
|
||||
$this->db->where('StudentID', $details['StudentID']);
|
||||
$this->db->where('FeesType', $details['FeesType']);
|
||||
$checkExist=$this->db->get(STUDENTS_FEES_STATUS);
|
||||
$checkwithstatus = count($checkExist->result())<=0;
|
||||
|
||||
$this->db->select('SFS.FeesType,CF.Sem_Year,CF.ProgramType');
|
||||
$this->db->from(STUDENTS_FEES_STATUS.' as SFS');
|
||||
$this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType');
|
||||
$this->db->where('SFS.CourseID',$details['CourseID']);
|
||||
$this->db->where('SFS.StudentID',$details['StudentID']);
|
||||
$result = $this->db->get()->result_array();
|
||||
$check = 0;// id has value means Sem1 Already Exist so NewReg Set t0 0 no value in ID(which means Empty) newreg value 1;
|
||||
// echo count($result);
|
||||
for($j=0;$j<count($result);$j++)
|
||||
{
|
||||
$a = $result[$j]['Sem_Year'];
|
||||
if($a == 'Sem1'){$check++;}
|
||||
}
|
||||
|
||||
// select cf.Sem_Year
|
||||
// from T_Students_Fees_Status sfs
|
||||
// left join T_Course_Fees_Details cf on sfs.CourseID = cf.CourseID
|
||||
@ -1340,20 +1368,21 @@ class Fees_status_model extends CI_Model
|
||||
if(($details['FeesType']=='PPC') || ($details['FeesType']=='TC')|| ($details['FeesType']=='MC')|| ($details['FeesType'] == 'DC'))
|
||||
{
|
||||
|
||||
$this->db->select('ListCode');
|
||||
$this->db->from('T_PickListDetails');
|
||||
$this->db->where('ListName','EXPECTED');
|
||||
$this->db->where('BranchCode',$details['BranchCode']);
|
||||
// $this->db->select('ListCode');
|
||||
// $this->db->from('T_PickListDetails');
|
||||
// $this->db->where('ListName','EXPECTED');
|
||||
// $this->db->where('BranchCode',$details['BranchCode']);
|
||||
|
||||
$searchDetails = $this->db->get();
|
||||
$getId=$searchDetails->result();
|
||||
// $searchDetails = $this->db->get();
|
||||
// $getId=$searchDetails->result();
|
||||
|
||||
$listcode='';
|
||||
// $listcode='';
|
||||
|
||||
foreach($getId as $ge)
|
||||
{
|
||||
$listcode=$ge->ListCode;
|
||||
}
|
||||
// foreach($getId as $ge)
|
||||
// {
|
||||
// $listcode=$ge->ListCode;
|
||||
// }
|
||||
$listcode=FEESUPDATE;
|
||||
|
||||
$appstatus['StudentID'] = $details['StudentID'];
|
||||
$appstatus['CourseID'] = $details['CourseID'];
|
||||
@ -1370,7 +1399,7 @@ class Fees_status_model extends CI_Model
|
||||
}
|
||||
// update registration details
|
||||
if($jsonData){
|
||||
$this->updateRegistrationDetails($details,$installmentFeesID,$checkwithstatus);
|
||||
$this->updateRegistrationDetails($details,$installmentFeesID,$check);
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -1380,9 +1409,7 @@ class Fees_status_model extends CI_Model
|
||||
* insert registration details while set fees
|
||||
* created by kms
|
||||
* */
|
||||
public function updateRegistrationDetails($details=null,$feesStatusID=null,$checkwithstatus=null){
|
||||
|
||||
|
||||
public function updateRegistrationDetails($details=null,$feesStatusID=null,$check){
|
||||
$regId='';
|
||||
$this->db->select('Student_Fee_Status_Id,RegistrationMode');
|
||||
$this->db->where('CourseID', $details['CourseID']);
|
||||
@ -1435,8 +1462,8 @@ class Fees_status_model extends CI_Model
|
||||
$reRegistartion['StudentID']=$details['StudentID'];
|
||||
$reRegistartion['CourseID']=$details['CourseID'];
|
||||
$reRegistartion['FeeType']=$details['FeesType'];
|
||||
$reRegistartion['RegistrationMode']= ($checkwithstatus!=0) ? 1 : 0;
|
||||
$reRegistartion['RegistrationType']= ($checkwithstatus!=0) ? NEWREGISTRATION_CONST : RE_REGISTRATION_CONST ;
|
||||
$reRegistartion['RegistrationMode']= $check > 0 ? 0 : 1;
|
||||
$reRegistartion['RegistrationType']= $check > 0 ? RE_REGISTRATION_CONST : NEWREGISTRATION_CONST;
|
||||
$reRegistartion['BranchCode']=$details['BranchCode'];
|
||||
$reRegistartion['CreatedBy']=$details['CreatedBy'];
|
||||
$reRegistartion['CreatedOn']=$details['CreatedOn'];
|
||||
@ -1465,13 +1492,13 @@ class Fees_status_model extends CI_Model
|
||||
}
|
||||
|
||||
|
||||
$this->db->select('ListCode');
|
||||
$this->db->from('T_PickListDetails');
|
||||
$this->db->where('ListName','EXPECTED');
|
||||
$this->db->where('BranchCode',$details['BranchCode']);
|
||||
// $this->db->select('ListCode');
|
||||
// $this->db->from('T_PickListDetails');
|
||||
// $this->db->where('ListName','EXPECTED');
|
||||
// $this->db->where('BranchCode',$details['BranchCode']);
|
||||
|
||||
$searchDetails = $this->db->get();
|
||||
$getId=$searchDetails->result();
|
||||
// $searchDetails = $this->db->get();
|
||||
// $getId=$searchDetails->result();
|
||||
|
||||
// $listcode='';
|
||||
// Expected Remove because mentioned ON Apollo XL sheet(30.11.2020)
|
||||
@ -1479,7 +1506,8 @@ class Fees_status_model extends CI_Model
|
||||
// {
|
||||
// $listcode=$ge->ListCode;
|
||||
// }
|
||||
$listcode=null;
|
||||
|
||||
$listcode=FEESUPDATE;
|
||||
|
||||
|
||||
$fromd= date("d-m-Y",strtotime($details['CreatedOn']));
|
||||
@ -1976,7 +2004,7 @@ class Fees_status_model extends CI_Model
|
||||
$this->db->where('ListName','NOT APPLICABLE');
|
||||
}
|
||||
else{
|
||||
$this->db->where('ListName','EXPECTED');
|
||||
$this->db->where('ListName','Fees update Status');
|
||||
}
|
||||
|
||||
$this->db->where('BranchCode',$feesDetails['UpdatedBy']);
|
||||
|
||||
@ -239,17 +239,15 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
|
||||
|
||||
LEFT JOIN (SELECT StudentID AS sid,UniversityID AS uid,CourseID AS cid,EnrollmentID AS eid,BranchID AS branch,ifnull(STATUS,'-') AS coursestatus FROM T_Student_CourseDetails) AS scd
|
||||
|
||||
ON scd.sid=sfs.sid
|
||||
ON scd.sid=sfs.sid AND scd.cid = sfs.cid
|
||||
|
||||
LEFT JOIN (SELECT ID,StudentID AS sid,Sem,
|
||||
LEFT JOIN (SELECT ID,StudentID AS sid,Sem,CourseID,
|
||||
IF(ListName = 'SENT TO UNIVERSITY', AnsDate,'-') AS ansdate,CourierDetails AS courierdetails
|
||||
FROM T_AnswerBookletStatus abs
|
||||
LEFT JOIN T_PickListDetails `list` ON list.ListCode=abs.ListCode
|
||||
WHERE AnsDate IS NOT NULL AND ID IN (SELECT max(ID) FROM T_AnswerBookletStatus WHERE AnsDate IS NOT NULL GROUP BY StudentID,Sem)
|
||||
GROUP BY sid,Sem) AS andate
|
||||
ON andate.sid=sfs.sid AND andate.Sem=cfd.syear
|
||||
|
||||
|
||||
WHERE AnsDate IS NOT NULL AND ID IN (SELECT max(ID) FROM T_AnswerBookletStatus WHERE AnsDate IS NOT NULL GROUP BY StudentID,Sem,CourseID)
|
||||
GROUP BY sid,Sem,CourseID) AS andate
|
||||
ON andate.sid = sfs.sid AND andate.Sem = cfd.syear AND andate.CourseID = sfs.ftype
|
||||
LEFT JOIN (SELECT rd.StudentID AS sid,rd.CourseID AS cid,max(IF(list.ListName = 'SENT TO UNIVERSITY', afs.AppFormDate,'-')) AS appdate,Sem_Year AS sem
|
||||
FROM T_Registration_Details rd
|
||||
LEFT JOIN T_ApplicationFormStatus afs ON afs.Registration_Details_ID=rd.ID
|
||||
@ -272,7 +270,7 @@ left join BalFees bal on bal.student=sms.sid and bal.feestype=sms.cid and bal.se
|
||||
|
||||
}
|
||||
if ($st != ''){
|
||||
if ($st == 'blank'){
|
||||
if ($st == FEESUPDATE){
|
||||
$sql.=" and (list.lcode IS NULL OR list.lcode = '')";}
|
||||
else{ $sql.="and list.lcode = '".$st."'";}
|
||||
}
|
||||
@ -384,122 +382,159 @@ LEFT JOIN
|
||||
FROM T_Student_CourseDetails) AS scd ON scd.sid=sms.sid AND scd.cid=sms.cid
|
||||
where sms.branch = '".$br."'";
|
||||
$sql = "SELECT
|
||||
sfs.sid AS Student_id,
|
||||
sfs.cid,sfs.fid,
|
||||
if(sms.status = '','-',IFNULL(sms.status, '-')) AS STATUS,
|
||||
IFNULL(DATE_FORMAT(sms.adate, '%d-%m-%Y'), '-') AS adate,
|
||||
if(sms.acmts = '','-',IFNULL(sms.acmts, '-')) AS acmts,
|
||||
if(sfs.ftype = '','-',IFNULL(sfs.ftype, '-')) AS ctype,
|
||||
if(sms.certname = '','-',IFNULL(sms.certname, '-')) AS certname,
|
||||
balance,totalpaid,totalpayable,
|
||||
if(sfb.bdate = '','-',IFNULL(sfb.bdate, '-')) AS initialPaid,
|
||||
if(scd.eid = '','-',IFNULL(scd.eid, '-')) AS Enrollment_id,
|
||||
if(std.name = '','-',IFNULL(std.name, '-')) AS Student_name,
|
||||
if(std.father = '','-',IFNULL(std.father, '-')) AS Father_name,
|
||||
if(std.phone = '','-',IFNULL(std.phone, '-')) AS Phone_number,
|
||||
if(cm.course = '','-',IFNULL(cm.course, '-')) AS Course_name,
|
||||
if(cm.uname = '','-',IFNULL(cm.uname, '-')) AS University,
|
||||
if(cm.uid = '','-',cm.uid) AS univID,
|
||||
if(std.address = '','-',IFNULL(std.address, '-')) AS address,
|
||||
if(std.AlternateNumber = '','-',IFNULL(std.AlternateNumber, '')) AS AlternateNumber,
|
||||
if(sfs.batch = '','-',sfs.batch) AS Batch,
|
||||
if(sfs.batchname = '','-',IFNULL(sfs.batchname, '-')) AS Batch_Name,
|
||||
if(scd.coursestatus = '','-',scd.coursestatus) AS Course_Status,
|
||||
if(sms.courierdetails = '','-',IFNULL(sms.courierdetails, '-')) AS Courier_Details
|
||||
sms.sid AS Student_id,
|
||||
sms.cid,
|
||||
sfs.fid,sms.lcode,
|
||||
IF(sms.status = '',
|
||||
'-',
|
||||
IFNULL(sms.status, '-')) AS STATUS,
|
||||
IFNULL(DATE_FORMAT(sms.adate, '%d-%m-%Y'), '-') AS adate,
|
||||
IF(sms.acmts = '',
|
||||
'-',
|
||||
IFNULL(sms.acmts, '-')) AS acmts,
|
||||
IF(sfs.ftype = '',
|
||||
'-',
|
||||
IFNULL(sfs.ftype, '-')) AS ctype,
|
||||
IF(sms.certname = '',
|
||||
'-',
|
||||
IFNULL(sms.certname, '-')) AS certname,
|
||||
balance,
|
||||
totalpaid,
|
||||
totalpayable,
|
||||
IF(sfb.bdate = '',
|
||||
'-',
|
||||
IFNULL(sfb.bdate, '-')) AS initialPaid,
|
||||
IF(scd.eid = '',
|
||||
'-',
|
||||
IFNULL(scd.eid, '-')) AS Enrollment_id,
|
||||
IF(std.name = '',
|
||||
'-',
|
||||
IFNULL(std.name, '-')) AS Student_name,
|
||||
IF(std.father = '',
|
||||
'-',
|
||||
IFNULL(std.father, '-')) AS Father_name,
|
||||
IF(std.phone = '',
|
||||
'-',
|
||||
IFNULL(std.phone, '-')) AS Phone_number,
|
||||
IF(cm.course = '',
|
||||
'-',
|
||||
IFNULL(cm.course, '-')) AS Course_name,
|
||||
IF(cm.uname = '',
|
||||
'-',
|
||||
IFNULL(cm.uname, '-')) AS University,
|
||||
IF(cm.uid = '', '-', cm.uid) AS univID,
|
||||
IF(std.address = '',
|
||||
'-',
|
||||
IFNULL(std.address, '-')) AS address,
|
||||
IF(std.AlternateNumber = '',
|
||||
'-',
|
||||
IFNULL(std.AlternateNumber, '')) AS AlternateNumber,
|
||||
IF(sfs.batch = '', '-', sfs.batch) AS Batch,
|
||||
IF(sfs.batchname = '',
|
||||
'-',
|
||||
IFNULL(sfs.batchname, '-')) AS Batch_Name,
|
||||
IF(scd.coursestatus = '',
|
||||
'-',
|
||||
scd.coursestatus) AS Course_Status,
|
||||
IF(sms.courierdetails = '',
|
||||
'-',
|
||||
IFNULL(sms.courierdetails, '-')) AS Courier_Details
|
||||
FROM (SELECT
|
||||
app.ID,
|
||||
app.StudentID AS sid,
|
||||
app.CourseID AS cid,
|
||||
app.BranchCode AS branch,
|
||||
app.ListCode AS lcode,
|
||||
p.ListName AS STATUS,
|
||||
STR_TO_DATE(AppDate, '%d-%m-%Y') AS adate,
|
||||
app.Comments AS acmts,
|
||||
CertificationType AS ctype,
|
||||
app.CertificationType AS certname,
|
||||
SUM(bal.balpayable) AS balance,
|
||||
bal.totalpaid,
|
||||
bal.totalpayable,
|
||||
app.CourierDetails AS courierdetails
|
||||
FROM
|
||||
(SELECT
|
||||
FeesID AS fid,
|
||||
T_Students_Fees_Status.BatchCode AS batch,
|
||||
T_BatchMaster.BatchName AS batchname,
|
||||
T_Students_Fees_Status.BranchCode AS branch,
|
||||
StudentID AS sid,
|
||||
CourseID AS cid,
|
||||
FeesType AS ftype,
|
||||
SUM(CourseFees) AS cf,
|
||||
SUM(STFOrWR) AS stf,
|
||||
SUM(Others) AS others
|
||||
FROM
|
||||
T_Students_Fees_Status
|
||||
LEFT JOIN T_BatchMaster ON T_BatchMaster.BatchCode = T_Students_Fees_Status.BatchCode
|
||||
GROUP BY sid , cid , fid) AS sfs
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
app.ID,
|
||||
app.StudentID AS sid,
|
||||
app.CourseID AS cid,
|
||||
app.BranchCode AS branch,
|
||||
app.ListCode AS lcode,
|
||||
p.ListName AS STATUS,
|
||||
STR_TO_DATE(AppDate, '%d-%m-%Y') AS adate,
|
||||
app.Comments AS acmts,
|
||||
CertificationType AS ctype,
|
||||
app.CertificationType AS certname,
|
||||
SUM(bal.balpayable) AS balance,bal.totalpaid,bal.totalpayable,
|
||||
app.CourierDetails AS courierdetails
|
||||
FROM
|
||||
T_ApplicationStatus AS app
|
||||
LEFT JOIN T_PickListDetails p ON p.ListCode = app.ListCode
|
||||
LEFT JOIN BalFees bal ON bal.student = app.StudentID
|
||||
AND bal.course = app.CourseID
|
||||
AND bal.feestype = app.CertificationType AND bal.totalpayable is not null
|
||||
WHERE
|
||||
app.CertificationType NOT LIKE 'CERT%'
|
||||
AND app.ID IN (SELECT
|
||||
MAX(ID)
|
||||
FROM
|
||||
T_ApplicationStatus
|
||||
GROUP BY StudentID , CourseID , BranchCode , CertificationType)
|
||||
GROUP BY app.ID) AS sms ON sfs.sid = sms.sid AND sfs.cid = sms.cid
|
||||
AND sfs.ftype = sms.ctype
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
sfp.StudentID AS sid,
|
||||
sfp.FeesId AS fid,
|
||||
sfs.CourseID AS cid,
|
||||
STR_TO_DATE(BillDate, '%d-%m-%Y') AS bdate,
|
||||
SUM(BillAmount) AS bamount,
|
||||
BillNO AS billno
|
||||
FROM
|
||||
T_Students_Fees_PaidDetails sfp
|
||||
LEFT JOIN T_Students_Fees_Status sfs ON sfs.FeesId = sfp.FeesId
|
||||
WHERE
|
||||
IsActive = 1
|
||||
GROUP BY sid , cid , fid) AS sfb ON sfb.sid = sfs.sid AND sfb.fid = sfs.fid
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
T_ApplicationStatus AS app
|
||||
LEFT JOIN T_PickListDetails p ON p.ListCode = app.ListCode
|
||||
LEFT JOIN BalFees bal ON bal.student = app.StudentID
|
||||
AND bal.course = app.CourseID
|
||||
AND bal.feestype = app.CertificationType
|
||||
AND bal.totalpayable IS NOT NULL
|
||||
WHERE
|
||||
app.CertificationType NOT LIKE 'CERT%'
|
||||
AND app.ID IN (SELECT
|
||||
MAX(ID)
|
||||
FROM
|
||||
T_ApplicationStatus
|
||||
GROUP BY StudentID , CourseID , BranchCode , CertificationType)
|
||||
GROUP BY app.ID) AS sms
|
||||
LEFT JOIN (SELECT
|
||||
FeesID AS fid,
|
||||
T_Students_Fees_Status.BatchCode AS batch,
|
||||
T_BatchMaster.BatchName AS batchname,
|
||||
T_Students_Fees_Status.BranchCode AS branch,
|
||||
StudentID AS sid,
|
||||
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 = sfs.cid
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
StudentID AS sid,
|
||||
MobileNumber AS phone,
|
||||
IsActive AS active,
|
||||
CONCAT(FirstName, ' ', Lastname) AS NAME,
|
||||
Fathername AS father,
|
||||
PermanentAddress AS address,
|
||||
AlternateNumber
|
||||
FROM
|
||||
T_StudentDetails) AS std ON std.sid = sfs.sid
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
StudentID AS sid,
|
||||
UniversityID AS uid,
|
||||
CourseID AS cid,
|
||||
EnrollmentID AS eid,
|
||||
BranchID AS branch,
|
||||
IFNULL(Status, '-') AS coursestatus
|
||||
FROM
|
||||
T_Student_CourseDetails) AS scd ON scd.sid = sfs.sid AND scd.cid = sfs.cid
|
||||
where sfs.branch = '".$br."'";
|
||||
FeesType AS ftype,
|
||||
SUM(CourseFees) AS cf,
|
||||
SUM(STFOrWR) AS stf,
|
||||
SUM(Others) AS others
|
||||
FROM
|
||||
T_Students_Fees_Status
|
||||
LEFT JOIN T_BatchMaster ON T_BatchMaster.BatchCode = T_Students_Fees_Status.BatchCode
|
||||
GROUP BY sid , cid , fid) AS sfs ON sfs.sid = sms.sid AND sfs.cid = sms.cid
|
||||
AND sfs.ftype = sms.ctype
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
sfp.StudentID AS sid,
|
||||
sfp.FeesId AS fid,
|
||||
sfs.CourseID AS cid,
|
||||
STR_TO_DATE(BillDate, '%d-%m-%Y') AS bdate,
|
||||
SUM(BillAmount) AS bamount,
|
||||
BillNO AS billno
|
||||
FROM
|
||||
T_Students_Fees_PaidDetails sfp
|
||||
LEFT JOIN T_Students_Fees_Status sfs ON sfs.FeesId = sfp.FeesId
|
||||
WHERE
|
||||
IsActive = 1
|
||||
GROUP BY sid , cid , fid) AS sfb ON sfb.sid = sms.sid AND sfb.fid = sfs.fid
|
||||
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,
|
||||
CONCAT(FirstName, ' ', Lastname) AS NAME,
|
||||
Fathername AS father,
|
||||
PermanentAddress AS address,
|
||||
AlternateNumber
|
||||
FROM
|
||||
T_StudentDetails) AS std ON std.sid = sfs.sid
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
StudentID AS sid,
|
||||
UniversityID AS uid,
|
||||
CourseID AS cid,
|
||||
EnrollmentID AS eid,
|
||||
BranchID AS branch,
|
||||
IFNULL(Status, '-') AS coursestatus
|
||||
FROM
|
||||
T_Student_CourseDetails) AS scd ON scd.sid = sfs.sid AND scd.cid = sfs.cid
|
||||
WHERE
|
||||
sfs.branch = '".$br."'";
|
||||
|
||||
$sql.=" AND (scd.coursestatus IS NULL OR (scd.coursestatus != 'Refund_issued' AND scd.coursestatus != 'Discontinued' AND scd.coursestatus != 'Cancelled'))";
|
||||
if ($bat!= ''){
|
||||
@ -527,18 +562,17 @@ LEFT JOIN
|
||||
|
||||
}
|
||||
if ($st != ''){
|
||||
if($st == "blank"){
|
||||
$sql.=" and (sms.lcode IS NULL OR sms.lcode = '')";
|
||||
if($st == FEESUPDATE){
|
||||
$sql.=" and sms.lcode = '".FEESUPDATE."'";
|
||||
}else{
|
||||
$sql.=" and sms.lcode = '".$st."'";
|
||||
}
|
||||
}
|
||||
$sql.=" and sfs.fid IS not null";
|
||||
$sql.=" group by Student_id,cid,ctype";
|
||||
$sql.=" group by Student_id,cid,fid,ctype";
|
||||
$sql.=" ORDER BY sfb.bdate ASC";
|
||||
//echo $sql;
|
||||
|
||||
// print_r($sql);die();
|
||||
|
||||
$leadDet=$this->db->query($sql);
|
||||
$cert_statusDetails = $leadDet->result();
|
||||
@ -964,7 +998,7 @@ APFS.ID AS id,
|
||||
CFD.Sem_Year AS Sem_Year,
|
||||
RD.RegistrationType AS FormType,
|
||||
STU.StudentID AS Student_id,
|
||||
IFNULL(sfs.RollNo, '-') AS StudentRollNo,
|
||||
IF(sfs.RollNo!='',sfs.RollNo,IFNULL(sfs.RollNo,'-')) AS StudentRollNo,
|
||||
IFNULL(STU_COUR.Status, '-') AS StuCourStatus,
|
||||
BALFEE.totalpayable AS CourseFees,
|
||||
BALFEE.totalpaid AS paidAmount,
|
||||
@ -979,7 +1013,7 @@ LEFT JOIN T_Student_CourseDetails AS STU_COUR ON STU_COUR.StudentID = sfs.Studen
|
||||
AND STU_COUR.CourseID = sfs.CourseID
|
||||
LEFT JOIN T_Course_Fees_Details AS CFD ON CFD.ID = sfs.FeesType
|
||||
LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||
LEFT JOIN BalFees AS BALFEE ON BALFEE.student = sfs.StudentID AND BALFEE.totalpayable is not null
|
||||
LEFT JOIN BalFees AS BALFEE ON BALFEE.student = sfs.StudentID AND BALFEE.feestype = sfs.FeesType AND BALFEE.totalpayable is not null
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
FeesId AS FeeID,
|
||||
|
||||
@ -1058,6 +1058,7 @@ $this->db->insert_batch('T_BroadcastStatus', $data);
|
||||
// $searchTableFor = APPLICATION_FORM;
|
||||
$this->db->select('t1.ID, t1.Student_Fee_Status_Id, t1.BatchCode, t1.FeeType as SemID, CFD.Sem_Year as Sem_Year, t1.RegistrationMode, t1.RegistrationType,BM.BatchName,t1.CreatedOn');
|
||||
$this->db->from('T_Registration_Details as t1');
|
||||
$this->db->join('T_Students_Fees_Status as SFS', 'SFS.FeesID = t1.Student_Fee_Status_Id');
|
||||
$this->db->join('T_Course_Fees_Details as CFD', 'CFD.ID = t1.FeeType');
|
||||
$this->db->join('T_BatchMaster as BM', 'BM.BatchCode = t1.BatchCode');
|
||||
$this->db->where('t1.StudentID', $studentId);
|
||||
|
||||
@ -400,7 +400,7 @@ app.controller('certificateStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
this.SDate = $scope.myStatusModel.dateOn;
|
||||
this.Coursedetail = id;
|
||||
this.Comments = $scope.myStatusModel.comment;
|
||||
this.CourierDetails = $scope.myStatusModel.CourierDetails;
|
||||
this.CourierDetails = $scope.myStatusModel.CourierDetails.replace('/\n\r?/g', '<br />');
|
||||
this.CertificateType = $scope.myStatusModel.certificatetype;
|
||||
this.CertificateNumber = $scope.myStatusModel.certificateNumber;
|
||||
}
|
||||
|
||||
@ -184,8 +184,7 @@
|
||||
<!--<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Phone_number}}</a></td>-->
|
||||
<td>{{p.University}}</td>
|
||||
<td>{{p.FormType}}</td>
|
||||
<td>{{p.StatusName}}</td>
|
||||
|
||||
<td>{{p.StatusCode === "U001" ? "-" : p.StatusName}}</td>
|
||||
<td>{{p.StatusUpdationOn}}</td>
|
||||
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ td,th {
|
||||
<!-- <td>{{p.Sem_year}}</td> -->
|
||||
<td>{{p.University}}</td>
|
||||
<td style="text-align:right;">{{p.balance || "0"}}</td>
|
||||
<td>{{p.STATUS}}</td>
|
||||
<td>{{p.lcode === "U001" ? "-" : p.STATUS}}</td>
|
||||
<td>{{p.certname}}</td>
|
||||
<td>{{p.Courier_Details}}</td>
|
||||
<td style="max-width: 120px;white-space: pre-wrap; word-wrap: break-word !important;">{{p.acmts}}</td>
|
||||
|
||||
@ -301,6 +301,7 @@
|
||||
</div>
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.courier_details.$dirty && Form.courier_details.$invalid}">
|
||||
<label>Courier Details</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Courier Details" tabindex="8" class="form-control" name="courier_details" ng-model="myStatusModel.CourierDetails"/>
|
||||
<span class="error text-small block" ng-if="Form.courier_details.$dirty && Form.courier_details.$error.pattern">Invalid Details</span>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user