report model name changes , daybook export pdf plugin add: kdk
This commit is contained in:
parent
5549ffa782
commit
8388ba1b07
@ -431,8 +431,10 @@ group by sid,Sem
|
|||||||
concat(STU.Firstname,' ', STU.Lastname) as Student_name,
|
concat(STU.Firstname,' ', STU.Lastname) as Student_name,
|
||||||
STU.Fathername as FatherName,
|
STU.Fathername as FatherName,
|
||||||
STU.MobileNumber as Phone_number,
|
STU.MobileNumber as Phone_number,
|
||||||
COUR.CourseName as CourseName,
|
STU.AlternateNumber as AlternateNumber,
|
||||||
UNIV.UniversityName as UniversityName,
|
STU.PresentAddress as address,
|
||||||
|
COUR.CourseName as Course_name,
|
||||||
|
UNIV.UniversityName as University,
|
||||||
sfpd.BILL as InitialPayDate,
|
sfpd.BILL as InitialPayDate,
|
||||||
RD.Student_Fee_Status_Id as FeesStatusID,
|
RD.Student_Fee_Status_Id as FeesStatusID,
|
||||||
STU_COUR.EnrollmentID as EnrollmentNumber,
|
STU_COUR.EnrollmentID as EnrollmentNumber,
|
||||||
@ -447,7 +449,7 @@ LEFT JOIN T_CourseMaster as COUR ON COUR.CourseID = RD.CourseID
|
|||||||
LEFT JOIN T_Student_CourseDetails as STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
LEFT JOIN T_Student_CourseDetails as STU_COUR ON STU_COUR.StudentID = RD.StudentID AND STU_COUR.CourseID = RD.CourseID
|
||||||
LEFT JOIN T_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType
|
LEFT JOIN T_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType
|
||||||
LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID
|
LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID
|
||||||
LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM apollod4_ApolloDECDev.T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id
|
LEFT JOIN (Select FeesId as FeeID, min(CreatedOn), BillDate as BILL FROM T_Students_Fees_PaidDetails group by FeesId) as sfpd on sfpd.FeeID = RD.Student_Fee_Status_Id
|
||||||
where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
where COUR.UniversityID = '$u' and RD.BatchCode = '$bat'and STU_COUR.BranchID = '$br' and STU.IsActive = '1'
|
||||||
group by APFS.Registration_Details_ID";
|
group by APFS.Registration_Details_ID";
|
||||||
$leadDet=$this->db->query($sql);
|
$leadDet=$this->db->query($sql);
|
||||||
|
|||||||
@ -11,9 +11,12 @@ app.controller('daybooksuperadminCtrl', ["$scope", "$rootScope", "toaster", "$fi
|
|||||||
$scope.disableAddButton = false;
|
$scope.disableAddButton = false;
|
||||||
$scope.disableEditButton = false;
|
$scope.disableEditButton = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//In controller
|
//In controller
|
||||||
$scope.exportAction = function(){
|
$scope.exportAction = function(){
|
||||||
alert();
|
// alert();
|
||||||
switch('excel'){
|
switch('excel'){
|
||||||
case 'pdf': $scope.$broadcast('export-pdf', {});
|
case 'pdf': $scope.$broadcast('export-pdf', {});
|
||||||
break;
|
break;
|
||||||
@ -185,6 +188,8 @@ $scope.dayBookApprovalAccess = '';
|
|||||||
|
|
||||||
$scope.noRecordFound = true;
|
$scope.noRecordFound = true;
|
||||||
$scope.dataLength = 0;
|
$scope.dataLength = 0;
|
||||||
|
|
||||||
|
var rows1 = '';
|
||||||
// get day book type name list
|
// get day book type name list
|
||||||
$scope.getDayBookList = function () {
|
$scope.getDayBookList = function () {
|
||||||
var getDatBookListDetails = {
|
var getDatBookListDetails = {
|
||||||
@ -202,6 +207,34 @@ $scope.dayBookApprovalAccess = '';
|
|||||||
if (response.data.dayBookListStatus) {
|
if (response.data.dayBookListStatus) {
|
||||||
|
|
||||||
$scope.data = response.data.dayBookListDetails;
|
$scope.data = response.data.dayBookListDetails;
|
||||||
|
// alert(JSON.stringify($scope.data));
|
||||||
|
|
||||||
|
var o = {};
|
||||||
|
// o[key] = value;
|
||||||
|
var intDate = 0;
|
||||||
|
|
||||||
|
var arrForeach = $scope.data;
|
||||||
|
arrForeach.forEach(function(element) {
|
||||||
|
var value = {};
|
||||||
|
value['Date'] = element.Date;
|
||||||
|
value['IncomeExpence'] = element.ListName;
|
||||||
|
value['VoucherBillNumber'] = element.VoucherNumber;
|
||||||
|
value['PaidReceivedToFrom'] = element.PaidTo;
|
||||||
|
value['Sem'] = element.FeePaymentDetails;
|
||||||
|
value['Course'] = element.CourseName;
|
||||||
|
value['University'] = element.UniversityName;
|
||||||
|
value['Type'] = element.TypeName;
|
||||||
|
value['ReceiptNo'] = element.ReceiptNo;
|
||||||
|
value['Comments'] = element.ReceiptNoComments;
|
||||||
|
value['ModeofPayment'] = element.ModeOfPayment;
|
||||||
|
value['Amount'] = element.Amount;
|
||||||
|
value['Balance'] = element.Balance;
|
||||||
|
o[intDate] = value;
|
||||||
|
intDate++;
|
||||||
|
});
|
||||||
|
|
||||||
|
rows1 = o;
|
||||||
|
|
||||||
$scope.dataLength = $scope.data.length;
|
$scope.dataLength = $scope.data.length;
|
||||||
if ($scope.data.length !== 0) {
|
if ($scope.data.length !== 0) {
|
||||||
$scope.noRecordFound = false;
|
$scope.noRecordFound = false;
|
||||||
@ -216,6 +249,316 @@ $scope.dayBookApprovalAccess = '';
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
$scope.generatePFD = function() {
|
||||||
|
|
||||||
|
// var docDefinition = { content: 'This is an sample PDF printed with pdfMake' };
|
||||||
|
|
||||||
|
var headers = {
|
||||||
|
// fila_0:{
|
||||||
|
// col_1:{ text: 'Faltas', style: 'tableHeader',rowSpan: 2, alignment: 'center',margin: [0, 8, 0, 0] },
|
||||||
|
// col_2:{ text: 'Fecha', style: 'tableHeader',rowSpan: 2, alignment: 'center',margin: [0, 8, 0, 0] },
|
||||||
|
// col_3:{ text: 'Descripción', style: 'tableHeader',rowSpan: 2, alignment: 'center',margin: [0, 8, 0, 0] },
|
||||||
|
// col_4:{ text: 'Cita con acudientes', style: 'tableHeader',colSpan: 2, alignment: 'center' }
|
||||||
|
// },
|
||||||
|
fila_1:{
|
||||||
|
col_1:{ text: 'DATE', style: 'tableHeader', alignment: 'center' },
|
||||||
|
col_2:{ text: 'Income/Expense', style: 'tableHeader', alignment: 'center' },
|
||||||
|
col_3:{ text: 'Voucher Number / Bill Number', style: 'tableHeader', alignment: 'center' },
|
||||||
|
col_4:{ text: 'Citación', style: 'tableHeader', alignment: 'center' },
|
||||||
|
col_5:{ text: 'Cumplimiento', style: 'tableHeader', alignment: 'center'}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var rows = {
|
||||||
|
a: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
b: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
c: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
d: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
e: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
f: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
g: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
h: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
i: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
j: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
k: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
l: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
m: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
n: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
o: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
p: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
q: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
r: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
s: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
t: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
u: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
v: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
w: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
x: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
},
|
||||||
|
z: {
|
||||||
|
peaje: '1',
|
||||||
|
ruta: '2',
|
||||||
|
fechaCruce: '3',
|
||||||
|
hora: '4',
|
||||||
|
valor: '5'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var body = [];
|
||||||
|
for (var key in headers){
|
||||||
|
if (headers.hasOwnProperty(key)){
|
||||||
|
var header = headers[key];
|
||||||
|
var row = new Array();
|
||||||
|
row.push( header.col_1 );
|
||||||
|
// row.push( header.col_2 );
|
||||||
|
// row.push( header.col_3 );
|
||||||
|
// row.push( header.col_4 );
|
||||||
|
// row.push( header.col_5 );
|
||||||
|
body.push(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var key in rows1)
|
||||||
|
{
|
||||||
|
if (rows1.hasOwnProperty(key))
|
||||||
|
{
|
||||||
|
var data = rows1[key];
|
||||||
|
var row = new Array();
|
||||||
|
row.push( data.ORDERID.toString() );
|
||||||
|
// row.push( data.ruta.toString() );
|
||||||
|
// row.push( data.fechaCruce.toString() );
|
||||||
|
// row.push( data.hora.toString() );
|
||||||
|
// row.push( data.valor.toString() );
|
||||||
|
body.push(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var docDefinition = {
|
||||||
|
pageMargins: [40,155,40,55],
|
||||||
|
pageOrientation: 'landscape',
|
||||||
|
header: function() {
|
||||||
|
return {
|
||||||
|
margin: 40,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
},
|
||||||
|
{ text:['Resumen disciplinario'],
|
||||||
|
alignment: 'left',bold:true,margin:[-405,80,0,0],fontSize: 24}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
footer: function(currentPage, pageCount) {
|
||||||
|
return { text:'Pagina '+ currentPage.toString() + ' de ' + pageCount, alignment: 'center',margin:[0,30,0,0] };
|
||||||
|
},
|
||||||
|
content: [
|
||||||
|
{
|
||||||
|
layout: 'lightHorizontalLines', // optional
|
||||||
|
table: {
|
||||||
|
// headers are automatically repeated if the table spans over multiple pages
|
||||||
|
// you can declare how many rows should be treated as headers
|
||||||
|
// headerRows: 1,
|
||||||
|
// widths: [ '*', 'auto', 100, '*' ],
|
||||||
|
|
||||||
|
// body: [
|
||||||
|
// [ 'First', 'Second', 'Third', 'The last one' ],
|
||||||
|
// [ 'Value 1', 'Value 2', 'Value 3', 'Value 4' ],
|
||||||
|
// [ { text: 'Bold value', bold: true }, 'Val 2', 'Val 3', 'Val 4' ]
|
||||||
|
// ]
|
||||||
|
widths: [ '*', '*', '*', '*', '*' ],
|
||||||
|
headerRows: 2,
|
||||||
|
// keepWithHeaderRows: 1,
|
||||||
|
body: body
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
styles: {
|
||||||
|
header: {
|
||||||
|
fontSize: 28,
|
||||||
|
bold: true
|
||||||
|
},
|
||||||
|
subheader: {
|
||||||
|
fontSize: 15,
|
||||||
|
bold: true
|
||||||
|
},
|
||||||
|
quote: {
|
||||||
|
italics: true
|
||||||
|
},
|
||||||
|
small: {
|
||||||
|
fontSize: 8
|
||||||
|
},
|
||||||
|
sta: {
|
||||||
|
fontSize: 11,
|
||||||
|
bold: false,
|
||||||
|
alignment: 'justify'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
alert(JSON.stringify(rows1));
|
||||||
|
// pdfMake.createPdf(docDefinition).download();
|
||||||
|
pdfMake.createPdf(docDefinition).print();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//==============================================================================
|
||||||
|
|
||||||
// income expense type status list
|
// income expense type status list
|
||||||
$scope.getIncomeExpenseType_Status = function () {
|
$scope.getIncomeExpenseType_Status = function () {
|
||||||
var getIncomeExpenseType = {
|
var getIncomeExpenseType = {
|
||||||
|
|||||||
@ -167,7 +167,7 @@ app.controller('report_app_pendingCtrl', ["$scope", "$filter","$rootScope","$mod
|
|||||||
|
|
||||||
|
|
||||||
$scope.exportData = function () {
|
$scope.exportData = function () {
|
||||||
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,InitialPayDate as InititalPaymentDate,EnrollmentNumber as EnrollmentID,Student_name as StudentName,FatherName as FatherName,CourseName as CourseName,Sem_Year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,UniversityName as University,StatusName as ApplicationPendingStatus,FormType as FormType,StatusUpdationOn as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_pending_data]);
|
alasql('SELECT CAST(SL_NO AS NUMBER) as SLNO,InitialPayDate as InititalPaymentDate,EnrollmentNumber as EnrollmentID,Student_name as StudentName,FatherName as FatherName,Course_name as CourseName,Sem_Year as SemYear,CAST(Phone_number AS NUMBER) as PhoneNumber,University as University,StatusName as ApplicationPendingStatus,FormType as FormType,StatusUpdationOn as Date INTO XLS("Application_pending_student_list.xls",?) FROM ?',[mystyle,$scope.app_pending_data]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
68341
Apollo/assets/js/directives/pdf_make/pdfMake.js
Normal file
68341
Apollo/assets/js/directives/pdf_make/pdfMake.js
Normal file
File diff suppressed because one or more lines are too long
47
Apollo/assets/js/directives/pdf_make/virtual-fs.js
Normal file
47
Apollo/assets/js/directives/pdf_make/virtual-fs.js
Normal file
File diff suppressed because one or more lines are too long
@ -15,6 +15,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<tabset class="tabbable">
|
<tabset class="tabbable">
|
||||||
<tab heading="View" id="viewDayBook">
|
<tab heading="View" id="viewDayBook">
|
||||||
|
<button ng-click="generatePFD()">generatePFD</button>
|
||||||
<div class="container-fluid container-fullw">
|
<div class="container-fluid container-fullw">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|||||||
@ -123,10 +123,10 @@
|
|||||||
<td>{{p.EnrollmentNumber}}</td>
|
<td>{{p.EnrollmentNumber}}</td>
|
||||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Student_name}}</a></td>
|
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Student_name}}</a></td>
|
||||||
<td>{{p.FatherName}}</td>
|
<td>{{p.FatherName}}</td>
|
||||||
<td>{{p.CourseName}}</td>
|
<td>{{p.Course_name}}</td>
|
||||||
<td>{{p.Sem_Year}}</td>
|
<td>{{p.Sem_Year}}</td>
|
||||||
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Phone_number}}</a></td>
|
<td><a tooltip="View Student" class="text-dark" ng-click="open(p);">{{p.Phone_number}}</a></td>
|
||||||
<td>{{p.UniversityName}}</td>
|
<td>{{p.University}}</td>
|
||||||
<td>{{p.StatusName}}</td>
|
<td>{{p.StatusName}}</td>
|
||||||
<td>{{p.FormType}}</td>
|
<td>{{p.FormType}}</td>
|
||||||
<td>{{p.StatusUpdationOn}}</td>
|
<td>{{p.StatusUpdationOn}}</td>
|
||||||
|
|||||||
@ -101,6 +101,11 @@
|
|||||||
<script src="assets/js/directives/file-upload.js"></script>
|
<script src="assets/js/directives/file-upload.js"></script>
|
||||||
<script src="assets/js/directives/convert-words.js"></script>
|
<script src="assets/js/directives/convert-words.js"></script>
|
||||||
<script src="assets/js/directives/table-export.js"></script>
|
<script src="assets/js/directives/table-export.js"></script>
|
||||||
|
|
||||||
|
<!--pdfmake plugin -->
|
||||||
|
<script src="assets/js/directives/pdf_make/pdfMake.js"></script>
|
||||||
|
<script src="assets/js/directives/pdf_make/virtual-fs.js"></script>
|
||||||
|
|
||||||
<!-- Clip-Two Controllers -->
|
<!-- Clip-Two Controllers -->
|
||||||
<script src="assets/js/controllers/mainCtrl.js"></script>
|
<script src="assets/js/controllers/mainCtrl.js"></script>
|
||||||
<script src="assets/js/controllers/bootstrapCtrl.js"></script>
|
<script src="assets/js/controllers/bootstrapCtrl.js"></script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user