Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4592927922
@ -55,6 +55,7 @@ class Status_Controller extends REST_Controller {
|
|||||||
$details['ListGroup'] = "1";
|
$details['ListGroup'] = "1";
|
||||||
$details['CreatedBy'] = $this->post('createdBy');
|
$details['CreatedBy'] = $this->post('createdBy');
|
||||||
$details['IsActive'] = $this->post('status');
|
$details['IsActive'] = $this->post('status');
|
||||||
|
$details['BranchCode'] = $this->post('branch');
|
||||||
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
|
||||||
$statusDetails = $this->status_model->addstatus($details);// Check if the users data store contains users (in case the database result returns NULL)
|
$statusDetails = $this->status_model->addstatus($details);// Check if the users data store contains users (in case the database result returns NULL)
|
||||||
if ($statusDetails)
|
if ($statusDetails)
|
||||||
@ -81,7 +82,8 @@ class Status_Controller extends REST_Controller {
|
|||||||
public function getStatusDetails_post()
|
public function getStatusDetails_post()
|
||||||
{
|
{
|
||||||
$requestedBy = $this->post('requestedBy');
|
$requestedBy = $this->post('requestedBy');
|
||||||
$getStatus = $this->status_model->getStatus($requestedBy);
|
$requestedBranch = $this->post('requestBranch');
|
||||||
|
$getStatus = $this->status_model->getStatus($requestedBy, $requestedBranch);
|
||||||
|
|
||||||
if ($getStatus)
|
if ($getStatus)
|
||||||
{
|
{
|
||||||
@ -113,8 +115,9 @@ class Status_Controller extends REST_Controller {
|
|||||||
$details['ListName'] = $this->post('ListName');
|
$details['ListName'] = $this->post('ListName');
|
||||||
$details['IsActive'] = $this->post('status');
|
$details['IsActive'] = $this->post('status');
|
||||||
$details['UpdatedBy'] = $this->post('updatedBy');
|
$details['UpdatedBy'] = $this->post('updatedBy');
|
||||||
|
$branch = $this->post('requestBranch');
|
||||||
$details['UpdatedOn'] = $now->format("Y-m-d H:i:s");
|
$details['UpdatedOn'] = $now->format("Y-m-d H:i:s");
|
||||||
$statusDetails = $this->status_model->update($details,$ListCode);// Check if the users data store contains users (in case the database result returns NULL)
|
$statusDetails = $this->status_model->update($details,$ListCode, $branch);// Check if the users data store contains users (in case the database result returns NULL)
|
||||||
|
|
||||||
if ($statusDetails)
|
if ($statusDetails)
|
||||||
|
|
||||||
|
|||||||
@ -120,14 +120,16 @@ class DayBook_model extends CI_Model
|
|||||||
$toDate = $dTo->format('Y-m-d');
|
$toDate = $dTo->format('Y-m-d');
|
||||||
$reqpayType = $reqDataBy['localBranchID'];
|
$reqpayType = $reqDataBy['localBranchID'];
|
||||||
|
|
||||||
$querys = "SELECT t1.ID as ORDER_ID, t1.*, t2.ListName, t3.TypeName , t5.Firstname as Approved_by_name FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
$querys = "SELECT t1.ID as ORDER_ID, t1.*, t2.ListName, t3.TypeName , t5.Firstname as Approved_by_name,t7.UniversityName as UniversityName, t6.CourseName as CourseName FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
||||||
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID
|
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID LEFT JOIN ".COURSE." as t6 ON t6.CourseID = t1.CourseID
|
||||||
|
LEFT JOIN ".UNIVERSITY." as t7 ON t7.UniversityID = t6.UniversityID
|
||||||
WHERE STR_TO_DATE(t1.Date, '%d-%m-%Y') BETWEEN '$fromDate'
|
WHERE STR_TO_DATE(t1.Date, '%d-%m-%Y') BETWEEN '$fromDate'
|
||||||
AND '$toDate' AND t1.BranchCode = '$reqpayType' AND t1.Status NOT IN ('Approved', 'Cancel') ORDER BY ORDER_ID DESC";
|
AND '$toDate' AND t1.BranchCode = '$reqpayType' AND t1.Status NOT IN ('Approved', 'Cancel') ORDER BY ORDER_ID DESC";
|
||||||
}
|
}
|
||||||
else { $reqpayType = $reqDataBy['localBranchID'];
|
else { $reqpayType = $reqDataBy['localBranchID'];
|
||||||
$querys = "SELECT t1.ID as ORDER_ID, t1.*, t2.ListName, t3.TypeName, t5.Firstname as Approved_by_name FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
$querys = "SELECT t1.ID as ORDER_ID, t1.*, t2.ListName, t3.TypeName, t5.Firstname as Approved_by_name,t7.UniversityName as UniversityName, t6.CourseName as CourseName FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
||||||
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID
|
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID LEFT JOIN ".COURSE." as t6 ON t6.CourseID = t1.CourseID
|
||||||
|
LEFT JOIN ".UNIVERSITY." as t7 ON t7.UniversityID = t6.UniversityID
|
||||||
WHERE t1.BranchCode = '$reqpayType' AND t1.Status NOT IN ('Approved', 'Cancel') ORDER BY ORDER_ID DESC";
|
WHERE t1.BranchCode = '$reqpayType' AND t1.Status NOT IN ('Approved', 'Cancel') ORDER BY ORDER_ID DESC";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,9 +17,11 @@ class Status_model extends CI_Model {
|
|||||||
|
|
||||||
public function addstatus($arrayDetails=null)
|
public function addstatus($arrayDetails=null)
|
||||||
{
|
{
|
||||||
|
// print_r($arrayDetails);exit();
|
||||||
$this->db->select('ListCode');
|
$this->db->select('ListCode');
|
||||||
$this->db->where('ListGroup', '1');
|
$this->db->where('ListGroup', '1');
|
||||||
$this->db->where('ListName', $arrayDetails['ListName']);
|
$this->db->where('ListName', $arrayDetails['ListName']);
|
||||||
|
$this->db->where('BranchCode', $arrayDetails['BranchCode']);
|
||||||
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
||||||
$result['Status'] = false;
|
$result['Status'] = false;
|
||||||
$result['message'] = "Status name is already exist!";
|
$result['message'] = "Status name is already exist!";
|
||||||
@ -52,10 +54,11 @@ class Status_model extends CI_Model {
|
|||||||
* created by Surendiran
|
* created by Surendiran
|
||||||
* */
|
* */
|
||||||
|
|
||||||
public function getStatus()
|
public function getStatus($reqBy, $reqBranch)
|
||||||
{
|
{
|
||||||
$this->db->select('ListCode,ListName,IsActive');
|
$this->db->select('ListCode,ListName,IsActive');
|
||||||
$this->db->where('ListGroup','1');
|
$this->db->where('ListGroup','1');
|
||||||
|
$this->db->where('BranchCode', $reqBranch);
|
||||||
$this->db->order_by('ListCode','DESC');
|
$this->db->order_by('ListCode','DESC');
|
||||||
$statusDetails = $this->db->get(PICK_LIST_DETAILS);
|
$statusDetails = $this->db->get(PICK_LIST_DETAILS);
|
||||||
if($statusDetails->result()){
|
if($statusDetails->result()){
|
||||||
@ -76,10 +79,11 @@ class Status_model extends CI_Model {
|
|||||||
* created by Surendiran
|
* created by Surendiran
|
||||||
* */
|
* */
|
||||||
|
|
||||||
public function update($arrayDetails=null,$ListCode=null)
|
public function update($arrayDetails=null,$ListCode=null, $branch)
|
||||||
{
|
{
|
||||||
$this->db->select('ListName');
|
$this->db->select('ListName');
|
||||||
$this->db->where('ListName', $arrayDetails['ListName']);
|
$this->db->where('ListName', $arrayDetails['ListName']);
|
||||||
|
$this->db->where('BranchCode', $branch);
|
||||||
$this->db->where_not_in('ListCode', $ListCode);
|
$this->db->where_not_in('ListCode', $ListCode);
|
||||||
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
if($this->db->get(PICK_LIST_DETAILS)->first_row()){
|
||||||
$result['Status'] = false;
|
$result['Status'] = false;
|
||||||
|
|||||||
@ -334,9 +334,11 @@ $scope.dayBookApprovalAccess = '';
|
|||||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||||
} else {
|
} else {
|
||||||
|
var sdate= $('#date').val();
|
||||||
$scope.disableAddButton = true;
|
$scope.disableAddButton = true;
|
||||||
var formate = "dd-MM-yyyy";
|
var formate = "dd-MM-yyyy";
|
||||||
$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
|
$scope.myModelAdd.date= sdate;
|
||||||
|
//$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
|
||||||
$scope.myModelAdd.status = $scope.myModelAdd.name == 'I001' ? 'Pending' : 'Approved';
|
$scope.myModelAdd.status = $scope.myModelAdd.name == 'I001' ? 'Pending' : 'Approved';
|
||||||
// $scope.data.push(myModelAdd);
|
// $scope.data.push(myModelAdd);
|
||||||
|
|
||||||
|
|||||||
@ -399,9 +399,11 @@ $scope.dayBookApprovalAccess = '';
|
|||||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||||
} else {
|
} else {
|
||||||
|
var sdate= $('#date').val();
|
||||||
$scope.disableAddButton = true;
|
$scope.disableAddButton = true;
|
||||||
var formate = "dd-MM-yyyy";
|
var formate = "dd-MM-yyyy";
|
||||||
$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
|
$scope.myModelAdd.date= sdate;
|
||||||
|
//$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
|
||||||
$scope.myModelAdd.status = $scope.myModelAdd.name == 'I001' ? 'Pending' : 'Approved';
|
$scope.myModelAdd.status = $scope.myModelAdd.name == 'I001' ? 'Pending' : 'Approved';
|
||||||
// $scope.data.push(myModelAdd);
|
// $scope.data.push(myModelAdd);
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,8 @@ app.controller("statusCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$lo
|
|||||||
data: {
|
data: {
|
||||||
statusName: myModel.StatusName,
|
statusName: myModel.StatusName,
|
||||||
status: myModel.switchsetting,
|
status: myModel.switchsetting,
|
||||||
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
|
||||||
|
branch : localDetail.localBranchID
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ app.controller("statusCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$lo
|
|||||||
$state.go($state.current, {}, { reload: true });
|
$state.go($state.current, {}, { reload: true });
|
||||||
} else {
|
} else {
|
||||||
$scope.ldloading1[loading.replace('-', '_')] = false;
|
$scope.ldloading1[loading.replace('-', '_')] = false;
|
||||||
swal("", "Something went wrong, please try again.", "error");
|
swal("", response.data.message, "error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -123,6 +124,7 @@ app.controller("statusCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$lo
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
|
requestBranch: localDetail.localBranchID,
|
||||||
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -201,18 +203,20 @@ app.controller("statusCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$lo
|
|||||||
ListCode: myModel.ListCode,
|
ListCode: myModel.ListCode,
|
||||||
ListName: myModel.ListName,
|
ListName: myModel.ListName,
|
||||||
status: myModel.IsActive,
|
status: myModel.IsActive,
|
||||||
|
requestBranch: localDetail.localBranchID,
|
||||||
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$http(update).then(function (response) {
|
$http(update).then(function (response) {
|
||||||
if (response.data.status == 200 && response.data.Status) {
|
if (response.data.Status) {
|
||||||
$scope.ldloading[loading.replace('-', '_')] = false;
|
$scope.ldloading[loading.replace('-', '_')] = false;
|
||||||
swal("", "Updated Successfully", "success");
|
swal("", "Updated Successfully", "success");
|
||||||
$scope.editId = -1;
|
$scope.editId = -1;
|
||||||
$scope.init();
|
$scope.init();
|
||||||
} else {
|
} else {
|
||||||
$scope.ldloading[loading.replace('-', '_')] = false;
|
$scope.ldloading[loading.replace('-', '_')] = false;
|
||||||
swal("", "Something went wrong, please try again", "error");
|
$scope.init();
|
||||||
|
swal("", response.data.message, "error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -216,6 +216,12 @@
|
|||||||
<th ng-click="sort('PaidTo')">Paid To / Received From
|
<th ng-click="sort('PaidTo')">Paid To / Received From
|
||||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
|
|
||||||
|
<th>Sem/Course/University
|
||||||
|
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||||
|
</th>
|
||||||
|
|
||||||
<th>Description/Comments
|
<th>Description/Comments
|
||||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||||
</th>
|
</th>
|
||||||
@ -244,6 +250,7 @@
|
|||||||
<td>{{p.ListName}}</td>
|
<td>{{p.ListName}}</td>
|
||||||
<td>{{p.VoucherNumber}}</td>
|
<td>{{p.VoucherNumber}}</td>
|
||||||
<td>{{p.PaidTo}}</td>
|
<td>{{p.PaidTo}}</td>
|
||||||
|
<td> {{p.FeePaymentDetails}}<br>{{p.CourseName}} <br> {{p.UniversityName}}</td>
|
||||||
<td>
|
<td>
|
||||||
<div id="containersPara">
|
<div id="containersPara">
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
|
|||||||
@ -291,7 +291,7 @@
|
|||||||
Date <span
|
Date <span
|
||||||
class="symbol required"></span>
|
class="symbol required"></span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelAdd.date"
|
<input type="text" id="date" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelAdd.date"
|
||||||
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
|
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
|
||||||
placeholder="Select Date" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
|
placeholder="Select Date" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
|
||||||
show-button-bar="true" max-date="todayDate" />
|
show-button-bar="true" max-date="todayDate" />
|
||||||
|
|||||||
@ -216,6 +216,12 @@
|
|||||||
<th ng-click="sort('PaidTo')">Paid To / Received From
|
<th ng-click="sort('PaidTo')">Paid To / Received From
|
||||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
|
|
||||||
|
<th>Sem/Course/University
|
||||||
|
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||||
|
</th>
|
||||||
|
|
||||||
<th>Description/Comments
|
<th>Description/Comments
|
||||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||||
</th>
|
</th>
|
||||||
@ -244,6 +250,9 @@
|
|||||||
<td>{{p.ListName}}</td>
|
<td>{{p.ListName}}</td>
|
||||||
<td>{{p.VoucherNumber}}</td>
|
<td>{{p.VoucherNumber}}</td>
|
||||||
<td>{{p.PaidTo}}</td>
|
<td>{{p.PaidTo}}</td>
|
||||||
|
|
||||||
|
<td> {{p.FeePaymentDetails}}<br>{{p.CourseName}} <br> {{p.UniversityName}}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div id="containersPara">
|
<div id="containersPara">
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
|
|||||||
@ -315,7 +315,7 @@
|
|||||||
Date <span
|
Date <span
|
||||||
class="symbol required"></span>
|
class="symbol required"></span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelAdd.date"
|
<input type="text" id="date" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelAdd.date"
|
||||||
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
|
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
|
||||||
placeholder="Select Date" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
|
placeholder="Select Date" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
|
||||||
show-button-bar="true" max-date="todayDate" />
|
show-button-bar="true" max-date="todayDate" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user