day book details update admin: kdk
This commit is contained in:
parent
a6c5889506
commit
d2ca4dbcea
@ -202,6 +202,7 @@ $route['updateCertificateDetails'] = 'Certificate_Controller/updateCertificateDe
|
||||
$route['deleteDayBookDetails'] = 'DayBook_Controller/deleteDayBookDetails';
|
||||
$route['updateDayBookDetails'] = 'DayBook_Controller/updateDayBookDetails';
|
||||
$route['getDayBookDetails'] = 'DayBook_Controller/getDayBookDetails';
|
||||
$route['getDayBookApprovalDetails'] = 'DayBook_Controller/getDayBookApprovalDetails';
|
||||
$route['getIncomeExpenseTypeState'] = 'DayBook_Controller/getIncomeExpenseTypeState';
|
||||
$route['addDayBook'] = 'DayBook_Controller/adddaybook';
|
||||
$route['updateDayBookStatusAdmin'] = 'DayBook_Controller/updateDayBookStatusAdmin';
|
||||
|
||||
@ -98,6 +98,26 @@ class DayBook_Controller extends REST_Controller {
|
||||
|
||||
}
|
||||
|
||||
public function getDayBookApprovalDetails_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqDataBy = $this->post('localReqDetails');
|
||||
$getDayBookApprovalDetails = $this->daybook_model->get_Daybook_Approval_Details_List($reqData, $reqDataBy);// Check if the employee exist
|
||||
if ($getDayBookApprovalDetails)
|
||||
{
|
||||
$getDayBookApprovalDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($getDayBookApprovalDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No list were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteDayBookDetails_post() {
|
||||
$reqData = $this->post('data');
|
||||
$reqbyData = $this->post('localReqDetails');
|
||||
|
||||
@ -98,6 +98,32 @@ class DayBook_model extends CI_Model
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function get_Daybook_Approval_Details_List($reqData, $reqDataBy) {
|
||||
if($reqData['date'] != '' && $reqData['dateTo'] != '') {
|
||||
$d = new DateTime($reqData['date']);
|
||||
$dTo = new DateTime($reqData['dateTo']);
|
||||
$fromDate = $d->format('Y-m-d');
|
||||
$toDate = $dTo->format('Y-m-d');
|
||||
$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
|
||||
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID
|
||||
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";
|
||||
}
|
||||
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
|
||||
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID
|
||||
WHERE t1.BranchCode = '$reqpayType' AND t1.Status NOT IN ('Approved', 'Cancel') ORDER BY ORDER_ID DESC";
|
||||
|
||||
}
|
||||
$dayBookDetails = $this->db->query($querys);
|
||||
$dayBookDetailsList = $dayBookDetails->result();
|
||||
$results['dayBookListStatus'] = true;
|
||||
$results['dayBookListDetails'] = $dayBookDetailsList;
|
||||
return $results;
|
||||
}
|
||||
|
||||
// delete the daybook details
|
||||
public function delete_dayBookDetails($id) {
|
||||
// echo $id;exit();
|
||||
@ -181,7 +207,10 @@ class DayBook_model extends CI_Model
|
||||
$currID = $latestUpdateDetails[0]->ID;
|
||||
}else{
|
||||
}
|
||||
$sql1 = " DELETE FROM ".DAYBOOKMASTER." WHERE FeesPaymentID ='$getID'";
|
||||
// $sql1 = " DELETE FROM ".DAYBOOKMASTER." WHERE FeesPaymentID ='$getID'";
|
||||
// $sql1 = " DELETE FROM ".DAYBOOKMASTER." WHERE FeesPaymentID ='$getID'";
|
||||
$sql1 = "UPDATE ".DAYBOOKMASTER." SET Status ='Cancel' WHERE FeesPaymentID ='$getID'";
|
||||
|
||||
// update branch to staff_branch table
|
||||
if ($this->db->query($sql1) == '1') {
|
||||
|
||||
@ -390,7 +419,7 @@ class DayBook_model extends CI_Model
|
||||
$branch = $updateDataDetails[0]->BranchCode;
|
||||
$Amount = 0;
|
||||
$Amount = $updateDataDetails[0]->Amount;
|
||||
if($updateDataDetails[0]->PaymentStatus === '1' ){
|
||||
if($updateDataDetails[0]->PaymentStatus === '1' || $updateDataDetails[0]->PaymentStatus === '0'){
|
||||
|
||||
|
||||
$sql = "SELECT * FROM ".DAYBOOKMASTER." WHERE (BranchCode = '$branch' AND ID < '$updateFor')
|
||||
@ -432,58 +461,57 @@ class DayBook_model extends CI_Model
|
||||
$result['addStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else if($updateDataDetails[0]->PaymentStatus === '0') {
|
||||
$currentVoucheNumber = $updateDataDetails[0]->VoucherNumber;
|
||||
$mySql = "SELECT * FROM ".DAYBOOKMASTER." WHERE (BranchCode = '$branch' AND VoucherNumber = '$currentVoucheNumber')
|
||||
ORDER BY ID ASC
|
||||
LIMIT 1 ";
|
||||
$mySqlUpdate = $this->db->query($mySql);
|
||||
$mySqlUpdateDetails = $mySqlUpdate->result();
|
||||
$mySqlUpdateDetailsID = $mySqlUpdateDetails[0]->ID;
|
||||
}
|
||||
// else if($updateDataDetails[0]->PaymentStatus === '0') {
|
||||
// $currentVoucheNumber = $updateDataDetails[0]->VoucherNumber;
|
||||
// $mySql = "SELECT * FROM ".DAYBOOKMASTER." WHERE (BranchCode = '$branch' AND VoucherNumber = '$currentVoucheNumber')
|
||||
// ORDER BY ID ASC
|
||||
// LIMIT 1 ";
|
||||
// $mySqlUpdate = $this->db->query($mySql);
|
||||
// $mySqlUpdateDetails = $mySqlUpdate->result();
|
||||
// $mySqlUpdateDetailsID = $mySqlUpdateDetails[0]->ID;
|
||||
|
||||
$sql = "SELECT * FROM ".DAYBOOKMASTER." WHERE (BranchCode = '$branch' AND ID < '$mySqlUpdateDetailsID')
|
||||
ORDER BY ID DESC
|
||||
LIMIT 1 ";
|
||||
$currBalance = 0;
|
||||
$latestUpdate = $this->db->query($sql);
|
||||
$latestUpdateDetails = $latestUpdate->result();
|
||||
If(is_array($latestUpdateDetails) && count($latestUpdateDetails)>0)
|
||||
{
|
||||
$currBalance = $latestUpdateDetails[0]->Balance;
|
||||
}else{
|
||||
}
|
||||
$sql = "UPDATE ".DAYBOOKMASTER."
|
||||
SET Status = '$status', Approval_By = '$Approval_By' ,
|
||||
Approval_Comments = '$Approval_Comments', UpdatedBy = '$UpdatedBy' , UpdatedOn = '$UpdatedOn' , Balance = '$currBalance'
|
||||
WHERE VoucherNumber = '$currentVoucheNumber' ";
|
||||
$mBranchDetails = $this->db->query($sql);
|
||||
// echo $mBranchDetails;
|
||||
// echo $this->db->affected_rows(); exit();
|
||||
if ($this->db->affected_rows() >= 1) {
|
||||
$sql2 = "SELECT * FROM ".DAYBOOKMASTER." WHERE (BranchCode = '$branch' AND ID > '$updateFor')
|
||||
ORDER BY ID ASC";
|
||||
$latestUpdate2 = $this->db->query($sql2);
|
||||
$latestUpdateDetails2 = $latestUpdate2->result();
|
||||
foreach( $latestUpdateDetails2 as $clip){
|
||||
if($clip->Name == 'I002' && ($clip->Status == "Pending" || $clip->Status == "Approved" || $clip->Status == "approved" || $clip->Status == "pending")) {
|
||||
//Income
|
||||
$currBalance = $currBalance + $clip->Amount;
|
||||
}else if ($clip->Name == 'I001' && ($clip->Status == "Pending" || $clip->Status == "Approved" || $clip->Status == "approved" || $clip->Status == "pending")) {
|
||||
//Expense
|
||||
$currBalance = $currBalance - $clip->Amount;
|
||||
} else {
|
||||
}
|
||||
$updateSql = "UPDATE ".DAYBOOKMASTER." SET Balance ='$currBalance' WHERE ID = '$clip->ID'";
|
||||
$this->db->query($updateSql);
|
||||
}
|
||||
$result['addStatus'] = true;
|
||||
$result['message'] = "Successfully Details Updated";
|
||||
} else {
|
||||
$result['addStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
// $sql = "SELECT * FROM ".DAYBOOKMASTER." WHERE (BranchCode = '$branch' AND ID < '$mySqlUpdateDetailsID')
|
||||
// ORDER BY ID DESC
|
||||
// LIMIT 1 ";
|
||||
// $currBalance = 0;
|
||||
// $latestUpdate = $this->db->query($sql);
|
||||
// $latestUpdateDetails = $latestUpdate->result();
|
||||
// If(is_array($latestUpdateDetails) && count($latestUpdateDetails)>0)
|
||||
// {
|
||||
// $currBalance = $latestUpdateDetails[0]->Balance;
|
||||
// }else{
|
||||
// }
|
||||
// $sql = "UPDATE ".DAYBOOKMASTER."
|
||||
// SET Status = '$status', Approval_By = '$Approval_By' ,
|
||||
// Approval_Comments = '$Approval_Comments', UpdatedBy = '$UpdatedBy' , UpdatedOn = '$UpdatedOn' , Balance = '$currBalance'
|
||||
// WHERE VoucherNumber = '$currentVoucheNumber' ";
|
||||
// $mBranchDetails = $this->db->query($sql);
|
||||
// if ($this->db->affected_rows() >= 1) {
|
||||
// $sql2 = "SELECT * FROM ".DAYBOOKMASTER." WHERE (BranchCode = '$branch' AND ID > '$updateFor')
|
||||
// ORDER BY ID ASC";
|
||||
// $latestUpdate2 = $this->db->query($sql2);
|
||||
// $latestUpdateDetails2 = $latestUpdate2->result();
|
||||
// foreach( $latestUpdateDetails2 as $clip){
|
||||
// if($clip->Name == 'I002' && ($clip->Status == "Pending" || $clip->Status == "Approved" || $clip->Status == "approved" || $clip->Status == "pending")) {
|
||||
// //Income
|
||||
// $currBalance = $currBalance + $clip->Amount;
|
||||
// }else if ($clip->Name == 'I001' && ($clip->Status == "Pending" || $clip->Status == "Approved" || $clip->Status == "approved" || $clip->Status == "pending")) {
|
||||
// //Expense
|
||||
// $currBalance = $currBalance - $clip->Amount;
|
||||
// } else {
|
||||
// }
|
||||
// $updateSql = "UPDATE ".DAYBOOKMASTER." SET Balance ='$currBalance' WHERE ID = '$clip->ID'";
|
||||
// $this->db->query($updateSql);
|
||||
// }
|
||||
// $result['addStatus'] = true;
|
||||
// $result['message'] = "Successfully Details Updated";
|
||||
// } else {
|
||||
// $result['addStatus'] = false;
|
||||
// $result['message'] = "Something went wrong.please try again";
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ app.controller('daybookadminCtrl', ["$scope", "$rootScope", "toaster", "$filter"
|
||||
|
||||
// get the data while page loading functions goes here
|
||||
$scope.init = function () {
|
||||
$scope.todayDate = new Date();
|
||||
const LOCALTYPE = localDetail.localType;
|
||||
if(LOCALTYPE === 'R003') {
|
||||
$scope.currentDate = new Date();
|
||||
|
||||
@ -20,6 +20,7 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
|
||||
// load functionality when page get loaded
|
||||
$scope.init = function () {
|
||||
$scope.todayDate = new Date();
|
||||
const LOCALTYPE = localDetail.localType;
|
||||
if (LOCALTYPE === 'R003') {
|
||||
// getFinanceModuleAccess();
|
||||
@ -139,7 +140,7 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
$scope.noRecordFoundSearch = false;
|
||||
var getDatBookListDetails = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getDayBookDetails/',
|
||||
url: apiPoint.url + 'getDayBookApprovalDetails/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
@ -152,62 +153,42 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
if (response.data.dayBookListStatus) {
|
||||
$scope.loadingsearch = false;
|
||||
// $scope.data = response.data.dayBookListDetails;
|
||||
$scope.datas = response.data.dayBookListDetails;
|
||||
// $scope.datas = response.data.dayBookListDetails;
|
||||
|
||||
const filterAddSelect = $scope.datas.filter(val => {
|
||||
val['Selected'] = false;
|
||||
return val;
|
||||
});
|
||||
$scope.searchResultDetails = filterAddSelect;
|
||||
$scope.searchResultDetailsCopy = filterAddSelect;
|
||||
// const filterAddSelect = $scope.datas.filter(val => {
|
||||
// val['Selected'] = false;
|
||||
// return val;
|
||||
// });
|
||||
$scope.searchResultDetails = response.data.dayBookListDetails;
|
||||
$scope.searchResultDetailsCopy = response.data.dayBookListDetails;
|
||||
} else {
|
||||
$scope.loadingsearch = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Select one row in a table once
|
||||
$scope.setOneSelect = function (value) {
|
||||
angular.forEach($scope.searchResultDetails, function (item) {
|
||||
item.Selected = false;
|
||||
});
|
||||
value.Selected = true;
|
||||
$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': '',
|
||||
'ID':''
|
||||
}
|
||||
|
||||
// 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; }
|
||||
});
|
||||
if (ItemsSelected.length) {
|
||||
$scope.myStatusModel = {
|
||||
$scope.editId = '';
|
||||
$scope.updateStatus = function(p) {
|
||||
$scope.editId = p.ORDER_ID;
|
||||
$scope.myStatusModel.ID = p.ID;
|
||||
}
|
||||
|
||||
$scope.updateStatusClose = function() {
|
||||
$scope.editId = '';
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
'ID':''
|
||||
}
|
||||
$scope.OpenWindowStatus = true;
|
||||
} else {
|
||||
$scope.OpenWindowStatus = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// update the status details
|
||||
$scope.statusUpdate = {
|
||||
submit: function (form, myStatusModel) {
|
||||
@ -227,20 +208,22 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
} else {
|
||||
var selectedItems = [];
|
||||
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
|
||||
if (item.Selected === true && item.Status === 'Pending' ) {
|
||||
let itemGetID = new getUpdateDetails(item.ID);
|
||||
selectedItems.push(itemGetID);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
function getUpdateDetails(id) {
|
||||
this.dabookListId = id;
|
||||
// var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
|
||||
// if (item.Selected === true && item.Status === 'Pending' ) {
|
||||
// let itemGetID = new getUpdateDetails(item.ID);
|
||||
// selectedItems.push(itemGetID);
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
let itemGetID = new getUpdateDetails();
|
||||
selectedItems.push(itemGetID);
|
||||
function getUpdateDetails() {
|
||||
this.dabookListId = $scope.myStatusModel.ID;
|
||||
this.ListCodeStatus = $scope.myStatusModel.staus;
|
||||
this.comments = $scope.myStatusModel.description;
|
||||
}
|
||||
if(selectedItems.length > 0) {
|
||||
$scope.disableStatusUpdateButton = true;
|
||||
$scope.disableStatusUpdateButton = true;
|
||||
var updateStudyMaterial = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateDayBookStatusAdmin/',
|
||||
@ -257,14 +240,8 @@ 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;
|
||||
$scope.disableStatusUpdateButton = false;
|
||||
$scope.disableStatusUpdateButton = false;
|
||||
$scope.updateStatusClose();
|
||||
} else {
|
||||
swal(" ", response.data.message, "error");
|
||||
$scope.disableStatusUpdateButton = false;
|
||||
@ -281,6 +258,7 @@ app.controller('daybookadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
'ID':''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
$scope.dataLengthIncome = 0;
|
||||
$scope.dataLengthExpense = 0;
|
||||
// day book entry list
|
||||
$scope.getDayBookList = function () {
|
||||
$scope.getDayBookList = function () {
|
||||
$scope.loadingsearch = true;
|
||||
$scope.noRecordFoundSearch = false;
|
||||
var getDatBookListDetails = {
|
||||
@ -152,14 +152,14 @@ app.controller('daybookapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filt
|
||||
if (response.data.dayBookListStatus) {
|
||||
$scope.loadingsearch = false;
|
||||
// $scope.data = response.data.dayBookListDetails;
|
||||
$scope.datas = response.data.dayBookListDetails;
|
||||
// $scope.datas = response.data.dayBookListDetails;
|
||||
|
||||
const filterAddSelect = $scope.datas.filter(val => {
|
||||
val['Selected'] = false;
|
||||
return val;
|
||||
});
|
||||
$scope.searchResultDetails = filterAddSelect;
|
||||
$scope.searchResultDetailsCopy = filterAddSelect;
|
||||
// const filterAddSelect = $scope.datas.filter(val => {
|
||||
// val['Selected'] = false;
|
||||
// return val;
|
||||
// });
|
||||
$scope.searchResultDetails = response.data.dayBookListDetails;
|
||||
$scope.searchResultDetailsCopy = response.data.dayBookListDetails;
|
||||
} else {
|
||||
$scope.loadingsearch = false;
|
||||
}
|
||||
|
||||
@ -25,9 +25,9 @@
|
||||
/*overflow-x: scroll;*/
|
||||
color: rgba(7, 21, 176, 0.7);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
/*.square {
|
||||
background-color: #00b;
|
||||
@ -44,9 +44,9 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<label>
|
||||
From Date
|
||||
</label>
|
||||
@ -58,7 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<label>
|
||||
To Date
|
||||
</label>
|
||||
@ -73,7 +73,7 @@
|
||||
<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(showTheRefValue)"
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(showTheRefValue)"
|
||||
required>
|
||||
<option value="" selected>Select</option>
|
||||
<option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option>
|
||||
@ -82,16 +82,16 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div ng-show="loadingsearch" class="center">
|
||||
<span style="color: #007AFF;
|
||||
<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
|
||||
</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>
|
||||
<!--<div ng-if="showTheRefValue == 'I002'">
|
||||
<style>
|
||||
.listCoutShow {
|
||||
@ -106,7 +106,6 @@
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row" ng-if="dataLengthIncome > 0">
|
||||
<div class="pull-right">
|
||||
<div style="margin: 8px;">
|
||||
@ -139,13 +138,11 @@
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='TypeName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th>Amount
|
||||
</th>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in IncomeData|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tr>
|
||||
|
||||
<td>{{p.Date}}</td>
|
||||
<td>{{p.ListName}}</td>
|
||||
<td>{{p.VoucherNumber}}</td>
|
||||
@ -183,7 +180,7 @@
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-right" ng-if="dataLengthExpense > 0">
|
||||
<div class="pull-right" ng-if="dataLengthExpense > 0">
|
||||
<div style="margin: 8px;">
|
||||
<div style="width: 45px; display: initial;">
|
||||
<span style="font-size: 14px;
|
||||
@ -197,10 +194,9 @@
|
||||
<table style="width: 100%;" class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-if="dayBookApprovalAccess == '1'">
|
||||
<!--<input type="checkbox" ng-hide="allSelectedHide" ng-model="allSelected" ng-change="openUpdateWind()" ng-model-options="{getterSetter: true}"
|
||||
/>-->
|
||||
</th>
|
||||
<!--<th ng-if="dayBookApprovalAccess == '1'">
|
||||
|
||||
</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>
|
||||
@ -222,21 +218,21 @@
|
||||
<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>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in searchResultDetails|itemsPerPage:10">
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label ng-if="dayBookApprovalAccess == '1' && p.Status == 'Pending'">
|
||||
<!--<td>
|
||||
<label ng-if="dayBookApprovalAccess == '1'">
|
||||
<input type="checkbox" ng-model="p.Selected" ng-change="setOneSelect(p)" />
|
||||
<!--{{p.StudentID}}-->
|
||||
</label>
|
||||
</td>
|
||||
</label>
|
||||
</td>-->
|
||||
<td>{{p.Date}}</td>
|
||||
<td>{{p.ListName}}</td>
|
||||
<td>{{p.VoucherNumber}}</td>
|
||||
@ -261,6 +257,81 @@
|
||||
<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 ng-if="p.ListName == 'Expense'">
|
||||
<i class="ti-write" tooltip="Update Status" ng-click="updateStatus(p);"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="p.ORDER_ID == editId">
|
||||
<td colspan="8">
|
||||
<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-4">
|
||||
<fieldset style="background-color: #eaeaea;">
|
||||
<legend>
|
||||
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}">
|
||||
<label for="form-field-select-2">
|
||||
Status <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>
|
||||
<span class="error text-small block" ng-if="Form.status.$dirty && Form.status.$error.required">Status is Required</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 form-group" ng-class="{'has-error':Form.description.$dirty && Form.description.$invalid}">
|
||||
<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>
|
||||
</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" ng-disabled="disableStatusUpdateButton">
|
||||
<i class='fa fa-spinner fa-spin' ng-if="disableStatusUpdateButton"> </i> Update
|
||||
</button>
|
||||
<!--<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
|
||||
Reset
|
||||
</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -268,7 +339,6 @@
|
||||
</dir-pagination-controls>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -276,17 +346,15 @@
|
||||
<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-4">
|
||||
<fieldset style="background-color: #eaeaea;">
|
||||
<legend>
|
||||
Update Status
|
||||
</legend>
|
||||
<div class="row">
|
||||
<a id="cancel_button" ng-click="unSelect()" tooltip="Close">
|
||||
<a id="cancel_button" ng-click="unSelect()" tooltip="Close">
|
||||
<span class="glyphicon glyphicon-remove-circle"></span>
|
||||
</a>
|
||||
<div class="col-md-2">
|
||||
@ -334,14 +402,11 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
|
||||
@ -148,15 +148,16 @@
|
||||
<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>
|
||||
<span ng-if="p.Status == 'Cancel'" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 99, 15); color: rgba(236, 28, 28, 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' ">
|
||||
<td class="center" ng-if="p.Status != 'Pending' && p.ListName != 'Income' && p.Status == 'Cancel' ">-</td>
|
||||
<td class="center" ng-if="p.ListName == 'Income' && p.Status != 'Cancel' ">
|
||||
<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'">
|
||||
<td class="center" ng-if="p.Status == 'Pending' && p.Status != 'Cancel'">
|
||||
<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>
|
||||
@ -278,14 +279,14 @@
|
||||
<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" />
|
||||
show-button-bar="true" max-date="todayDate" />
|
||||
|
||||
|
||||
<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}">
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.addName.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
Income/Expense <span class="symbol required"></span>
|
||||
</label>
|
||||
@ -299,29 +300,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.voucherNumber.$dirty && Form.voucherNumber.$invalid , 'has-success':Form.voucherNumber.$valid}">
|
||||
<label>
|
||||
Voucher Number
|
||||
Voucher Number <span class="symbol required"></span>
|
||||
</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>
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.voucherNumber.$dirty && Form.voucherNumber.$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">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.paidTo.$dirty && Form.paidTo.$invalid , 'has-success':Form.paidTo.$valid}">
|
||||
<label>
|
||||
Paid To / Received From
|
||||
Paid To / Received From <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="paidTo" tabindex="1" placeholder="Enter Paid To / Received From" class="form-control" ng-model="myModelAdd.paidTo"
|
||||
/>
|
||||
required/>
|
||||
<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">
|
||||
<div class="col-md-4" ng-class="{'has-error':Form.description_paid.$dirty && Form.description_paid.$invalid , 'has-success':Form.description_paid.$valid}">
|
||||
<label>
|
||||
Description
|
||||
Description <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<textarea type="text" placeholder="Enter Description" tabindex="3" class="form-control" name="description_paid" ng-model="myModelAdd.description_paid"
|
||||
maxlength="100" />
|
||||
maxlength="100" required/>
|
||||
<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>
|
||||
|
||||
|
||||
@ -89,7 +89,7 @@
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
</tab>
|
||||
<tab heading="Status Branch Access" id="statusViewBranchRelation">
|
||||
<!--<tab heading="Status Branch Access" id="statusViewBranchRelation">
|
||||
<pre>{{ branchList }}</pre>
|
||||
<div class="row">
|
||||
<div class="col-lg-4"></div>
|
||||
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
<div class="col-lg-4"></div>
|
||||
</div>
|
||||
</tab>
|
||||
</tab>-->
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user