Income Expense & certificate type master changes: kdk

This commit is contained in:
dineshkumarkannan 2018-04-24 09:23:36 +05:30
parent 0192f7a596
commit 57bd4b9fb0
12 changed files with 77 additions and 64 deletions

View File

@ -83,7 +83,8 @@ class Certificate_Controller extends REST_Controller {
public function getCertificateDetails_post() public function getCertificateDetails_post()
{ {
$requestedBy = $this->post('requestedBy'); $requestedBy = $this->post('requestedBy');
$getCertificate = $this->certificate_model->getCertificate($requestedBy); $requestedBranch = $this->post('reqBrach');
$getCertificate = $this->certificate_model->getCertificate($requestedBy, $requestedBranch);
if ($getCertificate) if ($getCertificate)
{ {

View File

@ -49,6 +49,7 @@ class DayBookMaster_Controller extends REST_Controller {
$details['IsActive'] = $this->post('status'); $details['IsActive'] = $this->post('status');
$details['CreatedBy'] = $this->post('createdBy'); $details['CreatedBy'] = $this->post('createdBy');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s'); $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) $addDetails = $this->daybookmaster_model->addDetails($details);// Check if the users data store contains users (in case the database result returns NULL)
if ($addDetails) if ($addDetails)
{ {
@ -74,7 +75,8 @@ class DayBookMaster_Controller extends REST_Controller {
public function getDayBookMasterDetails_post() public function getDayBookMasterDetails_post()
{ {
$requestedBy = $this->post('requestedBy'); $requestedBy = $this->post('requestedBy');
$getdetails = $this->daybookmaster_model->getDayBookDetails($requestedBy); $requestedBranch = $this->post('requestedBranch');
$getdetails = $this->daybookmaster_model->getDayBookDetails($requestedBy, $requestedBranch);
if ($getdetails) if ($getdetails)
{ {

View File

@ -40,7 +40,7 @@ class StatusUpdation_Controller extends REST_Controller {
$loginUserId = $reqData['localUserID']; $loginUserId = $reqData['localUserID'];
$loginUserBranchId = $reqData['localBranchID']; $loginUserBranchId = $reqData['localBranchID'];
$loginUserType = $reqData['localType']; $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) if ($getUniversityListDetails)
{ {
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK; $getUniversityListDetails['status'] = REST_Controller::HTTP_OK;

View File

@ -109,7 +109,7 @@ class Student_Controller extends REST_Controller {
$loginUserId = $reqData['localUserID']; $loginUserId = $reqData['localUserID'];
$loginUserBranchId = $reqData['localBranchID']; $loginUserBranchId = $reqData['localBranchID'];
$loginUserType = $reqData['localType']; $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) if ($getUniversityListDetails)
{ {
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK; $getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
@ -524,7 +524,9 @@ class Student_Controller extends REST_Controller {
public function getCourseBatch_post() { public function getCourseBatch_post() {
$data = $this->post('data'); $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) if ($getCourseBatchListDetails)
{ {
$getCourseBatchListDetails['status'] = REST_Controller::HTTP_OK; $getCourseBatchListDetails['status'] = REST_Controller::HTTP_OK;

View File

@ -47,9 +47,10 @@ class Certificate_model extends CI_Model {
* parama id * parama id
* created by Surendiran * created by Surendiran
* */ * */
public function getCertificate() public function getCertificate($reqBy, $reqBranch)
{ {
$this->db->select('CertificationID,CertificateName,CreatedOn,IsActive'); $this->db->select('CertificationID,CertificateName,CreatedOn,IsActive');
$this->db->where('BranchCode', $reqBranch);
$this->db->order_by('CertificationID','DESC'); $this->db->order_by('CertificationID','DESC');
$certificateDetails = $this->db->get(CERTIFICATION_MASTER); $certificateDetails = $this->db->get(CERTIFICATION_MASTER);
if($certificateDetails->result()){ if($certificateDetails->result()){

View File

@ -19,6 +19,7 @@ class DaybookMaster_model extends CI_Model {
$this->db->select('TypeName'); $this->db->select('TypeName');
$this->db->where('TypeName', $arrayDetails['TypeName']); $this->db->where('TypeName', $arrayDetails['TypeName']);
$this->db->where('TypeID', $arrayDetails['TypeID']); $this->db->where('TypeID', $arrayDetails['TypeID']);
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
if($this->db->get(INCOMEOUTCOMEMASTER)->first_row()){ if($this->db->get(INCOMEOUTCOMEMASTER)->first_row()){
$result['addStatus'] = false; $result['addStatus'] = false;
$result['message'] = "Name is already exist!"; $result['message'] = "Name is already exist!";
@ -34,10 +35,6 @@ class DaybookMaster_model extends CI_Model {
} }
} }
return $result; return $result;
} }
@ -49,15 +46,16 @@ class DaybookMaster_model extends CI_Model {
* created by kms * 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->select('IOM.ID,IOM.TypeName,IOM.TypeID,IOM.IsActive,PLD.ListName');
$this->db->from(INCOMEOUTCOMEMASTER .' as IOM'); $this->db->from(INCOMEOUTCOMEMASTER .' as IOM');
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = IOM.TypeID'); $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'); $this->db->order_by('IOM.ID','DESC');
$details = $this->db->get(); $details = $this->db->get();
if($details->result()){ if($details->result()){
$result['daybookStatus'] = true; $result['daybookStatus'] = true;
$result['details'] = $details->result(); $result['details'] = $details->result();
@ -106,11 +104,7 @@ class DaybookMaster_model extends CI_Model {
$result['updateStatus'] = false; $result['updateStatus'] = false;
$result['message'] = "Something went wrong.please try again"; $result['message'] = "Something went wrong.please try again";
} }
} }
return $result; return $result;
} }
} }

View File

@ -495,10 +495,11 @@ class StatusUpdation_model extends CI_Model
} }
// get list of universities, course, batch // 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->select('t1.UniversityID, t1.UniversityName');
$this->db->order_by('CreatedOn', 'DESC'); $this->db->order_by('CreatedOn', 'DESC');
$this->db->from(''.UNIVERSITY. ' as t1'); $this->db->from(''.UNIVERSITY. ' as t1');
$this->db->where('BranchCode', $branch);
$this->db->where('IsActive', 1); $this->db->where('IsActive', 1);
// $this->db->join('' . COURSE . ' as t2', 't2.UniversityID = t1.UniversityID', 'LEFT'); // $this->db->join('' . COURSE . ' as t2', 't2.UniversityID = t1.UniversityID', 'LEFT');
$univDetails = $this->db->get(); $univDetails = $this->db->get();
@ -513,6 +514,7 @@ class StatusUpdation_model extends CI_Model
$this->db->from(''.COURSE. ' as t2'); $this->db->from(''.COURSE. ' as t2');
$this->db->where('t2.UniversityID', $clip->UniversityID); $this->db->where('t2.UniversityID', $clip->UniversityID);
$this->db->where('t2.IsActive', 1); $this->db->where('t2.IsActive', 1);
$this->db->where('BranchCode', $branch);
$courDetails = $this->db->get(); $courDetails = $this->db->get();
$courseDetails = $courDetails->result(); $courseDetails = $courDetails->result();
$resultArr['Course'] =$courseDetails; $resultArr['Course'] =$courseDetails;
@ -521,6 +523,7 @@ class StatusUpdation_model extends CI_Model
$this->db->from(''.BATCH. ' as t3'); $this->db->from(''.BATCH. ' as t3');
$this->db->where('t3.UniversityID', $clip->UniversityID); $this->db->where('t3.UniversityID', $clip->UniversityID);
$this->db->where('t3.IsActive', 1); $this->db->where('t3.IsActive', 1);
$this->db->where('BranchCode', $branch);
//Session Details //Session Details
// $this->db->select('B.SessionID, B.SessionName'); // $this->db->select('B.SessionID, B.SessionName');

View File

@ -496,12 +496,13 @@ class Student_model extends CI_Model
// get university list // get university list
public function get_university_list() public function get_university_list($branch)
{ {
$this->db->select('*'); $this->db->select('*');
$this->db->order_by('CreatedOn', 'DESC'); $this->db->order_by('CreatedOn', 'DESC');
$this->db->from(UNIVERSITY); $this->db->from(UNIVERSITY);
$this->db->where('IsActive', 1); $this->db->where('IsActive', 1);
$this->db->where('BranchCode', $branch);
$univDetails = $this->db->get(); $univDetails = $this->db->get();
$universityDetails = $univDetails->result(); $universityDetails = $univDetails->result();
if (count($universityDetails) > 0) { if (count($universityDetails) > 0) {
@ -518,12 +519,13 @@ class Student_model extends CI_Model
// get course, batch for university // 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->select('C.CourseID, C.CourseName,C.Specilization1,C.Specilization2, C.CourseCode');
$this->db->from(COURSE . ' as C'); $this->db->from(COURSE . ' as C');
$this->db->where('UniversityID', $univId); $this->db->where('UniversityID', $univId);
$this->db->where('IsActive', 1); $this->db->where('IsActive', 1);
$this->db->where('BranchCode', $branch);
$courseDetails = $this->db->get(); $courseDetails = $this->db->get();
if ($courseDetails->result()) { if ($courseDetails->result()) {
$this->db->select('B.SessionID, B.SessionName'); $this->db->select('B.SessionID, B.SessionName');

View File

@ -118,7 +118,8 @@ $scope.certificateForm = {
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
reqBrach: JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };

View File

@ -75,7 +75,8 @@ app.controller("dayBookMasterCtrl", ["$scope", "toaster", "$filter", "API_POINTS
name: myModel.name, name: myModel.name,
type: myModel.type, type: myModel.type,
status: myModel.switchsetting, 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' 'Content-Type': 'application/json'
}, },
data: { data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
requestedBranch: JSON.parse(localStorage.getItem('localObj')).localBranchID
} }
}; };

View File

@ -393,7 +393,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
data: $scope.myModelCourse.university data: $scope.myModelCourse.university,
reqDetails: localDetails
} }
}; };
$http(univListreq).then(function (response) { $http(univListreq).then(function (response) {
@ -424,7 +425,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
data: $scope.myModelCourseAdd.university data: $scope.myModelCourseAdd.university,
reqDetails: localDetails
} }
}; };
$http(univListreq).then(function (response) { $http(univListreq).then(function (response) {
@ -933,7 +935,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
data: UniversityId data: UniversityId,
reqDetails: localDetails
} }
}; };
$http(univListreq).then(function (response) { $http(univListreq).then(function (response) {
@ -1427,7 +1430,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
$scope.localUserType = localDetails.localType; $scope.localUserType = localDetails.localType;
if (localDetail != null) { if (localDetail != null) {
if (localDetails.localType === 'R004') { if (localDetails.localType === 'R004') {
$scope.getBranchList(); getDetails();
} else { } else {
ipCookie.remove('cookiechk'); ipCookie.remove('cookiechk');
$window.localStorage.clear(); $window.localStorage.clear();
@ -1438,33 +1441,33 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
} }
$scope.getBranchList = function () { // $scope.getBranchList = function () {
$scope.loader = true; // $scope.loader = true;
var empListreq = { // var empListreq = {
method: 'POST', // method: 'POST',
url: apiPoint.url + 'getBranchListDetails/', // url: apiPoint.url + 'getBranchListDetails/',
headers: { // headers: {
'Content-Type': 'application/json' // 'Content-Type': 'application/json'
}, // },
data: { // data: {
data: localDetails // data: localDetails
} // }
}; // };
$http(empListreq).then(function (response) { // $http(empListreq).then(function (response) {
if (response.data.branDetailstatus) { // if (response.data.branDetailstatus) {
$scope.loader = false; // $scope.loader = false;
$scope.branchList_data = response.data.branch_details; // $scope.branchList_data = response.data.branch_details;
} else { // } else {
} // }
}); // });
} // }
$scope.changeBranch = function () { // $scope.changeBranch = function () {
$scope.viewStudentDetailsPage = false; // $scope.viewStudentDetailsPage = false;
localDetails.localBranchID = $scope.localBranchDetails; // localDetails.localBranchID = $scope.localBranchDetails;
localDetail.localBranchID = $scope.localBranchDetails; // localDetail.localBranchID = $scope.localBranchDetails;
getDetails() // getDetails()
} // }
function getDetails() { function getDetails() {
$scope.todayDate = new Date(); $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.myModel.dateofbirth = $filter('date')($scope.currentDate, 'dd-MM-yyyy');
$scope.myModelCourseAdd.dateofjoining = $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.myModelCourse.dateofjoining = $filter('date')($scope.currentDate, 'dd-MM-yyyy');
$scope.viewStudentDetailsPage = true; // $scope.viewStudentDetailsPage = true;
} }
$scope.myModel = { $scope.myModel = {
@ -1858,7 +1861,8 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
data: UniversityId data: UniversityId,
reqDetails: localDetails
} }
}; };
$http(univListreq).then(function (response) { $http(univListreq).then(function (response) {
@ -1976,7 +1980,8 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
data: $scope.myModelCourse.university data: $scope.myModelCourse.university,
reqDetails: localDetails
} }
}; };
$http(univListreq).then(function (response) { $http(univListreq).then(function (response) {
@ -2008,7 +2013,8 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
data: { data: {
data: $scope.myModelCourseAdd.university data: $scope.myModelCourseAdd.university,
reqDetails: localDetails
} }
}; };
$http(univListreq).then(function (response) { $http(univListreq).then(function (response) {

View File

@ -53,8 +53,8 @@
text-align: center; text-align: center;
} }
</style> </style>
<div ng-init="init()"> <div>
<div class="row"> <!--<div class="row">
<div class="col-lg-4"></div> <div class="col-lg-4"></div>
<div class="col-lg-4"> <div class="col-lg-4">
<div> <div>
@ -69,19 +69,18 @@
</select> </select>
</div> </div>
<!-- ng-if="loader == true"-->
<span ng-if="loader == true" style="color: #007AFF; <span ng-if="loader == true" style="color: #007AFF;
font-size: 16px;">Loading...</span> font-size: 16px;">Loading...</span>
</div> </div>
<div class="col-lg-4"></div> <div class="col-lg-4"></div>
</div> </div>-->
<br> <br>
<div class="row" ng-if="viewStudentDetailsPage"> <div class="row" ng-init="init()">
<!--{{tab1}} <!--{{tab1}}
<button ng-click="tabActive('0')" value="Tab1">Tab1</button> <button ng-click="tabActive('0')" value="Tab1">Tab1</button>
<button ng-click="tabActive('1')" value="Tab2">Tab2</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"> <tab tabindex="1" active="tabactive1" ng-click="tabActive('tabactive1')" heading="View Student" id="studentbranch">
<script> <script>
$( "#selectBranch" ).change(function() { $( "#selectBranch" ).change(function() {