daybook superadmin updation: kdk

This commit is contained in:
resicovenba 2018-03-15 14:08:58 +05:30
parent d85d233fd6
commit bd77da968c
2 changed files with 706 additions and 728 deletions

View File

@ -3,43 +3,140 @@
* daybook details capturing
*
*/
app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", 'ipCookie', '$window', function ($scope, $rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state, ipCookie, $window) {
app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", 'ipCookie', '$window','SweetAlert', '$timeout', function ($scope, $rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state, ipCookie, $window, SweetAlert, $timeout) {
// get local client details
var localDetail = JSON.parse(localStorage.getItem('localObj'));
var localDetails = ipCookie('cookiechk');
$scope.localTypeViewAdmin = false;
$scope.localTypeViewSuperAdmin = false;
$scope.searchData = {
"date": "",
"dateTo": ""
}
// get details functionality when page get loaded
$scope.viewStudentDetailsPage = false;
// load when html page load
$scope.init = function () {
const LOCALTYPE = localDetail.localType;
if (LOCALTYPE === 'R004') {
$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();
if (localDetail != null) {
if (localDetails.localType === 'R004') {
$scope.getBranchList();
} else {
ipCookie.remove('cookiechk');
$window.localStorage.clear();
$state.go('login.signin');
}
} else {
ipCookie.remove('cookiechk');
$window.localStorage.clear();
$state.go('login.signin');
}
}
$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()
}
function getDetails() {
const LOCALTYPE = localDetail.localType;
if(LOCALTYPE === 'R004') {
$scope.currentDate = new Date();
var d = new Date();
$scope.oneMonthBefore = d.setMonth(d.getMonth()-1);
// alert($scope.oneMonthBefore);
var formate = "dd-MM-yyyy";
$scope.searchData.date = $filter('date')(new Date($scope.oneMonthBefore), formate);
$scope.searchData.dateTo = $filter('date')(new Date($scope.currentDate), formate);
$scope.getDayBookList();
$scope.getIncomeExpenseType_Status();
$scope.viewStudentDetailsPage = true;
}else {
ipCookie.remove('cookiechk');
$window.localStorage.clear();
$state.go('login.signin');
}
}
// get the data while page loading functions goes here
// $scope.init = function () {
// const LOCALTYPE = localDetail.localType;
// if(LOCALTYPE === 'R003') {
// $scope.currentDate = new Date();
// var d = new Date();
// $scope.oneMonthBefore = d.setMonth(d.getMonth()-1);
// // alert($scope.oneMonthBefore);
// var formate = "dd-MM-yyyy";
// $scope.searchData.date = $filter('date')(new Date($scope.oneMonthBefore), formate);
// $scope.searchData.dateTo = $filter('date')(new Date($scope.currentDate), formate);
// $scope.getDayBookList();
// $scope.getIncomeExpenseType_Status();
// }else {alert();
// ipCookie.remove('cookiechk');
// $window.localStorage.clear();
// $state.go('login.signin');
// }
// }
$scope.dayBookApprovalAccess = '';
// Finance module access control
function getFinanceModuleAccess() {
var getFinacnceModuleAcccessCtrl = {
method: 'POST',
url: apiPoint.url + 'empDayBookModuleAccessChk/',
headers: {
'Content-Type': 'application/json'
},
data: {
localReqDetails: localDetails
}
};
$http(getFinacnceModuleAcccessCtrl).then(function (response) {
if (response.data.dayBkAccessChkStatus) {
$scope.dayBookApprovalAccess = response.data.dayBkAccessChk_Value;
$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.getDayBookList();
$scope.getIncomeExpenseType_Status();
return true;
} else {
return true;
}
});
}
// $scope.getApproveLoad = function() {
// alert();
// }
// change from date, update and call search functionality
$scope.changeDate = function () {
if ($scope.searchData.date !== undefined) {
if($scope.searchData.date !== undefined) {
var formate = "dd-MM-yyyy";
$scope.searchData.date = $filter('date')(new Date($scope.searchData.date), formate);
$scope.getDayBookList();
@ -51,7 +148,7 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
// change to date, update and call search functionality
$scope.changeToDate = function () {
if ($scope.searchData.dateTo !== undefined) {
if($scope.searchData.dateTo !== undefined) {
var formate = "dd-MM-yyyy";
$scope.searchData.dateTo = $filter('date')(new Date($scope.searchData.dateTo), formate);
$scope.getDayBookList();
@ -67,6 +164,39 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
}
$scope.noRecordFound = true;
$scope.dataLength = 0;
// get day book type name list
$scope.getDayBookList = function () {
var getDatBookListDetails = {
method: 'POST',
url: apiPoint.url + 'getDayBookDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: $scope.searchData,
localReqDetails: localDetails,
}
};
$http(getDatBookListDetails).then(function (response) {
if (response.data.dayBookListStatus) {
$scope.data = response.data.dayBookListDetails;
$scope.dataLength = $scope.data.length;
if ($scope.data.length !== 0) {
$scope.noRecordFound = false;
} else {
$scope.noRecordFound = true;
}
// alert(JSON.stringify($scope.data));
// $scope.incomeExpenseType = response.data.typeNameList;
} else {
}
});
}
// income expense type status list
$scope.getIncomeExpenseType_Status = function () {
var getIncomeExpenseType = {
@ -88,274 +218,16 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
});
}
$scope.loadingsearch = false;
$scope.noRecordFound = true;
$scope.noRecordFoundSearch = false;
$scope.dataLengthIncome = 0;
$scope.dataLengthExpense = 0;
// day book entry list
$scope.getDayBookList = function () {
$scope.loadingsearch = true;
$scope.noRecordFoundSearch = false;
var getDatBookListDetails = {
method: 'POST',
url: apiPoint.url + 'getDayBookDetailsSuperAdmin/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: $scope.searchData,
localReqDetails: localDetails,
}
};
$http(getDatBookListDetails).then(function (response) {
if (response.data.dayBookListStatus) {
$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 => {
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;
} else {
$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();
}
}
$scope.myStatusModel = {
'staus': '',
'description': '',
}
// End: select all or individual functionality
$scope.OpenWindowStatus = false;
// open popup window when checkbox get selected / close popup window uncheck the selected items
$scope.openUpdateWind = function () {
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) { return true; }
});
// $scope.getStatusList();
// alert(ItemsSelected.length);
if (ItemsSelected.length) {
$scope.myStatusModel = {
'staus': '',
'description': '',
}
$scope.OpenWindowStatus = true;
} else {
$scope.OpenWindowStatus = false;
}
}
// update the status details
$scope.statusUpdate = {
submit: function (form, myStatusModel) {
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 selectedItems = [];
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) {
let itemGetID = new getUpdateDetails(item.ID);
selectedItems.push(itemGetID);
return true;
}
});
function getUpdateDetails(id) {
this.dabookListId = id;
this.ListCodeStatus = $scope.myStatusModel.staus;
this.comments = $scope.myStatusModel.description;
}
// alert(JSON.stringify($scope.myStatusModel));
// alert(JSON.stringify(selectedItems));
var updateStudyMaterial = {
method: 'POST',
url: apiPoint.url + 'updateDayBookStatusAdmin/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: selectedItems,
requestDetails: localDetails
}
};
$http(updateStudyMaterial).then(function (response) {
if (response.data.addStatus) {
swal(" ", "Updated successfully.", "success");
// for success state
$scope.getDayBookList();
$scope.allSelected('undefined');
$scope.OpenWindowStatus = false;
} else {
swal(" ", response.data.message, "error");
}
});
}
},
reset: function (form) {
form.$setPristine(true);
$scope.myStatusModel = {
'staus': '',
'description': '',
}
}
}
$scope.statusList = [{
"status_id": 'TS001',
"name": "Pending",
}, {
"status_id": 'TS002',
"name": "Approved",
}, {
"status_id": 'TS003',
"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;
});
// parse the income and expense type from the list
$scope.getType = function (type) {
// alert(type);
$scope.getIncomeTypes = $scope.incomeExpenseType.filter(function (val) {
return val.TypeID === 'I002' ? 1 : 0;
});
$scope.getExpenseTypes = $scope.incomeExpenseType.filter(function (val) {
return val.TypeID === 'I001' ? 1 : 0;
});
$scope.myModelAdd.type = '';
$scope.getTypes = type === 'Income' ? $scope.getIncomeTypes : $scope.getExpenseTypes;
$scope.getTypes = type === 'I002' ? $scope.getIncomeTypes : $scope.getExpenseTypes;
};
$scope.editId = -1;
@ -373,7 +245,12 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
"type": "",
"amount": "",
"status": "",
"description": ""
"description": "",
"paidTo": "",
"description_paid": "",
"voucherNumber": "",
"branch":"",
"name":""
}
}
@ -384,22 +261,73 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
"type": "",
"amount": "",
"status": "",
"description": ""
"description": "",
"paidTo": "",
"description_paid": "",
"voucherNumber": "",
"branch": "",
"name":""
}
$scope.copyModel = function (p) {
console.log(p);
$scope.myModel = {
"id": p.id,
"date": p.date,
"incomeExpense": p.incomeExpense,
"type": p.type,
"amount": p.amount,
"status": p.status,
"description": p.description
"id": p.ID,
"date": p.Date,
"incomeExpense": p.Name,
"type": p.Type,
"amount": p.Amount,
"status": p.Status,
"description": p.Description,
"paidTo": p.PaidTo,
"description_paid": p.PaidDescription,
"voucherNumber": p.VoucherNumber,
"branch":p.BranchCode,
"name": p.Name
}
// alert(JSON.stringify($scope.myModel));
}
// delete the entry row from the daybook list
//delete the income entry From the fees payable
$scope.deleteFeePayableEntry = function (id) {
// alert(id);
SweetAlert.swal({
title: "Warning!",
text: "Do you want to Delete this Entry ?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#007aff",
confirmButtonText: "Yes!"
}, function (res) {
if (res === true) {
// alert(id);
// alert(stuId);
var deleteFeePayableDetails = {
method: 'POST',
url: apiPoint.url + 'deleteDayBookFeePayableDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: id,
requestDetails: localDetails
}
};
$http(deleteFeePayableDetails).then(function (response) {
if (response.data.deletedStatus) {
swal(" ", "Deleted Successfully.", "success");
$scope.getDayBookList();
} else {
swal(" ", response.data.message, "error");
}
});
}
});
}
// delete the income/expense list row
$scope.deleEditEntry = function (id) {
swal({
title: "Are you sure?",
@ -411,22 +339,29 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
closeOnConfirm: false
},
function () {
$scope.indexDelete2();
// if( $scope.indexDelete2() === true) {
// $scope.data;
// swal("Deleted!", "Your imaginary file has been deleted.", "success");
// }
$scope.indexDelete2(id);
});
$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;
$scope.indexDelete2 = function (id) {
var deleteDetails = {
method: 'POST',
url: apiPoint.url + 'deleteDayBookDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: id,
requestDetails: localDetails
}
}); return ans;
};
$http(deleteDetails).then(function (response) {
if (response.data.deletedStatus) {
swal(" ", "Deleted Successfully.", "success");
$scope.getDayBookList();
} else {
swal(" ", response.data.message, "error");
}
});
}
}
$scope.myModelAdd = {
@ -436,10 +371,13 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
"type": "",
"amount": "",
"status": "",
"description": ""
"description": "",
"paidTo": "",
"description_paid": "",
"voucherNumber": ""
}
// add a new entry to the day book list
// add a new daybook entry
$scope.daybookAdd = {
submit: function (form, myModelAdd) {
var firstError = null;
@ -458,15 +396,75 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
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);
$scope.myModelAdd.status = $scope.myModelAdd.name == 'I001' ? 'Pending' : 'Approved';
// $scope.data.push(myModelAdd);
var addDayBookDetails = {
method: 'POST',
url: apiPoint.url + 'addDayBook/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: myModelAdd,
localReqDetails: localDetails
}
};
$http(addDayBookDetails).then(function (response) {
if (response.data.addDayBookStatus) {
swal(" ", "Income/Expense added successfully.", "success");
// $state.go($state.current, {}, { reload: true });
$scope.viewStudentDetailsPage = false;
$scope.myActivateDiv();
} else {
swal(" ", response.data.message, "error");
}
});
}
},
reset: function (form) {
form.$setPristine(true);
$scope.myModelAdd = {
"id": "",
"date": "",
"name": "",
"type": "",
"amount": "",
"status": "",
"description": "",
"paidTo": "",
"description_paid": "",
"voucherNumber": ""
}
}
}
// update daybook entry data from the list
$scope.myActivateDiv = function () {
$scope.viewStudentDetailsPage = false;
$scope.myModelAdd = {
"id": "",
"date": "",
"name": "",
"type": "",
"amount": "",
"status": "",
"description": "",
"paidTo": "",
"description_paid": "",
"voucherNumber": ""
}
$timeout(function () {
getDetails();
}, 1000);
}
// update a daybook entry details
$scope.daybookeditUpdate = {
submit: function (form, myModel) {
var firstError = null;
@ -485,60 +483,30 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
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");
// }
// });
// alert(JSON.stringify($scope.myModel));exit();
var updateDayBookDetails = {
method: 'POST',
url: apiPoint.url + 'updateDayBookDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: $scope.myModel,
requestDetails: localDetails
}
};
$http(updateDayBookDetails).then(function (response) {
if (response.data.updateDetailsStatus) {
swal(" ","Updated successfully.", "success");
// for success state
$scope.editId = -1;
$scope.getDayBookList();
} else {
swal(" ", response.data.message, "error");
}
});
}
},
// reset: function (form) {
// form.$setPristine(true);
// $scope.myStatusModel = {
// 'semYear': '',
// 'staus': '',
// 'dateOn': '',
// 'comment': ''
// }
// }
}
}
}]);

