diff --git a/Apollo/api/application/controllers/Report.php b/Apollo/api/application/controllers/Report.php index d75c01ae..e22bc187 100755 --- a/Apollo/api/application/controllers/Report.php +++ b/Apollo/api/application/controllers/Report.php @@ -501,6 +501,9 @@ class Report extends REST_Controller { $det['from'] = $this->post('from'); $det['to'] = $this->post('to'); $det['university'] = $this->post('university'); + $det['branchId'] = $this->post('branchId'); + + $feelist = $this->report_model->GetFeePaidDetails($det); diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index b2add3cf..ce1b757d 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -1167,7 +1167,7 @@ $query = $this->db->query($subQuery,array()); $fromd= date("Y-m-d",strtotime($start_date)); $tod=date("Y-m-d",strtotime($end_date)); - //echo $det['university'];die() ; + //echo $det['branchId'];die() ; $this->db->select('d.UniversityID,UniversityName, sum(IF(ModeOfPayment ="CASH", BillAmount, 0)) AS Cash, @@ -1191,6 +1191,8 @@ $query = $this->db->query($subQuery,array()); $this->db->where("date_format(a.CreatedOn,'%Y-%m-%d')<=",date('Y-m-d', strtotime($end_date))); + $this->db->where('d.BranchCode',$det['branchId']); + $this->db->where('a.IsActive','1'); @@ -1219,8 +1221,8 @@ if($feeDetails) } - //print_r( $this->db->last_query()); - //die(); + // print_r( $this->db->last_query()); + // die(); return $result_array; diff --git a/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js index 1f173a6b..a4c0e6e7 100644 --- a/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js +++ b/Apollo/assets/js/controllers/FeeCollected_reportCtrl.js @@ -91,6 +91,8 @@ $scope.universityId=''; $scope.getDetails = function (form,myModel) { +// console.log(JSON.parse(localStorage.getItem('localObj')).localBranchID); +// return false; var firstError = null; if (form.$invalid) { @@ -161,7 +163,8 @@ $scope.tod = to_dt; data: { university: $scope.universityId, from : $scope.filters.from_date , - to : $scope.filters.to_date + to : $scope.filters.to_date, + branchId: JSON.parse(localStorage.getItem('localObj')).localBranchID } }