diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index 158d7fbd..06e68d0a 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -127,6 +127,7 @@ defined('DEFAULTACTIVITY') OR define('DEFAULTACTIVITY','T_StatusMaster'); defined('CERTIFICATION_MASTER') OR define('CERTIFICATION_MASTER','T_CertificationMaster'); defined('DAYBOOKMASTER') OR define('DAYBOOKMASTER','T_DayBookMaster'); defined('INCOMEOUTCOMEMASTER') OR define('INCOMEOUTCOMEMASTER','T_Income_Outcome_Master'); +defined('FEES_INSTALLMENT') OR define('FEES_INSTALLMENT','T_Fees_Installments'); diff --git a/Apollo/api/application/controllers/Fees_Status_Controller.php b/Apollo/api/application/controllers/Fees_Status_Controller.php index 25984506..d4380634 100755 --- a/Apollo/api/application/controllers/Fees_Status_Controller.php +++ b/Apollo/api/application/controllers/Fees_Status_Controller.php @@ -132,7 +132,7 @@ class Fees_Status_Controller extends REST_Controller { $detailsChild['StudentID'] = $this->post('studID'); $detailsChild['FeesId'] = $this->post('feesID'); - $detailsChild['BillNO'] = $this->post('billNO'); + $detailsChild['ReceiptNo'] = $this->post('billNO'); $detailsChild['BillDate'] = $this->post('billDate'); $detailsChild['BillAmount'] = $this->post('billAmount'); $detailsChild['ModeOfPayment'] = $this->post('modeOfPayment'); @@ -238,7 +238,9 @@ class Fees_Status_Controller extends REST_Controller { $details['CreatedBy'] = $this->post('createdBy'); $details['CreatedOn'] = $now->format('Y-m-d H:i:s'); - $updateDetails = $this->Fees_model->setFees($details);// Check if the users data store contains users (in case the database result returns NULL) + $jsonInstallmenData = $this->post('installmentItems'); + + $updateDetails = $this->Fees_model->setFees($details,$jsonInstallmenData);// Check if the users data store contains users (in case the database result returns NULL) if ($updateDetails) { $updateDetails['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index a7e98de5..56f6d410 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -266,7 +266,7 @@ class Fees_status_model extends CI_Model } // for get paid bill details - $this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,BR.BranchName'); + $this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,ReceiptNo,BR.BranchName'); $this->db->from(STUDENTS_FEES_PAID.' as SFP'); $this->db->join(BRANCH.' as BR','BR.BranchCode = SFP.UpdatedBy','left'); $this->db->where('FeesId',$feeRow->FeesID); @@ -344,7 +344,7 @@ class Fees_status_model extends CI_Model } // for get paid bill details - $this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,BR.BranchName'); + $this->db->select('ifnull(SUM((BillAmount)),0) as BillAmount,BillNO,BillDate,ModeOfPayment,ReceiptNo,BR.BranchName'); $this->db->from(STUDENTS_FEES_PAID.' as SFP'); $this->db->join(BRANCH.' as BR','BR.BranchCode = SFP.UpdatedBy','left'); $this->db->where('FeesId',$feeRow->FeesID); @@ -370,6 +370,33 @@ class Fees_status_model extends CI_Model public function updateFees($feesPaidDetails=null) { + if($feesPaidDetails['UpdatedBy']=='All'){ + $this->db->select('BranchID'); + $this->db->where('FeesID', $feesPaidDetails['FeesId']); + $this->db->from(STUDENTS_FEES_STATUS.' as SFS'); + $this->db->join(STUDENTCOURSE.' as SC', 'SC.CourseID = SFS.CourseID'); + $getStudentBranch=$this->db->get()->result(); + $feesPaidDetails['UpdatedBy'] = $getStudentBranch[0]->BranchID; + + } + $this->db->select('BillNO'); + $this->db->where('UpdatedBy', $feesPaidDetails['UpdatedBy']); + + $getLastBillNo=$this->db->get(STUDENTS_FEES_PAID)->last_row(); + if($getLastBillNo){ + $strExplode= explode("-", $getLastBillNo->BillNO); + + $n=$strExplode[1]; + $n2 = str_pad($n + 1, 5, 0, STR_PAD_LEFT); + $splitString = substr($feesPaidDetails['UpdatedBy'], 0, 3); + $feesPaidDetails['BillNO']=$splitString.'-'.$n2; + } + else{ + $n='00000'; + $n2 = str_pad($n + 1, 5, 0, STR_PAD_LEFT); + $splitString = substr($feesPaidDetails['UpdatedBy'], 0, 3); + $feesPaidDetails['BillNO']=$splitString.'-'.$n2; + } $this->db->select('BillNO'); $this->db->where('BillNO', $feesPaidDetails['BillNO']); if($this->db->get(STUDENTS_FEES_PAID)->first_row()){ @@ -381,6 +408,11 @@ class Fees_status_model extends CI_Model $result['paidStatus'] = true; $result['message'] = "Successfully fees details added"; // $entryOfCallTrack = $this->updateInCallTrack($trackDetails); + // day book entry + if($feesPaidDetails['ModeOfPayment']=='CASH' AND $feesPaidDetails['BillAmount']!='0'){ + $dayBookEntry = $this->insertDayBookMaster($feesPaidDetails); + } + } else{ @@ -565,12 +597,13 @@ class Fees_status_model extends CI_Model public function getFeesStructureAssign($student=null){ $this->db->select('ID,CourseID,ProgramType,FeesAmount,Sem_Year'); $this->db->where('CourseID',$student['CourseID']); + $this->db->order_by('ProgramType'); $feesDetails = $this->db->get(COURSE_FEES); if($feesDetails->result()){ $result_array['feesStatus']=true; foreach ($feesDetails->result() as $row){ - $this->db->select('CourseFees, STFOrWR,Waiver,Others,SessionName,RollNo'); + $this->db->select('FeesID,CourseFees, STFOrWR,Waiver,Others,SessionName,RollNo'); $this->db->where('StudentID',$student['StudentID']); $this->db->where('CourseID',$student['CourseID']); $this->db->where('FeesType',$row->ID); @@ -587,6 +620,17 @@ class Fees_status_model extends CI_Model $fetchData['SessionName']=$existData[0]->SessionName; $fetchData['RollNo']=$existData[0]->RollNo; $fetchData['PayableFees']=$existData[0]->CourseFees+$existData[0]->STFOrWR+$existData[0]->Others-$existData[0]->Waiver; + // for installment details + $InstallemtResult = $this->getInstallmentDetails($existData[0]->FeesID); + if($InstallemtResult != false){ + $fetchData['InstallmentDetails']=$InstallemtResult; + } + else{ + + $fetchData['InstallmentDetails']=""; + + + } $CourseFeesArray[]=$fetchData; @@ -603,6 +647,8 @@ class Fees_status_model extends CI_Model $fetchData['SessionName']=""; $fetchData['RollNo']=""; $fetchData['PayableFees']=$row->FeesAmount; + // for installment details + $fetchData['InstallmentDetails']=""; $CourseFeesArray[]=$fetchData; @@ -625,9 +671,25 @@ class Fees_status_model extends CI_Model else{ $result_array['feesStatus']=false; } - return $result_array; + } + /* + * get installment details + * created by kms + * */ + public function getInstallmentDetails($installment=null){ + $this->db->select('ID,FeesID,Name,Amount,DueDate'); + $this->db->where('FeesID',$installment); + $this->db->order_by('ID','ASC'); + $installmentDetails = $this->db->get(FEES_INSTALLMENT); + if($installmentDetails->result()){ + return $installmentDetails->result(); + } + else{ + return false; + } + } /* @@ -635,85 +697,119 @@ class Fees_status_model extends CI_Model * created by kms * */ public function defaultCourseFeesDetails($student=null){ - // get default course fees - $this->db->select('CourseID,CourseName,PC,TC,DC,MC,OtherFees'); - $this->db->where('CourseID',$student['CourseID']); - $endFeesDetails = $this->db->get(COURSE); - $myArray = array(); - if($endFeesDetails->result()){ - foreach ($endFeesDetails->result() as $value ){ - $pc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'PC', 'ActualFees'=>$value->PC); - $tc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'TC', 'ActualFees'=>$value->TC); - $dc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'DC', 'ActualFees'=>$value->DC); - $mc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'MC', 'ActualFees'=>$value->MC); - $other_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'OTHER', 'ActualFees'=>$value->OtherFees); - array_push($myArray,$pc_array); - array_push($myArray,$tc_array); - array_push($myArray,$dc_array); - array_push($myArray,$mc_array); - array_push($myArray,$other_array); - } + // check student fees paid details for get default course fees - // default course fees details in student status - foreach ($myArray as $row1){ - $this->db->select('CourseFees,STFOrWR,Waiver,Others,SessionName,RollNo'); - $this->db->where('StudentID',$student['StudentID']); - $this->db->where('CourseID',$student['CourseID']); - $this->db->where('FeesType',$row1['Sem_Year']); - $existFeesDetails = $this->db->get(STUDENTS_FEES_STATUS); + $this->db->select('ifnull(SUM((SFS.CourseFees)),0) as CourseFees'); + $this->db->from(STUDENTS_FEES_STATUS.' as SFS'); + $this->db->join(COURSE_FEES.' as CF', 'CF.ID = SFS.FeesType'); + $this->db->where('SFS.CourseID',$student['CourseID']); + $this->db->where('SFS.StudentID',$student['StudentID']); + $feesAmount = $this->db->get()->result(); - if($existData=$existFeesDetails->result()){ - $fetchData['ExistValue']=1; - $fetchData['ID']=$row1['Sem_Year']; - $fetchData['CourseID']=$row1['CourseID']; - $fetchData['Sem_Year']=$row1['Sem_Year']; - $fetchData['ActualFees']=$existData[0]->CourseFees; - $fetchData['STFOrWR']=$existData[0]->STFOrWR; - $fetchData['Waiver']=$existData[0]->Waiver; - $fetchData['Others']=$existData[0]->Others; - $fetchData['SessionName']=$existData[0]->SessionName; - $fetchData['RollNo']=$existData[0]->RollNo; - $fetchData['PayableFees']=$existData[0]->CourseFees+$existData[0]->STFOrWR+$existData[0]->Others-$existData[0]->Waiver; + $this->db->select('ifnull(SUM((SFP.BillAmount)),0) as PaidAmount'); + $this->db->from(STUDENTS_FEES_PAID.' as SFP'); + $this->db->join(STUDENTS_FEES_STATUS.' as SFS', 'SFS.FeesID = SFP.FeesId'); + $this->db->where('SFS.CourseID',$student['CourseID']); + $this->db->where('SFS.StudentID',$student['StudentID']); + $paidAmount = $this->db->get()->result(); - $CourseFeesArray1[]=$fetchData; + if($feesAmount[0]->CourseFees <= $paidAmount[0]->PaidAmount){ + // get default course fees + $this->db->select('CourseID,CourseName,PC,TC,DC,MC,OtherFees'); + $this->db->where('CourseID',$student['CourseID']); + $endFeesDetails = $this->db->get(COURSE); + $myArray = array(); + if($endFeesDetails->result()){ + foreach ($endFeesDetails->result() as $value ){ + $pc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'PC', 'ActualFees'=>$value->PC); + $tc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'TC', 'ActualFees'=>$value->TC); + $dc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'DC', 'ActualFees'=>$value->DC); + $mc_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'MC', 'ActualFees'=>$value->MC); + $other_array = array('CourseID'=>$value->CourseID,'Sem_Year'=>'OTHER', 'ActualFees'=>$value->OtherFees); + array_push($myArray,$pc_array); + array_push($myArray,$tc_array); + array_push($myArray,$dc_array); + array_push($myArray,$mc_array); + array_push($myArray,$other_array); } - else{ - $fetchData['ExistValue']=0; + // default course fees details in student status + foreach ($myArray as $row1){ + $this->db->select('FeesID,CourseFees,STFOrWR,Waiver,Others,SessionName,RollNo'); + $this->db->where('StudentID',$student['StudentID']); + $this->db->where('CourseID',$student['CourseID']); + $this->db->where('FeesType',$row1['Sem_Year']); + $existFeesDetails = $this->db->get(STUDENTS_FEES_STATUS); - $fetchData['ID']=$row1['Sem_Year']; + if($existData=$existFeesDetails->result()){ + $fetchData['ExistValue']=1; + $fetchData['ID']=$row1['Sem_Year']; + $fetchData['CourseID']=$row1['CourseID']; + $fetchData['Sem_Year']=$row1['Sem_Year']; + $fetchData['ActualFees']=$existData[0]->CourseFees; + $fetchData['STFOrWR']=$existData[0]->STFOrWR; + $fetchData['Waiver']=$existData[0]->Waiver; + $fetchData['Others']=$existData[0]->Others; + $fetchData['SessionName']=$existData[0]->SessionName; + $fetchData['RollNo']=$existData[0]->RollNo; + $fetchData['PayableFees']=$existData[0]->CourseFees+$existData[0]->STFOrWR+$existData[0]->Others-$existData[0]->Waiver; + // for installment details + $InstallemtResult = $this->getInstallmentDetails($existData[0]->FeesID); + if($InstallemtResult != false){ + $fetchData['InstallmentDetails']=$InstallemtResult; + } + else{ - $fetchData['CourseID']=$row1['CourseID']; - $fetchData['Sem_Year']=$row1['Sem_Year']; - $fetchData['ActualFees']=$row1['ActualFees']; - $fetchData['STFOrWR']=""; - $fetchData['Waiver']=""; - $fetchData['Others']=""; - $fetchData['SessionName']=""; - $fetchData['RollNo']=""; - $fetchData['PayableFees']=$row1['ActualFees']; - $CourseFeesArray1[]=$fetchData; + $fetchData['InstallmentDetails']=""; + + + } + $CourseFeesArray1[]=$fetchData; + + } + else{ + + $fetchData['ExistValue']=0; + + $fetchData['ID']=$row1['Sem_Year']; + + $fetchData['CourseID']=$row1['CourseID']; + $fetchData['Sem_Year']=$row1['Sem_Year']; + $fetchData['ActualFees']=$row1['ActualFees']; + $fetchData['STFOrWR']=""; + $fetchData['Waiver']=""; + $fetchData['Others']=""; + $fetchData['SessionName']="Nill"; + $fetchData['RollNo']=""; + $fetchData['PayableFees']=$row1['ActualFees']; + $fetchData['InstallmentDetails']=""; + $CourseFeesArray1[]=$fetchData; + + } } + return $CourseFeesArray1; + } + else { + return false; } - - return $CourseFeesArray1; } - else { + else{ return false; } + } /* * set fees for student * created by kms * */ - public function setFees($details=null){ + public function setFees($details=null,$jsonData=null){ $this->db->select('FeesID'); $this->db->where('CourseID', $details['CourseID']); $this->db->where('StudentID', $details['StudentID']); @@ -728,6 +824,35 @@ class Fees_status_model extends CI_Model $updateDetails['Others'] = $details['Others']; $updateDetails['UpdatedOn'] = $details['CreatedOn']; $updateDetails['UpdatedBy'] = $details['CreatedBy']; + + $installmentFeesID = $feesId[0]->FeesID; + foreach ($jsonData as $jrow){ + + $insertInstallment['FeesID'] = $installmentFeesID; + $insertInstallment['Name'] = $jrow['Name']; + $insertInstallment['Amount'] = $jrow['Amount']; + $insertInstallment['DueDate'] = $jrow['DueDate']; + $insertInstallment['CreatedBy'] = $details['CreatedBy']; + $insertInstallment['CreatedOn'] = $details['CreatedOn']; + if($jrow['ID'] =='' OR $jrow['ID'] =='undefined'){ + $this->db->insert(FEES_INSTALLMENT, $insertInstallment); + } + else{ + $updateInstallment['FeesID'] = $installmentFeesID; + $updateInstallment['Name'] = $jrow['Name']; + $updateInstallment['Amount'] = $jrow['Amount']; + $updateInstallment['DueDate'] = $jrow['DueDate']; + $updateInstallment['UpdatedBy'] = $details['CreatedBy']; + $updateInstallment['UpdatedOn'] = $details['CreatedOn']; + $this->db->where('ID',$jrow['ID']); + $this->db->update(FEES_INSTALLMENT, $updateInstallment); + + + } + + + } + $this->db->where('FeesID', $feesId[0]->FeesID); $this->db->update(STUDENTS_FEES_STATUS, $updateDetails); $result['setStatus'] = true; @@ -736,6 +861,45 @@ class Fees_status_model extends CI_Model } else{ $this->db->insert(STUDENTS_FEES_STATUS, $details); + + $this->db->select('FeesID'); + $this->db->where('CourseID', $details['CourseID']); + $this->db->where('StudentID', $details['StudentID']); + $this->db->where('FeesType', $details['FeesType']); + $existDb=$this->db->get(STUDENTS_FEES_STATUS)->last_row(); + if($existDb){ + $rowId = $existDb; + $installmentFeesID = $rowId->FeesID; + foreach ($jsonData as $jrow){ + $insertInstallment['FeesID'] = $installmentFeesID; + $insertInstallment['Name'] = $jrow['Name']; + $insertInstallment['Amount'] = $jrow['Amount']; + $insertInstallment['DueDate'] = $jrow['DueDate']; + $insertInstallment['CreatedBy'] = $details['CreatedBy']; + $insertInstallment['CreatedOn'] = $details['CreatedOn']; + if($jrow['ID'] =='' OR $jrow['ID'] =='undefined'){ + $this->db->insert(FEES_INSTALLMENT, $insertInstallment); + } + else{ + $updateInstallment['FeesID'] = $installmentFeesID; + $updateInstallment['Name'] = $jrow['Name']; + $updateInstallment['Amount'] = $jrow['Amount']; + $updateInstallment['DueDate'] = $jrow['DueDate']; + $updateInstallment['UpdatedBy'] = $details['CreatedBy']; + $updateInstallment['UpdatedOn'] = $details['CreatedOn']; + + $this->db->where('ID',$jrow['ID']); + $this->db->update(FEES_INSTALLMENT, $updateInstallment); + + + } + + + } + + + } + $result['setStatus'] = true; $result['message'] = "Successfully fees details is added."; @@ -743,6 +907,36 @@ class Fees_status_model extends CI_Model return $result; } + /* + * insert day book master while fees update + * created by kms + * */ + public function insertDayBookMaster($data=null){ + $insertArray['Date'] = $data['BillDate']; + $insertArray['CreatedBy'] = $data['CreatedBy']; + $insertArray['CreatedOn'] = $data['CreatedOn']; + $insertArray['Description'] = $data['InternalComments']; + $insertArray['Amount'] = $data['BillAmount']; + $insertArray['Status'] = 'Pending'; + + $insertArray['BranchCode'] = $data['UpdatedBy']; + + $this->db->select('ID,TypeID'); + $this->db->where('TypeID', 'I002'); + $this->db->where('TypeName', 'FEES'); + $getIncome=$this->db->get(INCOMEOUTCOMEMASTER)->last_row(); + + if($getIncome){ + $insertArray['Name'] = $getIncome->TypeID; + $insertArray['Type'] = $getIncome->ID; + $this->db->insert(DAYBOOKMASTER, $insertArray); + return true; + } + else{ + return true; + } + + } } \ No newline at end of file diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index da6279f8..069ade4c 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -67,7 +67,7 @@ "EMPLOYEE": "EMPLOYEE DETAILS", "ANNOUNCEMENT": "ANNOUNCEMENT DETAILS", "STATUS": "STATUS DETAILS", - "STUDENTSTATUS": "DEFAULT STUDENT ACTIVITY", + "STUDENTSTATUS": "STUDENT ACTIVITY STATUS", "CERTIFICATETYPE": "CERTIFICATE TYPE", "DAYBOOKMASTER":"DAY BOOK DETAILS" }, diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 6f56a329..02f6558b 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -34,6 +34,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.setModel = { "feesType": "", + }; /* * get payment options @@ -274,7 +275,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n /* * set fees for student * */ - $scope.submitFeesForStudent = function (myModel, form,updateModel, loading) { + $scope.submitFeesForStudent = function (myModel, form,updateModel, loading,installment) { + + var firstError = null; if (form.$invalid) { var field = null, firstError = null; @@ -291,6 +294,32 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } angular.element('.ng-invalid[name=' + firstError + ']').focus(); } else { + if(isNaN(installment.date)){ + $scope.pushDueDate1= $rootScope.lastInstallemtDate; + } + else{ + $scope.convertGetDate1=new Date(installment.date).toDateString(); + $scope.pushDueDate1 = $filter('date')(new Date($scope.convertGetDate1), 'dd-MM-yyyy'); + + } + if(installment.ID !='' && installment.ID !==null && installment.ID !=undefined){ + $rootScope.updateMoreItems.push({ + ID: installment.ID, + Name: installment.name, + Amount: installment.amount, + DueDate: $scope.pushDueDate1 + }); + } + else{ + $rootScope.updateMoreItems.push({ + ID: "", + Name: installment.name, + Amount: installment.amount, + DueDate: $scope.pushDueDate1 + }); + } + + $scope.ldloading5 = {}; $scope.ldloading5[loading.replace('-', '_')] = true; @@ -312,9 +341,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n other: updateModel.Others, session: updateModel.SessionName, rollNo: updateModel.RollNo, - createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID, - + installmentItems:$rootScope.updateMoreItems } }; @@ -327,12 +355,18 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n /*$scope.setModel = { "feesType": "", };*/ + $scope.myModelInstallemt.ID=""; + $scope.myModelInstallemt.name=""; + $scope.myModelInstallemt.amount=""; + $scope.myModelInstallemt.date=""; + $rootScope.updateMoreItems=[]; form.$setPristine(true); } else { $scope.ldloading5[loading.replace('-', '_')] = false; swal("Failed!", response.data.message, "error"); - $scope.getStudentSetFees(myModel.ID,myModel.CourseID,myModel.StudentID); + $rootScope.updateMoreItems.splice($scope.updateMoreItems.length-1); + // $scope.getStudentSetFees(myModel.ID,myModel.CourseID,myModel.StudentID); } }); @@ -390,6 +424,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.feesStructureInfo=""; $scope.getStudentSetFees = function (ID,courseID,studeID) { $scope.feesStructureInfo=""; + $scope.myModelInstallemt.ID=""; + $scope.myModelInstallemt.name=""; + $scope.myModelInstallemt.amount=""; + $scope.myModelInstallemt.date=""; + $rootScope.lastInstallemtDate=""; + $rootScope.updateMoreItems=[]; var setFees = { method: 'POST', url: apiPoint.url + 'getStudentFeesAssign/', @@ -409,14 +449,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.setModel = { "feesType": "", - }; } else { $scope.feesStructureInfo=""; $scope.setModel = { "feesType": "", - }; @@ -424,22 +462,114 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n }); } - - /* - * set course fees amount - * */ - /* $scope.changeFeesValues = function (model) { - console.log(model); - - }*/ + $scope.cancel = function () { $scope.editId=-1; $scope.studentFeesInfo=""; $scope.existStudentFeesDetails=""; $scope.getFeesUpdateStatus=""; + $scope.viewId=-1; } + /* + * get add more installment array + * created by kms + * */ + + $scope.myModelInstallemt = { + "ID":"", + "amount":"", + "name":"", + "date":"", + + + }; + $rootScope.updateMoreItems=[]; + $rootScope.clickMoreItems = function (model,form,setModel) { + $scope.convertGetDate=''; + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$stop_name; + } + + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + + angular.element('.ng-invalid[name=' + firstError + ']').focus(); + } + + else { + + if(isNaN(model.date)){ + $scope.pushDueDate= $rootScope.lastInstallemtDate; + } + else{ + $scope.convertGetDate=new Date(model.date).toDateString(); + $scope.pushDueDate = $filter('date')(new Date($scope.convertGetDate), 'dd-MM-yyyy'); + + } + if(model.ID !='' && model.ID !==null && model.ID !=undefined){ + $rootScope.updateMoreItems.push({ + ID:model.ID, + Name: model.name, + Amount: model.amount, + DueDate: $scope.pushDueDate + }); + } + else{ + $rootScope.updateMoreItems.push({ + ID:"", + Name: model.name, + Amount: model.amount, + DueDate: $scope.pushDueDate + }); + + } + + + $scope.myModelInstallemt.ID=""; + $scope.myModelInstallemt.name=""; + $scope.myModelInstallemt.amount=""; + $scope.myModelInstallemt.date=""; + } + } + /* + * change installment values + * */ + $scope.changeInstallemt = function (model,form) { + $rootScope.updateMoreItems=[]; + + if(model.InstallmentDetails != ''){ + $scope.myModelInstallemt.ID=model.InstallmentDetails[model.InstallmentDetails.length-1].ID; + + $scope.myModelInstallemt.name=model.InstallmentDetails[model.InstallmentDetails.length-1].Name; + $scope.myModelInstallemt.amount=model.InstallmentDetails[model.InstallmentDetails.length-1].Amount; + $scope.myModelInstallemt.date=model.InstallmentDetails[model.InstallmentDetails.length-1].DueDate; + $rootScope.lastInstallemtDate = $scope.myModelInstallemt.date; + for(var i=0; i < model.InstallmentDetails.length-1; i++){ + $rootScope.updateMoreItems.push(model.InstallmentDetails[i]); + + } + } + else{ + $scope.myModelInstallemt.ID=""; + $scope.myModelInstallemt.name=""; + $scope.myModelInstallemt.amount=""; + $scope.myModelInstallemt.date=""; + $rootScope.lastInstallemtDate=""; + } + + form.$setPristine(true); + + } @@ -476,6 +606,8 @@ app.controller('ModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $ $log.info('Modal dismissed at: ' + new Date()); }); }; + + }]); // Please note that $modalInstance represents a modal window (instance) dependency. diff --git a/Apollo/assets/views/dashboard.html b/Apollo/assets/views/dashboard.html index 57034c99..be1b8cb0 100755 --- a/Apollo/assets/views/dashboard.html +++ b/Apollo/assets/views/dashboard.html @@ -32,6 +32,7 @@
+ @@ -42,7 +43,7 @@ - + @@ -76,6 +77,7 @@
Total Entries :{{todayFolloupDetails.length}}
Tracking ID Lead Name
{{today.TrackingID}} {{today.LeadName}}
+ @@ -121,6 +123,7 @@
Total Entries :{{pendingFolloupDetails.length}}
Tracking ID Lead Name
+ diff --git a/Apollo/assets/views/daybook/daybook.html b/Apollo/assets/views/daybook/daybook.html index 9002526b..35b44148 100755 --- a/Apollo/assets/views/daybook/daybook.html +++ b/Apollo/assets/views/daybook/daybook.html @@ -110,7 +110,7 @@ - - - - - diff --git a/Apollo/assets/views/status-update/setFeesForStudent.html b/Apollo/assets/views/status-update/setFeesForStudent.html index 2ea0b0c7..f4d0a368 100755 --- a/Apollo/assets/views/status-update/setFeesForStudent.html +++ b/Apollo/assets/views/status-update/setFeesForStudent.html @@ -1,3 +1,8 @@ +
@@ -11,12 +16,12 @@ Set Fees For Student
-
- + ng-model="setModel.feesType.RollNo" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" ng-disabled="setModel.feesType.ExistValue=='1' && userType!='R004'"/> Roll no is required Invalid roll no
- - -
-
-
-
+
+ +
-
--> -
-
-
+ +
+
+
+
+

Installment Details

+ + +
+ + + +
+
+ +
+
+ + + + Installment is required + Enter a valid installment +
+
+ + + + Amount is required + Enter a valid amount + +
+
+
+ + + Date is required. + + +
+ +
+
+ +
+
+
+
+ + + + Enter a valid installment +
+
+ + + + Enter a valid amount + +
+
+ + + + Enter a valid date + +
+
+ + +
+
+
+
+
+ +
- - diff --git a/Apollo/assets/views/status-update/updateFeesStatus.html b/Apollo/assets/views/status-update/updateFeesStatus.html index b4f1f318..b5967b9b 100755 --- a/Apollo/assets/views/status-update/updateFeesStatus.html +++ b/Apollo/assets/views/status-update/updateFeesStatus.html @@ -47,7 +47,7 @@
- Roll No is required + ng-model="updateModel.feesType.RollNo" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" readonly/> + Invalid roll no @@ -299,18 +299,18 @@
+ ng-class="{'has-error':Form.billno.$dirty && Form.billno.$invalid}"> - + ng-model="updateModel.billNo" ng-pattern="/^[a-zA-Z0-9-./\s]*$/"/> + Bill no is required - Invalid bill no + ng-if="Form.billno.$dirty && Form.billno.$error.pattern">Invalid receipt no
@@ -447,6 +447,7 @@
+ @@ -455,6 +456,7 @@ + - diff --git a/Apollo/assets/views/student/student_details.html b/Apollo/assets/views/student/student_details.html index 592551df..4b98c2db 100755 --- a/Apollo/assets/views/student/student_details.html +++ b/Apollo/assets/views/student/student_details.html @@ -2,7 +2,7 @@
-

{{ mainTitle }}

+

{{ mainTitle }}

diff --git a/Apollo/assets/views/studentStatusUpdate.html b/Apollo/assets/views/studentStatusUpdate.html index beab8b2c..57f9eb89 100755 --- a/Apollo/assets/views/studentStatusUpdate.html +++ b/Apollo/assets/views/studentStatusUpdate.html @@ -11,7 +11,7 @@
-

+

Total Entries :{{leadDetails.length}}
Tracking ID Lead NameVoucher Number Paid To + Paid To / Received From Type @@ -300,9 +300,9 @@ - - Paid To / Reveived To is required. + Paid To / Reveived From is required.
Voucher Number Paid To + Paid To / Received From Description @@ -252,7 +252,7 @@ Voucher Number Paid To + Paid To / Received From Description diff --git a/Apollo/assets/views/daybook/daybooksuperadmin.html b/Apollo/assets/views/daybook/daybooksuperadmin.html index c90b04d8..f9397a2b 100755 --- a/Apollo/assets/views/daybook/daybooksuperadmin.html +++ b/Apollo/assets/views/daybook/daybooksuperadmin.html @@ -161,7 +161,7 @@ Voucher Number Paid To + Paid To / Received From Description @@ -257,7 +257,7 @@ Voucher Number Paid To + Paid To / Received From Description diff --git a/Apollo/assets/views/status-update/fees_status.html b/Apollo/assets/views/status-update/fees_status.html index 3bbee40e..163c6e2d 100755 --- a/Apollo/assets/views/status-update/fees_status.html +++ b/Apollo/assets/views/status-update/fees_status.html @@ -15,6 +15,9 @@ } + a { + color: #007AFF; + } @@ -121,7 +124,7 @@ - +
Bill NO Bill Date Bill AmountReceipt NO Print
{{v.BillNO}} {{v.BillDate}} {{v.BillAmount}}{{v.ReceiptNo}} @@ -479,8 +481,8 @@ 10/1, First Floor, Old Airport Road, Domlur, Bangalore - 560071. karnataka
Land Mark - Opp to Domlur Bus Stop Ph: 9620214554
- FEES RECEIPT + + FEES ESTIMATE DOM: {{billNo}}