modal for bill details in daybook details

This commit is contained in:
gandhimathi 2018-09-20 10:39:17 +05:30
parent 4ad7d797a0
commit 2c119581d3
6 changed files with 145 additions and 1 deletions

View File

@ -266,6 +266,7 @@ $route['updateDayBookStatusAdmin'] = 'DayBook_Controller/updateDayBookStatusAdmi
$route['getDayBookDetailsSuperAdmin'] = 'DayBook_Controller/getDayBookDetailsSuperAdmin';
$route['empDayBookModuleAccessChk'] = 'DayBook_Controller/empDayBookModuleAccessChk';
$route['deleteDayBookFeePayableDetails'] = 'DayBook_Controller/deleteDayBookFeePayableDetails';
$route['billModal'] = 'DayBook_Controller/billModal';
/* * day book master * */
$route['getDayBookMasterDetails'] = 'DayBookMaster_Controller/getDayBookMasterDetails';

View File

@ -529,6 +529,28 @@ class DayBook_Controller extends REST_Controller {
}
public function billModal_post()
{
$bilNo = $this->post('billNo');
$getStatus = $this->daybook_model->getBillDetails($bilNo);
//print_r($getStatus);
if ($getStatus)
{
$getStatus['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getStatus, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
}

View File

@ -889,4 +889,21 @@ $query = $this->db->query($subQuery,array('%d-%m-%Y',$fromd,'%d-%m-%Y',$tod,'Can
return $studentDetails;
}
Public function getBillDetails($bilNo=null)
{
$sql = "select BillNO,BillDate,BillAmount,ifnull(ReceiptNo,'-') as ReceiptNo,ModeOfPayment,CommentsForStudent,InternalComments
from T_Students_Fees_PaidDetails where BillNO = '".$bilNo."'
";
$a=$this->db->query($sql);
$bill = $a->result();
if (count($bill) > 0) {
$results['List'] = true;
$results['bill_Details'] = $bill;
} else {
$results['List'] = false;
$results['message'] = 'No records found';
}
return $results;
}
}

View File

@ -936,7 +936,56 @@ $scope.loadStaring = true;
alasql('SELECT Date as Date, ListName as IncomeExpense, VoucherNumber as VoucherNumberBillNumber, concat( PaidTo,Lastname )as PaidToReceivedFrom,FeePaymentDetails as Sem, CourseName as Course,UniversityName as University,TypeName as Type, ReceiptNo as Receipt_No, ModeOfPayment as Mode_of_Payment,Amount as Amount,Balance as Balance, ReceiptNoComments as Comments, Reason, Activity INTO XLS("daybook_details.xls",?) FROM ?', [styleXl(), $scope.data]);
};
//Modal for bill details
$scope.billDetails = function(p){
//$rootScope.student = $scope.selectedStudentsID;
//$rootScope.controller = 'ng-controller="daybooksuperadminCtrl"';
console.log(p);
$scope.bNo=p;
//request to get bill details
var toMerge = {
method: 'POST',
url: apiPoint.url + 'billModal/',
headers: {
'Content-Type': 'application/json'
},
data: {
billNo:$scope.bNo,
}
};
$http(toMerge).then(function (response) {
if (response.data.List == true) {
$rootScope.bill_Details = response.data.bill_Details;
} else {
$scope.message = response.data.message;
}
});
//open bill details in modal
$rootScope.modalInstance = $modal.open({
templateUrl: 'assets/views/Daybook_billDetails_modal.html',
// controller: 'daybooksuperadminCtrl',
// size: size,
});
$rootScope.modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
//$log.info('Modal dismissed at: ' + new Date());
});
}
//End of modal for bill details
$scope.searchData = {
'University': '',
'Course': '',

View File

@ -0,0 +1,53 @@
<style>
.modal-content {
background: #ffffff;
box-shadow: none;
width: 150%;
margin-left: -20%;
}
</style>
<div class="container-fluid container-fullw bg-white">
<div class="row">
<div class="col-md-12">
<legend>
Bill Details
</legend>
<table class="table">
<thead>
<tr>
<th>Bill No</th>
<th>Bill Date</th>
<th>Bill Amount</th>
<th>Receipt No</th>
<th>Comments For Student</th>
<th>Internal Comments</th>
</tr>
</thead>
<tbody ng-repeat="p in bill_Details">
<tr>
<td>{{p.BillNO}}</td>
<td>{{p.BillDate}}</td>
<td>{{p.BillAmount}}</td>
<td>{{p.ReceiptNo}}</td>
<td>{{p.CommentsForStudent}}</td>
<td>{{p.InternalComments}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -182,7 +182,9 @@
<td>{{p.ORDER_ID}}</td>
<td>{{p.Date}}</td>
<td>{{p.ListName}}</td>
<td>{{p.VoucherNumber}}</td>
<td ng-click="billDetails(p.VoucherNumber)">
<span tooltip="Click to view bill details">{{p.VoucherNumber}}</span>
</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.PaidTo}} {{ p.Lastname}}</td>
<td>{{p.UniversityName}},{{p.CourseName}},{{p.FeePaymentDetails}}</td>