View File

@ -10,393 +10,403 @@
<!-- end: PAGE TITLE -->
<!-- start: DAY BOOK -->
<div class="container-fluid container-fullw bg-white">
<div ng-controller="daybooksuperadminCtrl">
<div ng-init="init()">
<style>
/*#wrapper {
width: 200px;
height: 110px;
}*/
<div ng-controller="daybooksuperadminCtrl" >
<div class="container" ng-init="init()">
<div class="row">
<div class="col-lg-4"></div>
<div class="col-lg-4">
<div>
<label for="form-field-select-2">
Select Branch
</label>
#containersPara {
/*background-color: #fff;*/
width: 180px;
height: 75px;
/*overflow-x: scroll;*/
color: rgba(7, 21, 176, 0.7);
overflow: auto;
display: flex;
justify-content: center;
flex-direction: column;
}
/*.square {
background-color: #00b;
float: left;
height: 90px;
width: 90px;
margin: 5px;
}*/
</style>
<div ng-if="localTypeViewSuperAdmin">
<tabset class="tabbable">
<tab heading="View" id="viewDayBook">
<div class="container-fluid container-fullw">
<select class="form-control" tabindex="0" class="cs-select cs-skin-elastic" name="branch" ng-model="localBranchDetails" ng-change="changeBranch()"
id="selectBranch" required>
<option value="" disabled selected>Select Branch</option>
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
</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>
<div ng-if="viewStudentDetailsPage">
<tabset class="tabbable">
<tab heading="View" id="viewDayBook">
<div class="container-fluid container-fullw">
<div class="row">
<!--<div class="col-md-12" align="center">
<spinner name="html5spinner">
<div class="overlay"></div>
<div class="spinner">
<div class="double-bounce1"></div>
<div class="double-bounce2"></div>
</div>
<div class="please-wait">Please Wait...</div>
</spinner>
</div>
<div class="col-md-12" ng-if="studentData == false" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h3 class="text-center">No
records found... </h3></strong></p>
</div>-->
<div class="col-md-12">
<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">
<label>
<!--<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">
<label>
From Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeDate()"
show-button-bar="true" />
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-4">
<!--<pre>{{searchData.date}}</pre>-->
<div data-ng-controller="DatepickerDemoCtrl">
<label>
</div>
</div>
<div class="col-md-4">
<!--<pre>{{searchData.date}}</pre>-->
<div data-ng-controller="DatepickerDemoCtrl">
<label>
To Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.dateTo"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeToDate()"
show-button-bar="true" />
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.dateTo"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeToDate()"
show-button-bar="true" />
</div>
</div>
<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>
<!--<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)"
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 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;
font-size: 16px;">Loading...</span>
</div>
</div>
<div class="center" ng-show="noRecordFoundSearch">
<p style="color: red;" align="center"><strong><h3 class="text-center">No
records found... </h3></strong></p>
</div>
<div ng-if="showTheRefValue == 'I002'">
<style>
.listCoutShow {
margin: 12px;
padding: 4px;
padding-left: 10px;
padding-right: 10px;
border: 1px solid #59b176;
border-radius: 7px;
color: #FFF;
background-color: #5fba7d;
text-align: center;
}
/*#wrapper{
display: flex;
justify-content: center;
flex-direction: column;
height: 400px;
}*/
</style>
<div class="row" ng-if="dataLengthIncome > 0">
<div class="pull-right">
<div style="margin: 8px;">
<div style="width: 45px; display: initial;">
<span style="font-size: 14px;
color: black;">Total Count:</span>
<span class="listCoutShow">{{ dataLengthIncome }}</span>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table style="width: 100%;" class="table table-hover" ng-if="dataLengthIncome > 0">
<thead>
<tr>
<th ng-click="sort('BranchName')">Branch/Date
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='BranchName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<!--<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>-->
<th ng-click="sort('ListName')">Income/Expense
<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 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 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">
<tr>
<td>{{p.BranchName}}<br>{{p.Date}}</td>
<!--<td>{{p.Date}}</td>-->
<td>{{p.ListName}}</td>
<td>{{p.VoucherNumber}}</td>
<td>{{p.PaidTo}}</td>
<td>
<div id="containersPara">
<div id="wrapper">
{{p.PaidDescription}} / {{p.Description}}
</div>
</div>
</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'">
<style>
.listCoutShow {
margin: 12px;
padding: 4px;
padding-left: 10px;
padding-right: 10px;
border: 1px solid #59b176;
border-radius: 7px;
color: #FFF;
background-color: #5fba7d;
text-align: center;
}
/*#wrapper{
display: flex;
justify-content: center;
flex-direction: column;
height: 400px;
}*/
</style>
<div class="row" ng-if="dataLengthExpense > 0">
<div class="pull-right">
<div style="margin: 8px;">
<div style="width: 45px; display: initial;">
<span style="font-size: 14px;
color: black;">Total Count:</span>
<span class="listCoutShow">{{ dataLengthExpense }}</span>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table style="width: 100%;" class="table table-hover" ng-if="dataLengthExpense > 0">
<thead>
<tr>
<th ng-click="sort('BranchName')">Branch/Date
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='BranchName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<!--<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>-->
<th ng-click="sort('ListName')">Income/Expense
<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 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 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('Status')">Status
<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">
<tr>
<td>{{p.BranchName}}<br>{{p.Date}}</td>
<!--<td>{{p.Date}}</td>-->
<td>{{p.ListName}}</td>
<td>{{p.VoucherNumber}}</td>
<td>{{p.PaidTo}}</td>
<td>
<div id="containersPara">
<div id="wrapper">
{{p.PaidDescription}} / {{p.Description}}
</div>
</div>
</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}} BY {{p.Approved_by_name}}"><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>
</div>
</div>
<div ng-if="OpenWindowStatus">
<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>
<!--<div class="col-md-12" ng-if="noRecordFound == true" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h3 class="text-center">No
records found... </h3></strong></p>
</div>-->
<style>
.listCoutShow {
margin: 12px;
padding: 4px;
padding-left: 10px;
padding-right: 10px;
border: 1px solid #59b176;
border-radius: 7px;
color: #FFF;
background-color: #5fba7d;
text-align: center;
}
</style>
<div class="col-md-4">
<fieldset style="background-color: #eaeaea;">
<legend>
Update Status
</legend>
<div class="row">
<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}">
<label for="form-field-select-2">
Status <span class="symbol required"></span>
<div class="row">
<div class="pull-right">
<div style="margin: 8px;">
<div style="width: 45px; display: initial;">
<span style="font-size: 14px;
color: black;">Total Count:</span> <span class="listCoutShow">{{ dataLength }}</span>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover">
<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>
<th ng-click="sort('ListName')">Income/Expense
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Voucher Number / Bill Number
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Paid To / Received From
<!--<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('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=='Amount'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Balance
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Amount'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th class="center" 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>-->
</th>
<th class="center">Activity
</th>
</tr>
</thead>
<tbody dir-paginate="p in data|itemsPerPage:10">
<tr>
<td>{{p.Date}}</td>
<td>{{p.ListName}}</td>
<td>{{p.VoucherNumber}}</td>
<td>{{p.PaidTo}}</td>
<td>
<span ng-if=" p.PaymentStatus == 1 ">{{p.TypeName}}</span>
<span tooltip="Fees Updation" ng-if=" p.PaymentStatus == 0 " style="color:chocolate">{{p.TypeName}}</span></td>
<td>{{p.Amount}}</td>
<td>{{p.Balance}}</td>
<!--<td class="center" tooltip="{{p.Approval_Comments}}" ng-if="p.ListName == 'Income'">
- </td>-->
<td class="center" 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>
<td class="center" ng-if="p.Status != 'Pending' && p.ListName != 'Income' ">-</td>
<td class="center" ng-if="p.ListName == 'Income' ">
<span ng-if=" p.PaymentStatus == 1 "> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
<span ng-if=" p.PaymentStatus == 0 ">
<i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleteFeePayableEntry(p.ID)"></i>
</span>
</td>
<td class="center" ng-if="p.Status == 'Pending'">
<span ng-if=" p.PaymentStatus == 1 ">
<span> <i tooltip="EDIT" class="glyphicon glyphicon-pencil" ng-click="setEditId(p.ID)"></i> </span>
<span> <i tooltip="DELETE" class="glyphicon glyphicon-remove" ng-click="deleEditEntry(p.ID)"></i> </span>
</span>
</td>
</tr>
<tr ng-show="editId === p.ID" ng-if="editId === p.ID">
<!--<pre>{{ p }}</pre>-->
<td colspan="9">
<form name="Form" id="form" novalidate ng-submit="daybookeditUpdate.submit(Form, myModel)" method="post">
<div ng-init="copyModel(p)" class="container" style="background-color: rgb(248, 248, 248);
border-radius: 6px;padding: 22px;">
<div class="row">
<div class="col-md-4 form-group">
<label>
Voucher Number
</label>
<input type="text" name="editvoucherNumber" tabindex="1" placeholder="Enter Voucher Number" class="form-control" ng-model="myModel.voucherNumber"
/>
<span class="error text-small block" ng-if="Form.editvoucherNumber.$dirty && Form.editvoucherNumber.$invalid" ng-hide="Form.editvoucherNumber.$error.maxlength || Form.editvoucherNumber.$error.minlength || Form.editvoucherNumber.$error.pattern">Voucher Number is required.</span>
</div>
<div class="col-md-4 form-group" ng-class="{'has-error':Form.editpaidTo.$dirty && Form.editpaidTo.$invalid, 'has-success':Form.editpaidTo.$valid}">
<label>
Paid To / Received From
</label>
<input type="text" name="editpaidTo" tabindex="1" placeholder="Enter Paid To / Received From" class="form-control" ng-model="myModel.paidTo"
/>
<span class="error text-small block" ng-if="Form.editpaidTo.$dirty && Form.editpaidTo.$invalid" ng-hide="Form.editpaidTo.$error.maxlength || Form.editpaidTo.$error.minlength || Form.editpaidTo.$error.pattern">Paid To / Received From is required.</span>
</div>
<div class="col-md-4">
<label>
Description
</label>
<textarea type="text" placeholder="Enter Description" tabindex="3" class="form-control" name="editdescription_paid" ng-model="myModel.description_paid"
maxlength="100" />
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
<span class="error text-small block" ng-if="Form.editdescription_paid.$dirty && Form.editdescription_paid.$error.pattern">Invalid Description</span>
</div>
</div>
<div class="row">
<div class="col-md-4" ng-class="{'has-error':Form.editType.$dirty && Form.editType.$invalid, 'has-success':Form.editType.$valid}">
<label for="form-field-select-2">
Type <span class="symbol required"></span>
</label>
<select class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="status" ng-model="myStatusModel.staus"
required>
<option value="" disabled selected>Select Status</option>
<option ng-repeat="itemStatus in statusList" value="{{itemStatus.name}}">{{itemStatus.name}}</option>
<select class="form-control" ng-init="getType(p.Name)" tabindex="1" class="cs-select cs-skin-elastic" name="editType" ng-model="myModel.type"
required>
<option value="" disabled selected>Select Type</option>
<option ng-repeat="typeItem in getTypes" ng-selected="typeItem.ID == p.Type" value="{{typeItem.ID}}">{{typeItem.TypeName}}</option>
</select>
<span class="error text-small block" ng-if="Form.status.$dirty && Form.status.$error.required">Status is Required</span>
<span class="error text-small block" ng-if="Form.editType.$dirty && Form.editType.$error.required">Type is Required</span>
</div>
</div>
<div class="col-md-4" ng-class="{'has-error':Form.editAmount.$dirty && Form.editAmount.$invalid, 'has-success':Form.editAmount.$valid}">
<label>
Amount <span class="symbol required"></span>
</label>
<input type="text" name="editAmount" tabindex="2" placeholder="Enter Amount" class="form-control" ng-model="myModel.amount"
required/>
<span class="error text-small block" ng-if="Form.editAmount.$dirty && Form.editAmount.$error.required">Amount is Required </span>
</div>
<div>
<div class="row">
<div class="col-md-12 form-group" ng-class="{'has-error':Form.description.$dirty && Form.description.$invalid}">
<label>
</div>
<div class="col-md-4">
<label>
Comments
</label>
<textarea type="text" placeholder="Enter Comments" tabindex="3" class="form-control" name="description" ng-model="myStatusModel.description"
maxlength="100" />
<span class="text-small block">Max 100 Characters.</span>
<span class="error text-small block" ng-if="Form.description.$dirty && Form.description.$error.pattern">Invalid Comments</span>
<textarea type="text" placeholder="Enter Comments" tabindex="3" class="form-control" name="editComments" ng-model="myModel.description"
maxlength="100" />
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Charactes.</span>
<span class="error text-small block" ng-if="Form.description.$dirty && Form.description.$error.pattern">Invalid Comments</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="center">
<button type="submit" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success" data-style="zoom-in">
Update
<div class="row">
</div>
<div class="row">
<div class="center">
<button type="submit" ng-disabled="disableButton" tabindex="4" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
data-style="zoom-in">
Submit
</button>
<!--<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
Reset
</button>-->
<button type="cancel" ng-click="editClose()" tabindex="5" class="btn btn-warning btn-sm" ng-click="employeeForm.resetCourse(Form)">
Cancel
</button>
</div>
</div>
</div>
</div>
</fieldset>
</div>
</form>
</td>
<div class="col-md-4">
</div>
</div>
</div>
</form>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>
</tab>
</tabset>
</div>
</div>
</div>
</tab>
<tab heading="Add" id="addDayBook">
<!--<pre>{{myModelAdd}}</pre>-->
<div>
<form name="Form" id="form" novalidate ng-submit="daybookAdd.submit(Form, myModelAdd)" method="post">
<div>
<div class="row">
<div data-ng-controller="DatepickerDemoCtrl">
<div class="col-md-6 form-group" ng-class="{'has-error':Form.addDate.$dirty && Form.addDate.$invalid, 'has-success':Form.addDate.$valid}">
<label>
Date <span
class="symbol required"></span>
</label>
<input type="text" 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"
placeholder="Select Date" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
show-button-bar="true" />
<span class="error text-small block" ng-if="Form.addDate.$dirty && Form.addDate.$invalid" ng-hide="Form.addDate.$error.maxlength">Date is required.</span>
<span class="error text-small block" ng-if="Form.addDate.$error.maxlength">Enter a Valid Date </span>
</div>
</div>
<div class="col-md-6 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 <span class="symbol required"></span>
</label>
<!--<pre>{{incomeExpenseName }}</pre>-->
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="myModelAdd.name" ng-change="getType(myModelAdd.name)"
required>
<option value="" disabled selected>Select</option>
<option ng-repeat="typeName in incomeExpenseName" 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">
<label>
Voucher Number
</label>
<input type="text" name="voucherNumber" tabindex="1" placeholder="Enter Voucher Number" class="form-control" ng-model="myModelAdd.voucherNumber"
/>
<span class="error text-small block" ng-if="Form.paidTo.$dirty && Form.paidTo.$invalid" ng-hide="Form.voucherNumber.$error.maxlength || Form.voucherNumber.$error.minlength || Form.voucherNumber.$error.pattern">Voucher Number is required.</span>
</div>
<div class="col-md-4 form-group">
<label>
Paid To / Received From
</label>
<input type="text" name="paidTo" tabindex="1" placeholder="Enter Paid To / Received From" class="form-control" ng-model="myModelAdd.paidTo"
/>
<span class="error text-small block" ng-if="Form.paidTo.$dirty && Form.paidTo.$invalid" ng-hide="Form.paidTo.$error.maxlength || Form.paidTo.$error.minlength || Form.paidTo.$error.pattern">Paid To / Reveived From is required.</span>
</div>
<div class="col-md-4">
<label>
Description
</label>
<textarea type="text" placeholder="Enter Description" tabindex="3" class="form-control" name="description_paid" ng-model="myModelAdd.description_paid"
maxlength="100" />
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
<span class="error text-small block" ng-if="Form.description_paid.$dirty && Form.description_paid.$error.pattern">Invalid Description</span>
</div>
</div>
<div class="row">
<div class="col-md-4" ng-class="{'has-error':Form.addType.$dirty && Form.addType.$invalid, 'has-success':Form.addType.$valid}">
<label for="form-field-select-2">
Type <span class="symbol required"></span>
</label>
<select class="form-control" tabindex="1" class="cs-select cs-skin-elastic" name="addType" ng-model="myModelAdd.type" required>
<option value="" disabled selected>Select Type</option>
<option ng-repeat="typeItem in getTypes" value="{{typeItem.ID}}">{{typeItem.TypeName}}</option>
</select>
<span class="error text-small block" ng-if="Form.addType.$dirty && Form.addType.$error.required">Type is Required</span>
</div>
<div class="col-md-4" ng-class="{'has-error':Form.addAmount.$dirty && Form.addAmount.$invalid, 'has-success':Form.addAmount.$valid}">
<label>
Amount <span class="symbol required"></span>
</label>
<input type="text" ng-pattern="/^[0-9]*$/" name="addAmount" tabindex="2" placeholder="Enter Amount" class="form-control"
ng-model="myModelAdd.amount" required/>
<span class="error text-small block" ng-if="Form.addAmount.$dirty && Form.addAmount.$error.required">Amount is Required </span>
<!--<span class="error text-small block" ng-if="Form.addAmount.$dirty">Amount is Required </span>-->
</div>
<div class="col-md-4">
<label>
Comments
</label>
<textarea type="text" placeholder="Enter Comments" tabindex="3" class="form-control" name="addComments" ng-model="myModelAdd.description"
maxlength="100" />
<span class="text-small block" style="color: rgba(128, 128, 128, 0.64)">Max 100 Characters.</span>
<span class="error text-small block" ng-if="Form.addComments.$dirty && Form.addComments.$error.pattern">Invalid Comments</span>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="pull-right">
<button type="submit" ng-disabled="disableButton" tabindex="4" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success"
data-style="zoom-in">
Submit
</button>
<button type="cancel" ng-click="daybookAdd.reset(Form)" tabindex="5" class="btn btn-warning btn-sm" ng-click="employeeForm.resetCourse(Form)">
Reset
</button>
</div>
</div>
</div>
</form>
</div>
</tab>
<!--<tab heading="Approve Income/Expense" id="addDayBook" ng-if="dayBookApprovalAccess == '1'">
<div ng-init="getApproveLoad()">
</div>
</tab>-->
</tabset>
</div>
</div>
</div>