Income Expense & certificate type master changes: kdk
This commit is contained in:
parent
0192f7a596
commit
57bd4b9fb0
@ -83,7 +83,8 @@ class Certificate_Controller extends REST_Controller {
|
||||
public function getCertificateDetails_post()
|
||||
{
|
||||
$requestedBy = $this->post('requestedBy');
|
||||
$getCertificate = $this->certificate_model->getCertificate($requestedBy);
|
||||
$requestedBranch = $this->post('reqBrach');
|
||||
$getCertificate = $this->certificate_model->getCertificate($requestedBy, $requestedBranch);
|
||||
|
||||
if ($getCertificate)
|
||||
{
|
||||
|
||||
@ -49,6 +49,7 @@ class DayBookMaster_Controller extends REST_Controller {
|
||||
$details['IsActive'] = $this->post('status');
|
||||
$details['CreatedBy'] = $this->post('createdBy');
|
||||
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
||||
$details['BranchCode'] = $this->post('requestedBranch');
|
||||
$addDetails = $this->daybookmaster_model->addDetails($details);// Check if the users data store contains users (in case the database result returns NULL)
|
||||
if ($addDetails)
|
||||
{
|
||||
@ -74,7 +75,8 @@ class DayBookMaster_Controller extends REST_Controller {
|
||||
public function getDayBookMasterDetails_post()
|
||||
{
|
||||
$requestedBy = $this->post('requestedBy');
|
||||
$getdetails = $this->daybookmaster_model->getDayBookDetails($requestedBy);
|
||||
$requestedBranch = $this->post('requestedBranch');
|
||||
$getdetails = $this->daybookmaster_model->getDayBookDetails($requestedBy, $requestedBranch);
|
||||
|
||||
if ($getdetails)
|
||||
{
|
||||
|
||||
@ -40,7 +40,7 @@ class StatusUpdation_Controller extends REST_Controller {
|
||||
$loginUserId = $reqData['localUserID'];
|
||||
$loginUserBranchId = $reqData['localBranchID'];
|
||||
$loginUserType = $reqData['localType'];
|
||||
$getUniversityListDetails = $this->statusupdation_model->get_university_course_batch();// Check if the employee exist
|
||||
$getUniversityListDetails = $this->statusupdation_model->get_university_course_batch($loginUserBranchId);// Check if the employee exist
|
||||
if ($getUniversityListDetails)
|
||||
{
|
||||
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -109,7 +109,7 @@ class Student_Controller extends REST_Controller {
|
||||
$loginUserId = $reqData['localUserID'];
|
||||
$loginUserBranchId = $reqData['localBranchID'];
|
||||
$loginUserType = $reqData['localType'];
|
||||
$getUniversityListDetails = $this->student_model->get_university_list();// Check if the employee exist
|
||||
$getUniversityListDetails = $this->student_model->get_university_list($loginUserBranchId);// Check if the employee exist
|
||||
if ($getUniversityListDetails)
|
||||
{
|
||||
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
@ -524,7 +524,9 @@ class Student_Controller extends REST_Controller {
|
||||
|
||||
public function getCourseBatch_post() {
|
||||
$data = $this->post('data');
|
||||
$getCourseBatchListDetails = $this->student_model->get_courseBatch_list($data);// Check if the employee exist
|
||||
$reqDetails = $this->post('reqDetails');
|
||||
|
||||
$getCourseBatchListDetails = $this->student_model->get_courseBatch_list($data, $reqDetails['localBranchID']);// Check if the employee exist
|
||||
if ($getCourseBatchListDetails)
|
||||
{
|
||||
$getCourseBatchListDetails['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -47,9 +47,10 @@ class Certificate_model extends CI_Model {
|
||||
* parama id
|
||||
* created by Surendiran
|
||||
* */
|
||||
public function getCertificate()
|
||||
public function getCertificate($reqBy, $reqBranch)
|
||||
{
|
||||
$this->db->select('CertificationID,CertificateName,CreatedOn,IsActive');
|
||||
$this->db->where('BranchCode', $reqBranch);
|
||||
$this->db->order_by('CertificationID','DESC');
|
||||
$certificateDetails = $this->db->get(CERTIFICATION_MASTER);
|
||||
if($certificateDetails->result()){
|
||||
|
||||
@ -19,6 +19,7 @@ class DaybookMaster_model extends CI_Model {
|
||||
$this->db->select('TypeName');
|
||||
$this->db->where('TypeName', $arrayDetails['TypeName']);
|
||||
$this->db->where('TypeID', $arrayDetails['TypeID']);
|
||||
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
|
||||
if($this->db->get(INCOMEOUTCOMEMASTER)->first_row()){
|
||||
$result['addStatus'] = false;
|
||||
$result['message'] = "Name is already exist!";
|
||||
@ -34,10 +35,6 @@ class DaybookMaster_model extends CI_Model {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
@ -49,15 +46,16 @@ class DaybookMaster_model extends CI_Model {
|
||||
* created by kms
|
||||
* */
|
||||
|
||||
public function getDayBookDetails($requestedBy=null)
|
||||
public function getDayBookDetails($requestedBy=null, $requestedBranch = null)
|
||||
{
|
||||
$this->db->select('IOM.ID,IOM.TypeName,IOM.TypeID,IOM.IsActive,PLD.ListName');
|
||||
|
||||
|
||||
$this->db->from(INCOMEOUTCOMEMASTER .' as IOM');
|
||||
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = IOM.TypeID');
|
||||
$this->db->where('IOM.BranchCode', $requestedBranch);
|
||||
$this->db->order_by('IOM.ID','DESC');
|
||||
$details = $this->db->get();
|
||||
if($details->result()){
|
||||
if($details->result()){
|
||||
|
||||
$result['daybookStatus'] = true;
|
||||
$result['details'] = $details->result();
|
||||
@ -106,11 +104,7 @@ class DaybookMaster_model extends CI_Model {
|
||||
$result['updateStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -495,10 +495,11 @@ class StatusUpdation_model extends CI_Model
|
||||
}
|
||||
|
||||
// get list of universities, course, batch
|
||||
public function get_university_course_batch() {
|
||||
public function get_university_course_batch($branch) {
|
||||
$this->db->select('t1.UniversityID, t1.UniversityName');
|
||||
$this->db->order_by('CreatedOn', 'DESC');
|
||||
$this->db->from(''.UNIVERSITY. ' as t1');
|
||||
$this->db->where('BranchCode', $branch);
|
||||
$this->db->where('IsActive', 1);
|
||||
// $this->db->join('' . COURSE . ' as t2', 't2.UniversityID = t1.UniversityID', 'LEFT');
|
||||
$univDetails = $this->db->get();
|
||||
@ -513,6 +514,7 @@ class StatusUpdation_model extends CI_Model
|
||||
$this->db->from(''.COURSE. ' as t2');
|
||||
$this->db->where('t2.UniversityID', $clip->UniversityID);
|
||||
$this->db->where('t2.IsActive', 1);
|
||||
$this->db->where('BranchCode', $branch);
|
||||
$courDetails = $this->db->get();
|
||||
$courseDetails = $courDetails->result();
|
||||
$resultArr['Course'] =$courseDetails;
|
||||
@ -521,7 +523,8 @@ class StatusUpdation_model extends CI_Model
|
||||
$this->db->from(''.BATCH. ' as t3');
|
||||
$this->db->where('t3.UniversityID', $clip->UniversityID);
|
||||
$this->db->where('t3.IsActive', 1);
|
||||
|
||||
$this->db->where('BranchCode', $branch);
|
||||
|
||||
//Session Details
|
||||
// $this->db->select('B.SessionID, B.SessionName');
|
||||
// $this->db->from(SESSIONMASTER . ' as B');
|
||||
|
||||
@ -496,12 +496,13 @@ class Student_model extends CI_Model
|
||||
|
||||
// get university list
|
||||
|
||||
public function get_university_list()
|
||||
public function get_university_list($branch)
|
||||
{
|
||||
$this->db->select('*');
|
||||
$this->db->order_by('CreatedOn', 'DESC');
|
||||
$this->db->from(UNIVERSITY);
|
||||
$this->db->where('IsActive', 1);
|
||||
$this->db->where('BranchCode', $branch);
|
||||
$univDetails = $this->db->get();
|
||||
$universityDetails = $univDetails->result();
|
||||
if (count($universityDetails) > 0) {
|
||||
@ -518,12 +519,13 @@ class Student_model extends CI_Model
|
||||
|
||||
// get course, batch for university
|
||||
|
||||
public function get_courseBatch_list($univId)
|
||||
public function get_courseBatch_list($univId, $branch)
|
||||
{
|
||||
$this->db->select('C.CourseID, C.CourseName,C.Specilization1,C.Specilization2, C.CourseCode');
|
||||
$this->db->from(COURSE . ' as C');
|
||||
$this->db->where('UniversityID', $univId);
|
||||
$this->db->where('IsActive', 1);
|
||||
$this->db->where('BranchCode', $branch);
|
||||
$courseDetails = $this->db->get();
|
||||
if ($courseDetails->result()) {
|
||||
$this->db->select('B.SessionID, B.SessionName');
|
||||
|
||||
@ -118,7 +118,8 @@ $scope.certificateForm = {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
reqBrach: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -75,7 +75,8 @@ app.controller("dayBookMasterCtrl", ["$scope", "toaster", "$filter", "API_POINTS
|
||||
name: myModel.name,
|
||||
type: myModel.type,
|
||||
status: myModel.switchsetting,
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
requestedBranch: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
}
|
||||
};
|
||||
|
||||
@ -125,7 +126,8 @@ app.controller("dayBookMasterCtrl", ["$scope", "toaster", "$filter", "API_POINTS
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||
requestedBranch: JSON.parse(localStorage.getItem('localObj')).localBranchID
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -393,7 +393,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModelCourse.university
|
||||
data: $scope.myModelCourse.university,
|
||||
reqDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
@ -424,7 +425,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModelCourseAdd.university
|
||||
data: $scope.myModelCourseAdd.university,
|
||||
reqDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
@ -933,7 +935,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: UniversityId
|
||||
data: UniversityId,
|
||||
reqDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
@ -1427,7 +1430,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
$scope.localUserType = localDetails.localType;
|
||||
if (localDetail != null) {
|
||||
if (localDetails.localType === 'R004') {
|
||||
$scope.getBranchList();
|
||||
getDetails();
|
||||
} else {
|
||||
ipCookie.remove('cookiechk');
|
||||
$window.localStorage.clear();
|
||||
@ -1438,33 +1441,33 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
}
|
||||
|
||||
|
||||
$scope.getBranchList = function () {
|
||||
$scope.loader = true;
|
||||
var empListreq = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getBranchListDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: localDetails
|
||||
}
|
||||
};
|
||||
$http(empListreq).then(function (response) {
|
||||
if (response.data.branDetailstatus) {
|
||||
$scope.loader = false;
|
||||
$scope.branchList_data = response.data.branch_details;
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
// $scope.getBranchList = function () {
|
||||
// $scope.loader = true;
|
||||
// var empListreq = {
|
||||
// method: 'POST',
|
||||
// url: apiPoint.url + 'getBranchListDetails/',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// data: {
|
||||
// data: localDetails
|
||||
// }
|
||||
// };
|
||||
// $http(empListreq).then(function (response) {
|
||||
// if (response.data.branDetailstatus) {
|
||||
// $scope.loader = false;
|
||||
// $scope.branchList_data = response.data.branch_details;
|
||||
// } else {
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
$scope.changeBranch = function () {
|
||||
$scope.viewStudentDetailsPage = false;
|
||||
localDetails.localBranchID = $scope.localBranchDetails;
|
||||
localDetail.localBranchID = $scope.localBranchDetails;
|
||||
getDetails()
|
||||
}
|
||||
// $scope.changeBranch = function () {
|
||||
// $scope.viewStudentDetailsPage = false;
|
||||
// localDetails.localBranchID = $scope.localBranchDetails;
|
||||
// localDetail.localBranchID = $scope.localBranchDetails;
|
||||
// getDetails()
|
||||
// }
|
||||
|
||||
function getDetails() {
|
||||
$scope.todayDate = new Date();
|
||||
@ -1478,7 +1481,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
// $scope.myModel.dateofbirth = $filter('date')($scope.currentDate, 'dd-MM-yyyy');
|
||||
$scope.myModelCourseAdd.dateofjoining = $filter('date')($scope.currentDate, 'dd-MM-yyyy');
|
||||
$scope.myModelCourse.dateofjoining = $filter('date')($scope.currentDate, 'dd-MM-yyyy');
|
||||
$scope.viewStudentDetailsPage = true;
|
||||
// $scope.viewStudentDetailsPage = true;
|
||||
}
|
||||
|
||||
$scope.myModel = {
|
||||
@ -1858,7 +1861,8 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: UniversityId
|
||||
data: UniversityId,
|
||||
reqDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
@ -1976,7 +1980,8 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModelCourse.university
|
||||
data: $scope.myModelCourse.university,
|
||||
reqDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
@ -2008,7 +2013,8 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: $scope.myModelCourseAdd.university
|
||||
data: $scope.myModelCourseAdd.university,
|
||||
reqDetails: localDetails
|
||||
}
|
||||
};
|
||||
$http(univListreq).then(function (response) {
|
||||
|
||||
@ -53,8 +53,8 @@
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<div ng-init="init()">
|
||||
<div class="row">
|
||||
<div>
|
||||
<!--<div class="row">
|
||||
<div class="col-lg-4"></div>
|
||||
<div class="col-lg-4">
|
||||
<div>
|
||||
@ -69,19 +69,18 @@
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<!-- ng-if="loader == true"-->
|
||||
<span ng-if="loader == true" style="color: #007AFF;
|
||||
font-size: 16px;">Loading...</span>
|
||||
</div>
|
||||
<div class="col-lg-4"></div>
|
||||
</div>
|
||||
</div>-->
|
||||
<br>
|
||||
|
||||
<div class="row" ng-if="viewStudentDetailsPage">
|
||||
<div class="row" ng-init="init()">
|
||||
<!--{{tab1}}
|
||||
<button ng-click="tabActive('0')" value="Tab1">Tab1</button>
|
||||
<button ng-click="tabActive('1')" value="Tab2">Tab2</button>-->
|
||||
<tabset id="here" class="tabbable" ng-init="tabActive('tabactive1')">
|
||||
<tabset id="here" class="tabbable">
|
||||
<tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="View Student" id="studentbranch">
|
||||
<script>
|
||||
$( "#selectBranch" ).change(function() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user