From cb1055d9442c54add078b832a692f70b24a100bc Mon Sep 17 00:00:00 2001 From: velz Date: Mon, 25 Jun 2018 10:40:56 +0530 Subject: [PATCH] PROMOTE BATCH ISSUE FIXED:VELZ --- Apollo/api/application/models/Reregister_model.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Apollo/api/application/models/Reregister_model.php b/Apollo/api/application/models/Reregister_model.php index 3d922935..22426397 100644 --- a/Apollo/api/application/models/Reregister_model.php +++ b/Apollo/api/application/models/Reregister_model.php @@ -67,7 +67,7 @@ class Reregister_model extends CI_Model { - $sql = "SELECT * FROM apollod4_ApolloDECDev.T_BatchMaster where isActive = 1 and UniversityID = ? and BranchCode = ? and str_to_date(BatchDate,'%d-%m-%Y') > str_to_date(?,'%d-%m-%Y') order by str_to_date(BatchDate,'%d-%m-%Y') asc limit 1"; + $sql = "SELECT * FROM T_BatchMaster where isActive = 1 and UniversityID = ? and BranchCode = ? and str_to_date(BatchDate,'%d-%m-%Y') > str_to_date(?,'%d-%m-%Y') order by str_to_date(BatchDate,'%d-%m-%Y') asc limit 1"; $res2 = $this->db->query($sql,array($UID['universityID'],$branchId,date_format(date_create($batchDate),'d-m-Y'))); $data['nextBatch'] = $res2->result(); @@ -126,7 +126,9 @@ class Reregister_model extends CI_Model $sql = "SELECT ID,FeesAmount FROM T_Course_Fees_Details where CourseID = ? and ProgramType = 'Y001' and FeesType = 'F002' and Sem_Year like ?"; $res = $this->db->query($sql,array($student->CourseID,$sem)); $res = $res->result_array(); - + + if(!empty($res)) + { $feesID = $res[0]['ID']; $feesAmount = $res[0]['FeesAmount']; @@ -174,7 +176,7 @@ class Reregister_model extends CI_Model } - + } return $data;