daybook approval changes: kdk
This commit is contained in:
parent
3269425a65
commit
d85d233fd6
@ -23,11 +23,13 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
// getFinanceModuleAccess();
|
||||
// // if(getFinanceModuleAccess()){
|
||||
$scope.dayBookApprovalAccess = localDetail.is_DayBookApproval_Access;
|
||||
$scope.showTheRefValue = 'I001';
|
||||
$scope.showTheRefValue = undefined;
|
||||
$scope.localTypeViewAdmin = true;
|
||||
$scope.currentDate = new Date();
|
||||
var d = new Date();
|
||||
$scope.oneMonthBefore = d.setMonth(d.getMonth()-1);
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.searchData.date = $filter('date')(new Date($scope.currentDate), formate);
|
||||
$scope.searchData.date = $filter('date')(new Date($scope.oneMonthBefore), formate);
|
||||
$scope.searchData.dateTo = $filter('date')(new Date($scope.currentDate), formate);
|
||||
$scope.getIncomeExpenseType_Status();
|
||||
$scope.getDayBookList();
|
||||
@ -35,16 +37,7 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
} else {
|
||||
ipCookie.remove('cookiechk');
|
||||
$window.localStorage.clear();
|
||||
$state.go('login.signin');
|
||||
// $scope.localTypeViewSuperAdmin = true;
|
||||
// $scope.showTheRefValue = 'I001';
|
||||
// $scope.localTypeViewAdmin = true;
|
||||
// $scope.currentDate = new Date();
|
||||
// var formate = "dd-MM-yyyy";
|
||||
// $scope.searchData.date = $filter('date')(new Date($scope.currentDate), formate);
|
||||
// $scope.searchData.dateTo = $filter('date')(new Date($scope.currentDate), formate);
|
||||
// $scope.getIncomeExpenseType_Status();
|
||||
// $scope.getDayBookList();
|
||||
$state.go('login.signin');
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +58,7 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
$http(getFinacnceModuleAcccessCtrl).then(function (response) {
|
||||
if (response.data.dayBkAccessChkStatus) {
|
||||
$scope.dayBookApprovalAccess = response.data.dayBkAccessChk_Value;
|
||||
$scope.showTheRefValue = 'I001';
|
||||
$scope.showTheRefValue = undefined;
|
||||
$scope.localTypeViewAdmin = true;
|
||||
$scope.currentDate = new Date();
|
||||
var formate = "dd-MM-yyyy";
|
||||
@ -81,8 +74,6 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// change from date, update and call search functionality
|
||||
$scope.changeDate = function () {
|
||||
if($scope.searchData.date !== undefined) {
|
||||
@ -107,14 +98,14 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
}
|
||||
}
|
||||
|
||||
// sorting function for table params
|
||||
// sorting function for table params
|
||||
$scope.sort = function (keyname) {
|
||||
// alert();
|
||||
$scope.sortKey = keyname; //set the sortKey to the param passed
|
||||
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
|
||||
}
|
||||
|
||||
// income expense type status list
|
||||
// income expense type status list
|
||||
$scope.getIncomeExpenseType_Status = function () {
|
||||
var getIncomeExpenseType = {
|
||||
method: 'POST',
|
||||
@ -135,12 +126,12 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
});
|
||||
}
|
||||
|
||||
$scope.loadingsearch = false;
|
||||
$scope.loadingsearch = false;
|
||||
$scope.noRecordFound = true;
|
||||
$scope.noRecordFoundSearch = false;
|
||||
$scope.dataLengthIncome = 0;
|
||||
$scope.dataLengthExpense = 0;
|
||||
// day book entry list
|
||||
$scope.dataLengthIncome = 0;
|
||||
$scope.dataLengthExpense = 0;
|
||||
// day book entry list
|
||||
$scope.getDayBookList = function () {
|
||||
$scope.loadingsearch = true;
|
||||
$scope.noRecordFoundSearch = false;
|
||||
@ -157,68 +148,23 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
};
|
||||
$http(getDatBookListDetails).then(function (response) {
|
||||
if (response.data.dayBookListStatus) {
|
||||
$scope.loadingsearch = false;
|
||||
$scope.loadingsearch = false;
|
||||
// $scope.data = response.data.dayBookListDetails;
|
||||
let datas = response.data.dayBookListDetails;
|
||||
if (datas.length <= 0) {
|
||||
$scope.noRecordFoundSearch = true;
|
||||
} else {
|
||||
$scope.noRecordFoundSearch = false;
|
||||
}
|
||||
let searchResultDetailsBef = datas.filter(val => {
|
||||
return val.Name == 'I001' ? 1 : 0;
|
||||
});
|
||||
$scope.IncomeData = datas.filter(val => {
|
||||
return val.Name == 'I002' ? 1 : 0;
|
||||
});
|
||||
$scope.dataLengthIncome = $scope.IncomeData.length;
|
||||
const filterAddSelect = searchResultDetailsBef.filter(val => {
|
||||
$scope.datas = response.data.dayBookListDetails;
|
||||
|
||||
const filterAddSelect = $scope.datas.filter(val => {
|
||||
val['Selected'] = false;
|
||||
return val;
|
||||
});
|
||||
$scope.searchResultDetails = filterAddSelect;
|
||||
$scope.dataLengthExpense = $scope.searchResultDetails.length;
|
||||
// alert(JSON.stringify($scope.searchResultDetails));
|
||||
$scope.searchResultLength = Object.keys($scope.searchResultDetails).length;
|
||||
// if ($scope.data.length !== 0) {
|
||||
// $scope.OpenWindowStatus = false;
|
||||
// $scope.noRecordFound = false;
|
||||
// } else {
|
||||
// $scope.OpenWindowStatus = false;
|
||||
// $scope.noRecordFound = true;
|
||||
// }
|
||||
// alert(JSON.stringify($scope.data));
|
||||
// $scope.incomeExpenseType = response.data.typeNameList;
|
||||
$scope.searchResultDetailsCopy = filterAddSelect;
|
||||
} else {
|
||||
$scope.loadingsearch = false;
|
||||
$scope.loadingsearch = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// select all or individual functionality
|
||||
// var getAllSelected = function () {
|
||||
// var selectedItems = $scope.searchResultDetails.filter(function (item) {
|
||||
// return item.Selected;
|
||||
// });
|
||||
|
||||
// return selectedItems.length === $scope.searchResultDetails.length;
|
||||
// }
|
||||
|
||||
// var setAllSelected = function (value) {
|
||||
// angular.forEach($scope.searchResultDetails, function (item) {
|
||||
// item.Selected = value;
|
||||
// });
|
||||
// }
|
||||
|
||||
// $scope.allSelected = function (value) {
|
||||
// if (value !== undefined) {
|
||||
// return setAllSelected(value);
|
||||
// } else {
|
||||
// return getAllSelected();
|
||||
// }
|
||||
// }
|
||||
|
||||
// Select one row in a table once
|
||||
// Select one row in a table once
|
||||
$scope.setOneSelect = function (value) {
|
||||
angular.forEach($scope.searchResultDetails, function (item) {
|
||||
item.Selected = false;
|
||||
@ -227,7 +173,15 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
$scope.OpenWindowStatus = true;
|
||||
$scope.openUpdateWind();
|
||||
}
|
||||
|
||||
|
||||
$scope.unSelect = function () {
|
||||
// alert(value.Selected);
|
||||
angular.forEach($scope.searchResultDetails, function (item) {
|
||||
item.Selected = false;
|
||||
});
|
||||
$scope.openUpdateWind();
|
||||
}
|
||||
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
@ -241,9 +195,7 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
|
||||
if (item.Selected === true) { return true; }
|
||||
});
|
||||
// $scope.getStatusList();
|
||||
// alert(ItemsSelected.length);
|
||||
if (ItemsSelected.length) {
|
||||
if (ItemsSelected.length) {
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
@ -271,8 +223,7 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
}
|
||||
}
|
||||
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");
|
||||
} else {
|
||||
} else {
|
||||
var selectedItems = [];
|
||||
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
|
||||
if (item.Selected === true && item.Status === 'Pending' ) {
|
||||
@ -303,6 +254,11 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
swal(" ", "Updated successfully,", "success");
|
||||
// for success state
|
||||
$scope.getDayBookList();
|
||||
$scope.unSelect();
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
}
|
||||
$scope.allSelected('undefined');
|
||||
$scope.OpenWindowStatus = false;
|
||||
} else {
|
||||
@ -324,7 +280,20 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$scope.showTheResType = function (type) {
|
||||
// alert(type);
|
||||
if (type == undefined) {
|
||||
$scope.searchResultDetails = $scope.searchResultDetailsCopy;
|
||||
} else {
|
||||
$scope.searchResultDetails = $scope.searchResultDetailsCopy.filter(val => {
|
||||
return val.Name == type ? 1 : 0;
|
||||
})
|
||||
}
|
||||
|
||||
// const filterAddSelect = $scope.searchResultDetails.filter(val => {
|
||||
|
||||
// });
|
||||
}
|
||||
|
||||
$scope.statusList = [{
|
||||
"status_id": 'TS001',
|
||||
@ -337,263 +306,6 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
"name": "Rejected",
|
||||
}];
|
||||
|
||||
$scope.data = [{
|
||||
"id": 1,
|
||||
"date": "20-12-2017",
|
||||
"incomeExpense": "Income",
|
||||
"type": "typeIncome1",
|
||||
"amount": "1000",
|
||||
"status": "Pending",
|
||||
"description": "income type income type income type"
|
||||
}, {
|
||||
"id": 2,
|
||||
"date": "20-12-2017",
|
||||
"incomeExpense": "Expense",
|
||||
"type": "typeIncome2",
|
||||
"amount": "2000",
|
||||
"status": "Pending",
|
||||
"description": "income type income type income type"
|
||||
}, {
|
||||
"id": 3,
|
||||
"date": "20-12-2017",
|
||||
"incomeExpense": "Expense",
|
||||
"type": "typeIncome3",
|
||||
"amount": "3000",
|
||||
"status": "Pending",
|
||||
"description": "income type income type income type"
|
||||
}];
|
||||
|
||||
$scope.incomeExpenseType = [{
|
||||
"type_id": 1,
|
||||
"type": "Income",
|
||||
"name": "fees"
|
||||
}, {
|
||||
"type_id": 2,
|
||||
"type": "Expense",
|
||||
"name": "food"
|
||||
}, {
|
||||
"type_id": 3,
|
||||
"type": "Expense",
|
||||
"name": "phone"
|
||||
}, {
|
||||
"type_id": 4,
|
||||
"type": "Expense",
|
||||
"name": "tea-coffee"
|
||||
}, {
|
||||
"type_id": 5,
|
||||
"type": "Expense",
|
||||
"name": "Paper"
|
||||
}];
|
||||
|
||||
$scope.getIncomeExpense = function () {
|
||||
$scope.incomeExpenseName = [{
|
||||
"type_id": 1,
|
||||
"type": "TYPE001",
|
||||
"name": "Income"
|
||||
}, {
|
||||
"type_id": 2,
|
||||
"type": "TYPE002",
|
||||
"name": "Expense"
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
$scope.getIncomeTypes = $scope.incomeExpenseType.filter(function (val) {
|
||||
return val.type === 'Income' ? 1 : 0;
|
||||
});
|
||||
$scope.getExpenseTypes = $scope.incomeExpenseType.filter(function (val) {
|
||||
return val.type === 'Expense' ? 1 : 0;
|
||||
});
|
||||
|
||||
$scope.getType = function (type) {
|
||||
// alert(type);
|
||||
$scope.myModelAdd.type = '';
|
||||
$scope.getTypes = type === 'Income' ? $scope.getIncomeTypes : $scope.getExpenseTypes;
|
||||
};
|
||||
|
||||
$scope.editId = -1;
|
||||
$scope.setEditId = function (P) {
|
||||
// alert(id);
|
||||
$scope.editId = P;
|
||||
}
|
||||
|
||||
$scope.editClose = function () {
|
||||
$scope.editId = -1;
|
||||
$scope.myModel = {
|
||||
"id": "",
|
||||
"date": "",
|
||||
"incomeExpense": "",
|
||||
"type": "",
|
||||
"amount": "",
|
||||
"status": "",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
||||
$scope.myModel = {
|
||||
"id": "",
|
||||
"date": "",
|
||||
"incomeExpense": "",
|
||||
"type": "",
|
||||
"amount": "",
|
||||
"status": "",
|
||||
"description": ""
|
||||
}
|
||||
|
||||
$scope.copyModel = function (p) {
|
||||
$scope.myModel = {
|
||||
"id": p.id,
|
||||
"date": p.date,
|
||||
"incomeExpense": p.incomeExpense,
|
||||
"type": p.type,
|
||||
"amount": p.amount,
|
||||
"status": p.status,
|
||||
"description": p.description
|
||||
}
|
||||
}
|
||||
|
||||
// delete the entry row from the daybook list
|
||||
$scope.deleEditEntry = function (id) {
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Your will not be able to recover this record!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn-danger",
|
||||
confirmButtonText: "Yes, delete it!",
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function () {
|
||||
$scope.indexDelete2();
|
||||
// if( $scope.indexDelete2() === true) {
|
||||
// $scope.data;
|
||||
// swal("Deleted!", "Your imaginary file has been deleted.", "success");
|
||||
// }
|
||||
});
|
||||
$scope.indexDelete2 = function () {
|
||||
let ans = $scope.data.some(function (val, i) {
|
||||
if (val.id === id) {
|
||||
$scope.data.splice(i, 1);
|
||||
swal("Deleted!", "Your record has been deleted.", "success");
|
||||
return true;
|
||||
}
|
||||
}); return ans;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.myModelAdd = {
|
||||
"id": "",
|
||||
"date": "",
|
||||
"name": "",
|
||||
"type": "",
|
||||
"amount": "",
|
||||
"status": "",
|
||||
"description": ""
|
||||
}
|
||||
|
||||
// add a new entry to the day book list
|
||||
$scope.daybookAdd = {
|
||||
submit: function (form, myModelAdd) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
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");
|
||||
} else {
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
|
||||
$scope.myModelAdd.status = 'Pending';
|
||||
$scope.data.push(myModelAdd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update daybook entry data from the list
|
||||
$scope.daybookeditUpdate = {
|
||||
submit: function (form, myModel) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
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");
|
||||
} else {
|
||||
// var studentForUpdate = [];
|
||||
// let formate = "dd-MM-yyyy";
|
||||
// $scope.myStatusModel.dateOn = $filter('date')(new Date($scope.myStatusModel.dateOn), formate);
|
||||
// var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
|
||||
// if (item.Selected === true) {
|
||||
// let getStudentID = new getStudentForUpdateDetails(item.StudentID);
|
||||
// studentForUpdate.push(getStudentID);
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
// function getStudentForUpdateDetails(id) {
|
||||
// this.StudentID = id;
|
||||
// this.CourseID = $scope.myStatusModel.semYear;
|
||||
// this.BranchCode = localDetails.localBranchID;
|
||||
// this.ListCode = $scope.myStatusModel.staus;
|
||||
// this.SDate = $scope.myStatusModel.dateOn;
|
||||
// this.Coursedetail = id;
|
||||
// this.Comments = $scope.myStatusModel.comment;
|
||||
// }
|
||||
// // alert(JSON.stringify($scope.myStatusModel));
|
||||
// // alert(JSON.stringify(studentForUpdate));
|
||||
|
||||
// var updateStudyMaterial = {
|
||||
// method: 'POST',
|
||||
// url: apiPoint.url + 'updateStudentMaterialStatus/',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// data: {
|
||||
// data: studentForUpdate,
|
||||
// requestDetails : localDetails
|
||||
// }
|
||||
// };
|
||||
// $http(updateStudyMaterial).then(function (response) {
|
||||
// if (response.data.addStatus) {
|
||||
// swal("Success!", response.data.message, "success");
|
||||
// // for success state
|
||||
// $scope.allSelected('undefined');
|
||||
// $scope.OpenWindowStatus = false;
|
||||
// } else {
|
||||
// swal("Failed!", response.data.message, "error");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
// reset: function (form) {
|
||||
// form.$setPristine(true);
|
||||
// $scope.myStatusModel = {
|
||||
// 'semYear': '',
|
||||
// 'staus': '',
|
||||
// 'dateOn': '',
|
||||
// 'comment': ''
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
// getFinanceModuleAccess();
|
||||
// // if(getFinanceModuleAccess()){
|
||||
$scope.dayBookApprovalAccess = localDetail.is_DayBookApproval_Access;
|
||||
$scope.showTheRefValue = 'I001';
|
||||
$scope.showTheRefValue = undefined;
|
||||
$scope.localTypeViewAdmin = true;
|
||||
$scope.currentDate = new Date();
|
||||
var d = new Date();
|
||||
@ -58,7 +58,7 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
$http(getFinacnceModuleAcccessCtrl).then(function (response) {
|
||||
if (response.data.dayBkAccessChkStatus) {
|
||||
$scope.dayBookApprovalAccess = response.data.dayBkAccessChk_Value;
|
||||
$scope.showTheRefValue = 'I001';
|
||||
$scope.showTheRefValue = undefined;
|
||||
$scope.localTypeViewAdmin = true;
|
||||
$scope.currentDate = new Date();
|
||||
var formate = "dd-MM-yyyy";
|
||||
@ -157,6 +157,7 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
return val;
|
||||
});
|
||||
$scope.searchResultDetails = filterAddSelect;
|
||||
$scope.searchResultDetailsCopy = filterAddSelect;
|
||||
} else {
|
||||
$scope.loadingsearch = false;
|
||||
}
|
||||
@ -173,6 +174,14 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
$scope.openUpdateWind();
|
||||
}
|
||||
|
||||
$scope.unSelect = function () {
|
||||
// alert(value.Selected);
|
||||
angular.forEach($scope.searchResultDetails, function (item) {
|
||||
item.Selected = false;
|
||||
});
|
||||
$scope.openUpdateWind();
|
||||
}
|
||||
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
@ -245,6 +254,11 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
swal(" ", "Updated successfully,", "success");
|
||||
// for success state
|
||||
$scope.getDayBookList();
|
||||
$scope.unSelect();
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
}
|
||||
$scope.allSelected('undefined');
|
||||
$scope.OpenWindowStatus = false;
|
||||
} else {
|
||||
@ -266,7 +280,16 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
}
|
||||
}
|
||||
|
||||
$scope.showTheResType = function(type){
|
||||
$scope.showTheResType = function (type) {
|
||||
// alert(type);
|
||||
if (type == undefined) {
|
||||
$scope.searchResultDetails = $scope.searchResultDetailsCopy;
|
||||
} else {
|
||||
$scope.searchResultDetails = $scope.searchResultDetailsCopy.filter(val => {
|
||||
return val.Name == type ? 1 : 0;
|
||||
})
|
||||
}
|
||||
|
||||
// const filterAddSelect = $scope.searchResultDetails.filter(val => {
|
||||
|
||||
// });
|
||||
|
||||
@ -75,7 +75,7 @@
|
||||
</label>
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(showTheRefValue)"
|
||||
required>
|
||||
<option value="" disabled selected>Select</option>
|
||||
<option value="" selected>Select</option>
|
||||
<option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
||||
@ -276,6 +276,7 @@
|
||||
<form name="Form" id="form" novalidate ng-submit="statusUpdate.submit(Form, myStatusModel)" method="post">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
|
||||
@ -285,6 +286,9 @@
|
||||
Update Status
|
||||
</legend>
|
||||
<div class="row">
|
||||
<a id="cancel_button" ng-click="unSelect()" tooltip="Close">
|
||||
<span class="glyphicon glyphicon-remove-circle"></span>
|
||||
</a>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8 form-group" ng-class="{'has-error':Form.status.$dirty && Form.status.$invalid, 'has-success':Form.status.$valid}">
|
||||
|
||||
@ -44,18 +44,9 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<!--<div class="col-md-3">
|
||||
<script>
|
||||
$(function () {
|
||||
$("#search").focus();
|
||||
});
|
||||
</script>
|
||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||
</div>-->
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<!--<pre>{{searchData.date}}</pre>-->
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<label>
|
||||
From Date
|
||||
</label>
|
||||
@ -67,8 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!--<pre>{{searchData.date}}</pre>-->
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<label>
|
||||
To Date
|
||||
</label>
|
||||
@ -83,30 +73,15 @@
|
||||
<label for="form-field-select-2">
|
||||
Income/Expense
|
||||
</label>
|
||||
<!--<pre>{{incomeExpenseName }}</pre>-->
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(myModelAdd.name)"
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(showTheRefValue)"
|
||||
required>
|
||||
<option value="" disabled selected>Select</option>
|
||||
<option value="" selected>Select</option>
|
||||
<option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
Income/Expense
|
||||
</label>
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(myModelAdd.name)"
|
||||
required>
|
||||
<option value="" disabled selected>Select</option>
|
||||
<option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
|
||||
|
||||
</div>
|
||||
</div>-->
|
||||
<div>
|
||||
<div ng-show="loadingsearch" class="center">
|
||||
<span style="color: #007AFF;
|
||||
@ -117,7 +92,7 @@
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">No
|
||||
records found... </h3></strong></p>
|
||||
</div>
|
||||
<div ng-if="showTheRefValue == 'I002'">
|
||||
<!--<div ng-if="showTheRefValue == 'I002'">
|
||||
<style>
|
||||
.listCoutShow {
|
||||
margin: 12px;
|
||||
@ -147,7 +122,6 @@
|
||||
<table style="width: 100%;" class="table table-hover" ng-if="dataLengthIncome > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th ng-click="sort('Date')">Date
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Date'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
@ -155,24 +129,18 @@
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th>Voucher Number
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
</th>
|
||||
<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>
|
||||
</th>
|
||||
<th>Description/Comments
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
</th>
|
||||
<th ng-click="sort('TypeName')">Type
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='TypeName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th>Amount
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
</th>
|
||||
|
||||
<!--<th ng-click="sort('amount')">Status
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in IncomeData|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
@ -192,25 +160,14 @@
|
||||
</td>
|
||||
<td>{{p.TypeName}}</td>
|
||||
<td>{{p.Amount}}</td>
|
||||
<!-- <td>
|
||||
<div id="containersPara">
|
||||
<div id="wrapper">
|
||||
{{p.Description}}
|
||||
</div>
|
||||
</div>
|
||||
</td> -->
|
||||
<!--<td tooltip="{{p.Approval_Comments}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
|
||||
<span ng-if="p.Status == 'Approved'" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">{{p.Status}}</span>
|
||||
<span ng-if="p.Status == 'Rejected'" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">{{p.Status}}</span>
|
||||
</td>-->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="showTheRefValue == 'I001'">
|
||||
</div>-->
|
||||
<div>
|
||||
<style>
|
||||
.listCoutShow {
|
||||
margin: 12px;
|
||||
@ -237,7 +194,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table style="width: 100%;" class="table table-hover" ng-if="dataLengthExpense > 0">
|
||||
<table style="width: 100%;" class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-if="dayBookApprovalAccess == '1'">
|
||||
@ -267,16 +224,16 @@
|
||||
</th>
|
||||
|
||||
<th ng-click="sort('Status')">Status
|
||||
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Status'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Status'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in searchResultDetails|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tbody dir-paginate="p in searchResultDetails|itemsPerPage:10">
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label ng-if="dayBookApprovalAccess == '1' && p.Status == 'Pending'">
|
||||
<input type="checkbox" ng-model="p.Selected" ng-change="setOneSelect(p)" />
|
||||
<input type="checkbox" ng-model="p.Selected" ng-change="setOneSelect(p)" />
|
||||
<!--{{p.StudentID}}-->
|
||||
</label>
|
||||
</td>
|
||||
@ -319,6 +276,7 @@
|
||||
<form name="Form" id="form" novalidate ng-submit="statusUpdate.submit(Form, myStatusModel)" method="post">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
|
||||
@ -328,6 +286,9 @@
|
||||
Update Status
|
||||
</legend>
|
||||
<div class="row">
|
||||
<a id="cancel_button" ng-click="unSelect()" tooltip="Close">
|
||||
<span class="glyphicon glyphicon-remove-circle"></span>
|
||||
</a>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-8 form-group" ng-class="{'has-error':Form.status.$dirty && Form.status.$invalid, 'has-success':Form.status.$valid}">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user