daybook pdf generated changes , certificate status update chnages : kdk

This commit is contained in:
dineshkumarkannan 2018-08-27 12:53:02 +05:30
parent 30c6663f5a
commit d54683b27e
10 changed files with 77 additions and 29 deletions

View File

@ -64,7 +64,8 @@ class StatusUpdation_model extends CI_Model {
$studentName = $this->getStudentName($arr[0]['StudentID']);
$statuToMsg = $this->get_status_name_ListCode($arr[0]['ListCode']);
if( $statuToMsg == 'received' || $statuToMsg == 'Received' || $statuToMsg == 'RECEIVED'){
$cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
// $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
$cerNamtToMsg = $arr[0]['CertificationType'];
$getSemYearMsg = $this->get_couser_name($arr[0]['CourseID']);
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
@ -72,7 +73,8 @@ class StatusUpdation_model extends CI_Model {
$this->smssend($arr, $mesg);
$this->mailsend($arr, $mesg, $cerNamtToMsg);
} else if($statuToMsg == 'issued' || $statuToMsg == 'Issued' || $statuToMsg == 'ISSUED') {
$cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
// $cerNamtToMsg = $this->get_certificate_name($arr[0]['CertificationType']);
$cerNamtToMsg = $arr[0]['CertificationType'];
$getSemYearMsg = $this->get_couser_name($arr[0]['CourseID']);
$getSemYearANDType = "$getSemYearMsg $cerNamtToMsg";
// $mesg = "Status Update : $cerNamtToMsg $getSemYearMsg - $statuToMsg $dateToMsg.";
@ -155,16 +157,17 @@ class StatusUpdation_model extends CI_Model {
// get certificate list
public function get_certificate_list($branchId, $sutendDetail, $courseDetails) {
// echo $sutendDetail, $courseDetails;exit();
$this->db->select('CFR.*');
$this->db->select('SFS.FeesType as certificateData');
$this->db->order_by('CreatedOn', 'DESC');
$this->db->from('T_Students_Fees_Status as SFS');
// $this->db->join('T_Course_Fees_Details as CFD', 'CFD.ID = SFS.FeeType');
// $this->db->join('T_Students_Fees_Status as SFS', 'SFS.StudentID = $sutendDetail');
$this->db->join( '' . CERTIFICATION . ' as CFR', 'CFR.CertificateName = SFS.FeesType');
$this->db->where('CFR.IsActive', 1);
// $this->db->join( '' . CERTIFICATION . ' as CFR', 'CFR.CertificateName = SFS.FeesType');
$where = '(SFS.FeesType="PC" or SFS.FeesType = "DC" or SFS.FeesType = "TC" or SFS.FeesType = "MC" or SFS.FeesType = "OTHER")';
$this->db->where($where);
$this->db->where('SFS.StudentID',$sutendDetail);
$this->db->where('SFS.CourseID',$courseDetails);
$this->db->where('CFR.BranchCode', $branchId);
$this->db->where('SFS.BranchCode', $branchId);
$cerfDetails = $this->db->get();
$certificateDetails = $cerfDetails->result();
@ -234,13 +237,13 @@ class StatusUpdation_model extends CI_Model {
} else if ($reqDetailsFor == 'APPICATION_STATUS') {
$searchFor = 'A001';
$searchTableFor = APPLICATION_STATUS;
$this->db->select('t1.*, t4.Firstname, t5.ListName, t6.CertificateName');
$this->db->select('t1.*, t4.Firstname, t5.ListName, t1.CertificationType as CertificateName');
$this->db->from('' . $searchTableFor . ' as t1');
$this->db->where('t1.StudentID', $reqDetails['student']);
$this->db->join('' . LOGIN . ' as t3', 't3.ID = t1.CreatedBy', 'LEFT');
$this->db->join('' . STAFF . ' as t4', 't4.StaffID = t3.StaffID', 'LEFT');
$this->db->join('' . PICK_LIST_DETAILS . ' as t5', 't5.ListCode = t1.ListCode', 'LEFT');
$this->db->join('' . CERTIFICATION . ' as t6', 't6.CertificationID = t1.CertificationType', 'LEFT');
// $this->db->join('' . CERTIFICATION . ' as t6', 't6.CertificationID = t1.CertificationType', 'LEFT');
$this->db->order_by('t1.CreatedOn', 'DESC');
$statusDetails = $this->db->get();
$prevStatusDetails = $statusDetails->result();

View File

@ -103,7 +103,7 @@ app.controller('certificateStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl
};
$http(getCerfreg).then(function (response) {
if (response.data.certificateStatus) {
$scope.certificateData = response.data.certificate_details;
$scope.certificateDatas = response.data.certificate_details;
// alert(JSON.stringify($scope.certificateData));
} else {
}

View File

@ -191,7 +191,7 @@ $scope.dayBookApprovalAccess = '';
$scope.generatePFD = function (datas) {
$scope.loadStaring = true;
// daybookDetails.generatePFD(datas,$scope.searchData.date, $scope.searchData.dateTo);
var o = {};
@ -389,6 +389,18 @@ $scope.dayBookApprovalAccess = '';
if(returndata){
$scope.loadStaring = false;
}
pdfMake.createPdf(docDefinition).download('DAYBOOK DETAILS' + '( ' + $scope.searchData.date + ' - ' + $scope.searchData.dateTo + ' ).pdf', function(res) {
if(res === 'success'){
$scope.$apply(function(){
$scope.loadStaring = false;
});
}else{
$scope.$apply(function(){
$scope.loadStaring = false;
});
}
});
}

View File

@ -192,6 +192,7 @@ $scope.dayBookApprovalAccess = '';
$scope.generatePFD = function (datas) {
$scope.loadStaring = true;
// daybookDetails.generatePFD(datas,$scope.searchData.date, $scope.searchData.dateTo);
@ -384,12 +385,17 @@ $scope.dayBookApprovalAccess = '';
// console.log("success");
// });
// alert(JSON.stringify(rows1));
var returndata = pdfMake.createPdf(docDefinition).download('DAYBOOK DETAILS' + '( ' + $scope.searchData.date + ' - ' + $scope.searchData.dateTo + ' ).pdf', function(){
return true;
pdfMake.createPdf(docDefinition).download('DAYBOOK DETAILS' + '( ' + $scope.searchData.date + ' - ' + $scope.searchData.dateTo + ' ).pdf', function(res) {
if(res === 'success'){
$scope.$apply(function(){
$scope.loadStaring = false;
});
}else{
$scope.$apply(function(){
$scope.loadStaring = false;
});
}
});
if(returndata){
$scope.loadStaring = false;
}
}

View File

@ -474,12 +474,29 @@ $scope.loadStaring = true;
};
// alert(JSON.stringify(rows1));
var returndata = pdfMake.createPdf(docDefinition).download('DAYBOOK DETAILS' + '( ' + $scope.searchData.date + ' - ' + $scope.searchData.dateTo + ' ).pdf', function(){
return true;
// var returndata = pdfMake.createPdf(docDefinition).download('DAYBOOK DETAILS' + '( ' + $scope.searchData.date + ' - ' + $scope.searchData.dateTo + ' ).pdf', function(){
// return true;
// });
// pdfMake.createPdf(docDefinition).getDataUrl(function(url) { alert('your pdf is done'); });
pdfMake.createPdf(docDefinition).download('DAYBOOK DETAILS' + '( ' + $scope.searchData.date + ' - ' + $scope.searchData.dateTo + ' ).pdf', function(res) {
if(res === 'success'){
$scope.$apply(function(){
$scope.loadStaring = false;
});
}else{
$scope.$apply(function(){
$scope.loadStaring = false;
});
}
});
if(returndata){
$scope.loadStaring = false;
}
// if(returndata === 1){
// $scope.loadStaring = false;
// }
// if(returndata){
// $scope.loadStaring = false;
// }
// pdfMake.createPdf(docDefinition).print();
// $scope.loadStaring = false;

View File

@ -163,7 +163,7 @@
throw 'Could not generate blob';
}
if (typeof cb === "function") {
cb();
cb('success');
}
return status;
});

View File

@ -102,14 +102,20 @@
}
</style>
<div class="pull-right" ng-if="data">
<div class="row">
<!--{{loadStaring}}-->
<div ng-if="loadStaring" align='center' style="font-size: 14px;color: blue;">Generating...</div>
<!--<button ng-click="exportData()">export</button>-->
<div class="pull-right" ng-if="data">
<button ng-click="exportData()" class="btn btn-sm btn-default">
Export As Excel
</button>
<button ng-click="generatePFD(datas)" class="btn btn-sm btn-default">
<button ng-disabled="loadStaring" ng-click="generatePFD(datas)" class="btn btn-sm btn-default">
Export As PDF
</button>
</div>
</div>
<div class="row">
<div class="pull-right">

View File

@ -102,16 +102,19 @@
}
</style>
<div class="row">
<!--{{loadStaring}}-->
<div ng-if="loadStaring" align='center' style="font-size: 14px;color: blue;">Generating...</div>
<!--<button ng-click="exportData()">export</button>-->
<div class="pull-right" ng-if="data">
<button ng-click="exportData()" class="btn btn-sm btn-default">
Export As Excel
</button>
<button ng-click="generatePFD(datas)" class="btn btn-sm btn-default">
<button ng-disabled="loadStaring" ng-click="generatePFD(datas)" class="btn btn-sm btn-default">
Export As PDF
</button>
</div>
</div>
<div class="row">
<div class="pull-right">
<div style="margin: 8px;">

View File

@ -83,13 +83,14 @@
</style>
<div class="row">
<!--<div ng-if="loadStaring" align='center' style="font-size: 14px;color: blue;">Generating...</div>-->
<!--{{loadStaring}}-->
<div ng-if="loadStaring" align='center' style="font-size: 14px;color: blue;">Generating...</div>
<!--<button ng-click="exportData()">export</button>-->
<div class="pull-right" ng-if="data">
<button ng-click="exportData()" class="btn btn-sm btn-default">
Export As Excel
</button>
<button ng-click="generatePFD(datas)" class="btn btn-sm btn-default">
<button ng-disabled="loadStaring" ng-click="generatePFD(datas)" class="btn btn-sm btn-default">
Export As PDF
</button>
</div>

View File

@ -243,11 +243,11 @@
<label for="form-field-select-2">
Certificate Type <span class="symbol required"></span>
</label>
<!--<pre>{{ certificateDatas | json}}</pre>-->
<select class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="certificatetype" ng-model="myStatusModel.certificatetype"
required>
<option value="" disabled selected>Select Certificate Type</option>
<option ng-repeat="itemCerf in certificateData" value="{{itemCerf.CertificationID}}">{{itemCerf.CertificateName}}</option>
<option ng-repeat="itemCerf in certificateDatas" value="{{itemCerf.certificateData}}">{{itemCerf.certificateData}}</option>
</select>
<span class="error text-small block" ng-if="Form.certificatetype.$dirty && Form.certificatetype.$error.required">Certificate Type is Required</span>
@ -358,7 +358,7 @@
<select class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="certificatetype" ng-model="myStatusModel.certificatetype"
required>
<option value="" disabled selected>Select Certificate Type</option>
<option ng-repeat="itemCerf in certificateData" value="{{itemCerf.CertificationID}}">{{itemCerf.CertificateName}}</option>
<option ng-repeat="itemCerf in certificateDatas" value="{{itemCerf.certificateData}}">{{itemCerf.certificateData}}</option>
</select>
<span class="error text-small block" ng-if="Form.certificatetype.$dirty && Form.certificatetype.$error.required">Certificate Type is Required</span>