diff --git a/Apollo/api/application/models/Reports_model.php b/Apollo/api/application/models/Reports_model.php index 1f1d9ee3..7907a74d 100755 --- a/Apollo/api/application/models/Reports_model.php +++ b/Apollo/api/application/models/Reports_model.php @@ -423,7 +423,8 @@ group by sid,Sem } public function app_pending($bat=null,$br=null,$u=null){ - $sql = "SELECT + $sql = "SELECT * FROM (SELECT + APFS.Registration_Details_ID AS regid, APFS.ListCode as StatusCode, APFS.AppFormDate as StatusUpdationOn, APFS.Comments as StatusComments, @@ -441,17 +442,53 @@ group by sid,Sem CFD.Sem_Year as Sem_Year, RD.RegistrationType as FormType, STU.StudentID -FROM T_ApplicationFormStatus as APFS -LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID -LEFT JOIN T_PickListDetails as PKL ON PKL.ListCode = APFS.ListCode -LEFT JOIN T_StudentDetails as STU ON STU.StudentID = RD.StudentID -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_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType -LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID -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 +FROM T_ApplicationFormStatus AS APFS LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID +LEFT JOIN T_PickListDetails AS PKL ON PKL.ListCode = APFS.ListCode LEFT JOIN T_StudentDetails AS STU ON STU.StudentID = RD.StudentID 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_Course_Fees_Details AS CFD ON CFD.ID = RD.FeeType +LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID +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' -group by APFS.Registration_Details_ID"; +ORDER BY StatusUpdationOn DESC) x +GROUP BY x.regid"; + +// SELECT * FROM (SELECT APFS.Registration_Details_ID AS regid, APFS.ListCode AS StatusCode, APFS.AppFormDate AS StatusUpdationOn, APFS.Comments AS StatusComments, PKL.ListName AS StatusName, concat(STU.Firstname,' ', STU.Lastname) AS StudentName, STU.Fathername AS FatherName, STU.MobileNumber AS Phone_number, COUR.CourseName AS CourseName, UNIV.UniversityName AS UniversityName, sfpd.BILL AS InitialPayDate, RD.Student_Fee_Status_Id AS FeesStatusID, STU_COUR.EnrollmentID AS EnrollmentNumber, CFD.Sem_Year AS Sem_Year, RD.RegistrationType AS FormType, STU.StudentID +// FROM T_ApplicationFormStatus AS APFS LEFT JOIN T_Registration_Details AS RD ON RD.ID = APFS.Registration_Details_ID +// LEFT JOIN T_PickListDetails AS PKL ON PKL.ListCode = APFS.ListCode LEFT JOIN T_StudentDetails AS STU ON STU.StudentID = RD.StudentID 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_Course_Fees_Details AS CFD ON CFD.ID = RD.FeeType +// LEFT JOIN T_UniversityMaster AS UNIV ON UNIV.UniversityID = COUR.UniversityID +// 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 +// ORDER BY StatusUpdationOn DESC) x +// GROUP BY x.regid + +// $sql = "SELECT + // APFS.ListCode as StatusCode, + // APFS.AppFormDate as StatusUpdationOn, + // APFS.Comments as StatusComments, + // PKL.ListName as StatusName, + // concat(STU.Firstname,' ', STU.Lastname) as Student_name, + // STU.Fathername as FatherName, + // STU.MobileNumber as Phone_number, + // STU.AlternateNumber as AlternateNumber, + // STU.PresentAddress as address, + // COUR.CourseName as Course_name, + // UNIV.UniversityName as University, + // sfpd.BILL as InitialPayDate, + // RD.Student_Fee_Status_Id as FeesStatusID, + // STU_COUR.EnrollmentID as EnrollmentNumber, + // CFD.Sem_Year as Sem_Year, + // RD.RegistrationType as FormType, + // STU.StudentID +// FROM T_ApplicationFormStatus as APFS +// LEFT JOIN T_Registration_Details as RD ON RD.ID = APFS.Registration_Details_ID +// LEFT JOIN T_PickListDetails as PKL ON PKL.ListCode = APFS.ListCode +// LEFT JOIN T_StudentDetails as STU ON STU.StudentID = RD.StudentID +// 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_Course_Fees_Details as CFD ON CFD.ID = RD.FeeType +// LEFT JOIN T_UniversityMaster as UNIV ON UNIV.UniversityID = COUR.UniversityID +// 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' +// group by APFS.Registration_Details_ID"; $leadDet=$this->db->query($sql); $answer = $leadDet->result(); if (count($answer) > 0) { diff --git a/Apollo/assets/js/controllers/daybooksuperadminCtrl.js b/Apollo/assets/js/controllers/daybooksuperadminCtrl.js index fd8d0945..5e2bc1e7 100755 --- a/Apollo/assets/js/controllers/daybooksuperadminCtrl.js +++ b/Apollo/assets/js/controllers/daybooksuperadminCtrl.js @@ -216,19 +216,19 @@ var rows1 = ''; 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; + 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++; }); @@ -267,209 +267,38 @@ var headers = { // }, 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'} + col_2:{ text: 'Income Expense', style: 'tableHeader', alignment: 'center' }, + col_3:{ text: 'Voucher Number Bill Number', style: 'tableHeader', alignment: 'center' }, + col_4:{ text: 'Paid To Received From', style: 'tableHeader', alignment: 'center' }, + col_5:{ text: 'Sem', style: 'tableHeader', alignment: 'center'}, + col_6:{ text: 'Course', style: 'tableHeader', alignment: 'center'}, + // col_7:{ text: 'University', style: 'tableHeader', alignment: 'center'}, + // col_8:{ text: 'Type', style: 'tableHeader', alignment: 'center'}, + // col_9:{ text: 'Receipt No', style: 'tableHeader', alignment: 'center'}, + // col_10:{ text: 'Comments', style: 'tableHeader', alignment: 'center'}, + // col_11:{ text: 'Mode of Payment', style: 'tableHeader', alignment: 'center'}, + // col_12:{ text: 'Amount', style: 'tableHeader', alignment: 'center'}, + // col_13:{ text: 'Balance', 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 ); + row.push( header.col_2 ); + row.push( header.col_3 ); + row.push( header.col_4 ); + row.push( header.col_5 ); + row.push( header.col_6 ); + // row.push( header.col_7 ); + // row.push( header.col_8 ); + // row.push( header.col_9 ); + // row.push( header.col_10 ); + // row.push( header.col_11 ); + // row.push( header.col_12 ); + // row.push( header.col_13 ); body.push(row); } } @@ -479,11 +308,19 @@ for (var key in rows1) { 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() ); + row.push( data.Date.toString() ); + row.push( data.IncomeExpence.toString() ); + row.push( data.VoucherBillNumber.toString() ); + row.push( data.PaidReceivedToFrom.toString() ); + row.push( data.Sem.toString() ); + row.push( data.Course.toString() ); + // row.push( data.University.toString() ); + // row.push( data.Type.toString() ); + // row.push( data.ReceiptNo.toString() ); + // row.push( data.Comments.toString() ); + // row.push( data.ModeofPayment.toString() ); + // row.push( data.Amount.toString() ); + // row.push( data.Balance.toString() ); body.push(row); } } @@ -946,3 +783,5 @@ var docDefinition = { }]); + + diff --git a/Apollo/assets/views/daybook/daybooksuperadmin.html b/Apollo/assets/views/daybook/daybooksuperadmin.html index dc31ec86..5516c5d0 100755 --- a/Apollo/assets/views/daybook/daybooksuperadmin.html +++ b/Apollo/assets/views/daybook/daybooksuperadmin.html @@ -15,7 +15,7 @@