setFeesForStudent : ps
This commit is contained in:
parent
ad714f5db3
commit
1be9249ef4
@ -255,7 +255,6 @@ class Fees_Status_Controller extends REST_Controller {
|
||||
$details['BranchCode'] = $this->post('branchCode');
|
||||
$details['Comments'] = $this->post('comments');
|
||||
$jsonInstallmenData = $this->post('installmentItems');
|
||||
//print_r($details);
|
||||
$updateDetails = $this->Fees_model->setFees($details,$jsonInstallmenData);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
|
||||
|
||||
|
||||
@ -1196,38 +1196,34 @@ class Fees_status_model extends CI_Model
|
||||
* */
|
||||
public function setFees($details=null,$jsonData=null){
|
||||
|
||||
// echo 'i am Here';
|
||||
// echo 'Set Fee Function ** ';
|
||||
// print_r($details);
|
||||
// print_r($jsonData);
|
||||
// die();
|
||||
|
||||
$RollNo= $details['RollNo'];
|
||||
|
||||
|
||||
//Existing Or Not using RollNo
|
||||
if($RollNo !='')
|
||||
{
|
||||
|
||||
if($RollNo !='')
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Students_Fees_Status');
|
||||
$this->db->where('RollNo',$RollNo);
|
||||
$this->db->where('CourseID',$details['CourseID']);
|
||||
$this->db->where('StudentID !=',$details['StudentID']);
|
||||
$qry=$this->db->get();
|
||||
$qry=$qry->result();
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from('T_Students_Fees_Status');
|
||||
$this->db->where('RollNo',$RollNo);
|
||||
$this->db->where('CourseID',$details['CourseID']);
|
||||
$this->db->where('StudentID !=',$details['StudentID']);
|
||||
$qry=$this->db->get();
|
||||
$qry=$qry->result();
|
||||
if(count($qry)>0)
|
||||
{
|
||||
$result['setStatus'] = false;
|
||||
$result['message'] = "RollNo Already Exists";
|
||||
|
||||
//print_r($this->db->last_query());die();
|
||||
//echo count($qry);die();
|
||||
return $result;
|
||||
|
||||
if(count($qry)>0)
|
||||
{
|
||||
$result['setStatus'] = false;
|
||||
$result['message'] = "RollNo Already Exists";
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1236,6 +1232,13 @@ if(count($qry)>0)
|
||||
$this->db->where('StudentID', $details['StudentID']);
|
||||
$this->db->where('FeesType', $details['FeesType']);
|
||||
$checkExist=$this->db->get(STUDENTS_FEES_STATUS);
|
||||
$checkwithstatus = count($checkExist->result())<=0;
|
||||
|
||||
// select cf.Sem_Year
|
||||
// from T_Students_Fees_Status sfs
|
||||
// left join T_Course_Fees_Details cf on sfs.CourseID = cf.CourseID
|
||||
// where sfs.StudentID = 4101 and cf.CourseID = 22 and cf.ID =748;
|
||||
// If $checkExist->result() has value means Updating the Details. No Value means Inserting (in else part)
|
||||
if($checkExist->result()){
|
||||
$feesId = $checkExist->result();
|
||||
$updateDetails['CourseFees'] = $details['CourseFees'];
|
||||
@ -1285,6 +1288,7 @@ if(count($qry)>0)
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
$this->db->insert(STUDENTS_FEES_STATUS, $details);
|
||||
|
||||
$this->db->select('FeesID,BatchCode,StudentID,CourseID,FeesType');
|
||||
@ -1331,45 +1335,42 @@ if(count($qry)>0)
|
||||
|
||||
}
|
||||
|
||||
$fromd= date("d-m-Y",strtotime($details['CreatedOn']));
|
||||
$fromd= date("d-m-Y",strtotime($details['CreatedOn']));
|
||||
|
||||
if(($details['FeesType']=='PPC') || ($details['FeesType']=='TC')|| ($details['FeesType']=='MC')|| ($details['FeesType'] == 'DC'))
|
||||
{
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// Expected Remove because mentioned ON Apollo XL sheet(30.11.2020)
|
||||
// foreach($getId as $ge)
|
||||
// {
|
||||
// $listcode=$ge->ListCode;
|
||||
// }
|
||||
|
||||
$appstatus['StudentID'] = $details['StudentID'];
|
||||
$appstatus['CourseID'] = $details['CourseID'];
|
||||
$appstatus['BranchCode'] = $details['BranchCode'];
|
||||
$appstatus['ListCode'] = $listcode;
|
||||
$appstatus['AppDate'] = $fromd;
|
||||
$appstatus['Comments'] = 'Fees for the student has been set';
|
||||
$appstatus['CreatedBy']= $details['CreatedBy'];
|
||||
$appstatus['CreatedOn'] = $details['CreatedOn'];
|
||||
$appstatus['CertificationType'] =$details['FeesType'];
|
||||
$this->db->insert('T_ApplicationStatus', $appstatus);
|
||||
$appstatus['StudentID'] = $details['StudentID'];
|
||||
$appstatus['CourseID'] = $details['CourseID'];
|
||||
$appstatus['BranchCode'] = $details['BranchCode'];
|
||||
$appstatus['ListCode'] = $listcode;
|
||||
$appstatus['AppDate'] = $fromd;
|
||||
$appstatus['Comments'] = 'Fees for the student has been set';
|
||||
$appstatus['CreatedBy']= $details['CreatedBy'];
|
||||
$appstatus['CreatedOn'] = $details['CreatedOn'];
|
||||
$appstatus['CertificationType'] =$details['FeesType'];
|
||||
$this->db->insert('T_ApplicationStatus', $appstatus);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
// update registration details
|
||||
if($jsonData){
|
||||
$this->updateRegistrationDetails($details,$installmentFeesID);
|
||||
$this->updateRegistrationDetails($details,$installmentFeesID,$checkwithstatus);
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -1379,7 +1380,7 @@ if(($details['FeesType']=='PPC') || ($details['FeesType']=='TC')|| ($details['Fe
|
||||
* insert registration details while set fees
|
||||
* created by kms
|
||||
* */
|
||||
public function updateRegistrationDetails($details=null,$feesStatusID=null){
|
||||
public function updateRegistrationDetails($details=null,$feesStatusID=null,$checkwithstatus=null){
|
||||
|
||||
|
||||
$regId='';
|
||||
@ -1387,21 +1388,28 @@ if(($details['FeesType']=='PPC') || ($details['FeesType']=='TC')|| ($details['Fe
|
||||
$this->db->where('CourseID', $details['CourseID']);
|
||||
$this->db->where('StudentID', $details['StudentID']);
|
||||
$checkCourseFees=$this->db->get(REGISTRATIONDETAILS);
|
||||
if($checkCourseFees->num_rows()<=0){
|
||||
// insert registration details table
|
||||
|
||||
// $regId= $feesStatusID;
|
||||
$inserRegistartion['Student_Fee_Status_Id']=$feesStatusID;
|
||||
$inserRegistartion['BatchCode']=$details['BatchCode'];
|
||||
$inserRegistartion['StudentID']=$details['StudentID'];
|
||||
$inserRegistartion['CourseID']=$details['CourseID'];
|
||||
$inserRegistartion['FeeType']=$details['FeesType'];
|
||||
$inserRegistartion['RegistrationMode']=1;
|
||||
$inserRegistartion['RegistrationType']=NEWREGISTRATION_CONST;
|
||||
$inserRegistartion['BranchCode']=$details['BranchCode'];
|
||||
$inserRegistartion['CreatedBy']=$details['CreatedBy'];
|
||||
$inserRegistartion['CreatedOn']=$details['CreatedOn'];
|
||||
$getlastid= $this->db->insert(REGISTRATIONDETAILS, $inserRegistartion);
|
||||
// $sql = "select cf.Sem_Year
|
||||
// from T_Students_Fees_Status sfs
|
||||
// left join T_Course_Fees_Details cf on sfs.CourseID = cf.CourseID
|
||||
// where sfs.StudentID = ? and cf.CourseID = ? and cf.ID = ?" ;
|
||||
// $late = $this->db->query($sql);
|
||||
|
||||
if($checkCourseFees->num_rows()<=0){
|
||||
// insert registration details table
|
||||
|
||||
// $regId= $feesStatusID;
|
||||
$inserRegistartion['Student_Fee_Status_Id']=$feesStatusID;
|
||||
$inserRegistartion['BatchCode']=$details['BatchCode'];
|
||||
$inserRegistartion['StudentID']=$details['StudentID'];
|
||||
$inserRegistartion['CourseID']=$details['CourseID'];
|
||||
$inserRegistartion['FeeType']=$details['FeesType'];
|
||||
$inserRegistartion['RegistrationMode']=1;
|
||||
$inserRegistartion['RegistrationType']=NEWREGISTRATION_CONST;
|
||||
$inserRegistartion['BranchCode']=$details['BranchCode'];
|
||||
$inserRegistartion['CreatedBy']=$details['CreatedBy'];
|
||||
$inserRegistartion['CreatedOn']=$details['CreatedOn'];
|
||||
$getlastid= $this->db->insert(REGISTRATIONDETAILS, $inserRegistartion);
|
||||
|
||||
|
||||
}
|
||||
@ -1415,32 +1423,30 @@ if(($details['FeesType']=='PPC') || ($details['FeesType']=='TC')|| ($details['Fe
|
||||
$updateRegistration['UpdatedBy']=$details['CreatedBy'];
|
||||
$updateRegistration['UpdatedOn']=$details['CreatedOn'];
|
||||
$this->db->where('Student_Fee_Status_Id',$feesStatusID);
|
||||
$getlastid= $this->db->update(REGISTRATIONDETAILS, $updateRegistration);
|
||||
$getlastid= $this->db->update(REGISTRATIONDETAILS, $updateRegistration);
|
||||
|
||||
|
||||
// $regId= $feesStatusID;
|
||||
|
||||
|
||||
|
||||
// $regId= $feesStatusID;
|
||||
}
|
||||
else{
|
||||
|
||||
$reRegistartion['Student_Fee_Status_Id']=$feesStatusID;
|
||||
$reRegistartion['BatchCode']=$details['BatchCode'];
|
||||
$reRegistartion['StudentID']=$details['StudentID'];
|
||||
$reRegistartion['CourseID']=$details['CourseID'];
|
||||
$reRegistartion['FeeType']=$details['FeesType'];
|
||||
$reRegistartion['RegistrationMode']=0;
|
||||
$reRegistartion['RegistrationType']=RE_REGISTRATION_CONST;
|
||||
$reRegistartion['RegistrationMode']= ($checkwithstatus!=0) ? 1 : 0;
|
||||
$reRegistartion['RegistrationType']= ($checkwithstatus!=0) ? NEWREGISTRATION_CONST : RE_REGISTRATION_CONST ;
|
||||
$reRegistartion['BranchCode']=$details['BranchCode'];
|
||||
$reRegistartion['CreatedBy']=$details['CreatedBy'];
|
||||
$reRegistartion['CreatedOn']=$details['CreatedOn'];
|
||||
$getlastid= $this->db->insert(REGISTRATIONDETAILS, $reRegistartion);
|
||||
$getlastid= $this->db->insert(REGISTRATIONDETAILS, $reRegistartion);
|
||||
|
||||
// $regId= $feesStatusID;
|
||||
}
|
||||
}
|
||||
|
||||
$REGID='';
|
||||
$REGID='';
|
||||
if($getlastid)
|
||||
{
|
||||
$this->db->select('max(ID) as ID');
|
||||
@ -1459,11 +1465,6 @@ $REGID='';
|
||||
}
|
||||
|
||||
|
||||
// print_r($getlastid);
|
||||
|
||||
|
||||
// echo 'in';
|
||||
// die();
|
||||
$this->db->select('ListCode');
|
||||
$this->db->from('T_PickListDetails');
|
||||
$this->db->where('ListName','EXPECTED');
|
||||
@ -1472,17 +1473,16 @@ $REGID='';
|
||||
$searchDetails = $this->db->get();
|
||||
$getId=$searchDetails->result();
|
||||
|
||||
$listcode='';
|
||||
|
||||
foreach($getId as $ge)
|
||||
{
|
||||
$listcode=$ge->ListCode;
|
||||
}
|
||||
|
||||
// $listcode='';
|
||||
// Expected Remove because mentioned ON Apollo XL sheet(30.11.2020)
|
||||
// foreach($getId as $ge)
|
||||
// {
|
||||
// $listcode=$ge->ListCode;
|
||||
// }
|
||||
$listcode=null;
|
||||
|
||||
|
||||
|
||||
$fromd= date("d-m-Y",strtotime($details['CreatedOn']));
|
||||
$fromd= date("d-m-Y",strtotime($details['CreatedOn']));
|
||||
|
||||
$upappform['BranchCode']=$details['BranchCode'];
|
||||
$upappform['AppFormDate']=$fromd;
|
||||
|
||||
@ -37,7 +37,8 @@ class Student_model extends CI_Model {
|
||||
}
|
||||
public function get_student_tracking_details($universityid,$courseid,$MobileNumber,$loginBranch,$userType,$createdBy)
|
||||
{
|
||||
|
||||
// echo $universityid.'-'.$courseid.'-'.$MobileNumber.'-'.$loginBranch.'-'.$userType.'-'.$createdBy;
|
||||
// die();
|
||||
$sql="SELECT LTF.FollowupOn,LD.LeadID,LTF.InteractionId, LD.LeadName,LD.MobileNumber,LD.IsNewEnquiry, LT.TrackingID, LT.ActivityStatus,LT.AssignedTo, LT.StatusCode, LT.University, LT.Course, LT.AlternateMobile, LT.Address,LT.Flag, ST.StaffID, ST.Firstname, PLD1.ListCode as statusListCode, PLD1.ListName as statusListName, AV.ActivityID ,AV.ActivityName, LTF.FollowupComments
|
||||
FROM T_Lead_Tracking_Followup as LTF
|
||||
JOIN T_Lead_Tracking as LT ON LT.TrackingID=LTF.TrackingID
|
||||
@ -73,11 +74,13 @@ class Student_model extends CI_Model {
|
||||
|
||||
// }
|
||||
$sql.=" group by LTF.TrackingID";
|
||||
print_r($sql);
|
||||
die();
|
||||
// print_r($sql);
|
||||
// die();
|
||||
$b=$this->db->query($sql);
|
||||
$trackingDetails = $b->result();
|
||||
$result =$trackingDetails;
|
||||
$result =$trackingDetails;
|
||||
// print_r($result);
|
||||
// die();
|
||||
return $result;
|
||||
}
|
||||
// get student list based on login user
|
||||
@ -1916,7 +1919,7 @@ if(count($qry)>0)
|
||||
$this->db->from('T_BroadcastStatus');
|
||||
$this->db->like('MobileNumber', $det['Phone'], 'before');
|
||||
$messagedet = $this->db->get();
|
||||
|
||||
|
||||
if($messagedet ->result())
|
||||
{
|
||||
|
||||
@ -1934,7 +1937,7 @@ if(count($qry)>0)
|
||||
$this->db->from('T_BroadcastStatus');
|
||||
$this->db->where('MobileNumber', $det['Email']);
|
||||
$maildet = $this->db->get();
|
||||
|
||||
|
||||
|
||||
if($maildet ->result())
|
||||
{
|
||||
|
||||
@ -507,6 +507,7 @@ class Studentview_model extends CI_Model
|
||||
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = SMS.ListCode');
|
||||
$this->db->where('CU.CourseID', $courseID);
|
||||
$this->db->where('SMS.StudentID', $studentID);
|
||||
// $this->db->group_by('SMS.ID');
|
||||
$this->db->order_by('SMS.ID', 'DESC');
|
||||
$getMaterialDetails = $this->db->get();
|
||||
if ($getMaterialDetails->result()){
|
||||
@ -533,6 +534,7 @@ class Studentview_model extends CI_Model
|
||||
$this->db->where('CU.CourseID', $courseID);
|
||||
$this->db->where('AS.StudentID', $studentID);
|
||||
$this->db->where('CM.CertificateName !=', APPLICATION_CONST);
|
||||
$this->db->group_by('AS.ID');
|
||||
$this->db->order_by('AS.ID', 'DESC');
|
||||
$getCertDetails = $this->db->get();
|
||||
|
||||
@ -589,8 +591,10 @@ class Studentview_model extends CI_Model
|
||||
$this->db->where('CU.CourseID', $courseID);
|
||||
$this->db->where('CS.StudentID', $studentID);
|
||||
$this->db->where_in('CS.CertificationType', 'MARK CARD');
|
||||
$this->db->group_by('CS.ID');
|
||||
$this->db->order_by('CS.ID', 'DESC');
|
||||
$getMarkDetails = $this->db->get();
|
||||
// print_r($this->db->last_query());die();
|
||||
if ($getMarkDetails->result()){
|
||||
return $getMarkDetails->result();
|
||||
}
|
||||
@ -610,6 +614,7 @@ class Studentview_model extends CI_Model
|
||||
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = ABT.ListCode');
|
||||
$this->db->where('CU.CourseID', $courseID);
|
||||
$this->db->where('ABT.StudentID', $studentID);
|
||||
// $this->db->group_by('ABT.ID');
|
||||
$this->db->order_by('ABT.ID', 'DESC');
|
||||
$getBookletDetails = $this->db->get();
|
||||
if ($getBookletDetails->result()){
|
||||
|
||||
@ -416,7 +416,8 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="booklet in course.answerbookletDetails | unique:'Sem'">
|
||||
<!-- <tr ng-repeat="booklet in course.answerbookletDetails | unique:'Sem'"> -->
|
||||
<tr ng-repeat="booklet in course.answerbookletDetails | unique:'Sem'">
|
||||
<td>
|
||||
<span>{{booklet.AnsDate}}</span>
|
||||
</td>
|
||||
@ -467,6 +468,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="cert in course.certificateDetails | unique:'CertificateName'">
|
||||
<!-- <tr ng-repeat="cert in course.certificateDetails'"> -->
|
||||
<!-- <td>
|
||||
<span>{{cert.Sem_Year}}</span>
|
||||
</td>-->
|
||||
@ -518,8 +520,10 @@
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ng-if="course.markCardDetails.length!=0 && course.markCardDetails[0].FeesType=='F001'">
|
||||
<tr ng-repeat="mark in course.markCardDetails | unique:'Sem'">
|
||||
<!-- <tbody ng-if="course.markCardDetails.length!=0 && course.markCardDetails[0].FeesType=='F001'">-->
|
||||
<!-- <tr ng-repeat="mark in course.markCardDetails | unique:'Sem'"> -->
|
||||
<tbody ng-if="course.markCardDetails.length!=0">
|
||||
<tr ng-repeat="mark in course.markCardDetails'">
|
||||
<td>
|
||||
<span>{{mark.CDate}}</span>
|
||||
</td>
|
||||
@ -541,7 +545,7 @@
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<tbody ng-if="course.markCardDetails.length!=0 && course.markCardDetails[0].FeesType!='F001'">
|
||||
<!-- <tbody ng-if="course.markCardDetails.length!=0 && course.markCardDetails[0].FeesType!='F001'">
|
||||
<tr ng-repeat="mark in course.markCardDetails | unique:'CourseID'">
|
||||
<td>
|
||||
<span>{{mark.CDate}}</span>
|
||||
@ -550,9 +554,9 @@
|
||||
<td>
|
||||
<span>{{mark.Sem_Year}}</span>
|
||||
</td>
|
||||
<!--<td>
|
||||
<!-<td>
|
||||
<span>{{mark.CertificateName}}</span>
|
||||
</td>-->
|
||||
</td>->
|
||||
<td>
|
||||
<span>{{mark.ListName}} </span>
|
||||
</td>
|
||||
@ -564,7 +568,7 @@
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</tbody>-->
|
||||
</table>
|
||||
|
||||
<!--
|
||||
@ -594,9 +598,10 @@
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ng-if="course.studyMaterialDetails.length!=0 && course.studyMaterialDetails[0].FeesType=='F001'">
|
||||
<tr ng-repeat="study in course.studyMaterialDetails | unique:'Sem'">
|
||||
|
||||
<!-- <tbody ng-if="course.studyMaterialDetails.length!=0 && course.studyMaterialDetails[0].FeesType=='F001'">
|
||||
<tr ng-repeat="study in course.studyMaterialDetails | unique:'Sem'"> -->
|
||||
<tbody ng-if="course.studyMaterialDetails.length!=0">
|
||||
<tr ng-repeat="study in course.studyMaterialDetails">
|
||||
<td>
|
||||
<span>{{study.SDate}}</span>
|
||||
</td>
|
||||
@ -614,7 +619,7 @@
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<tbody ng-if="course.studyMaterialDetails.length!=0 && course.studyMaterialDetails[0].FeesType!='F001'">
|
||||
<!-- <tbody ng-if="course.studyMaterialDetails.length!=0 && course.studyMaterialDetails[0].FeesType!='F001'">
|
||||
<tr ng-repeat="study in course.studyMaterialDetails | unique:'CourseID'">
|
||||
<td>
|
||||
<span>{{study.SDate}}</span>
|
||||
@ -622,8 +627,8 @@
|
||||
|
||||
<td>
|
||||
<span>{{study.Sem_Year}}</span></td>
|
||||
<!--<td>
|
||||
<span>{{study.SDate}}</span></td>-->
|
||||
<!-<td>
|
||||
<span>{{study.SDate}}</span></td>->
|
||||
<td>
|
||||
<span>{{study.ListName}} </span>
|
||||
</td>
|
||||
@ -633,7 +638,7 @@
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</tbody> -->
|
||||
</table>
|
||||
|
||||
<!--
|
||||
|
||||
Loading…
Reference in New Issue
Block a user