This commit is contained in:
resicovenba 2018-03-10 12:50:56 +05:30
commit 62e9d18194
8 changed files with 1062 additions and 481 deletions

View File

@ -98,6 +98,11 @@ defined('CERTIFICATEUPDATE') OR define('CERTIFICATEUPDATE','C001');
defined('APILICATIONUPDATE') OR define('APILICATIONUPDATE','A001'); defined('APILICATIONUPDATE') OR define('APILICATIONUPDATE','A001');
defined('BOOKLETUPDATE') OR define('BOOKLETUPDATE','B001'); defined('BOOKLETUPDATE') OR define('BOOKLETUPDATE','B001');
defined('MATERIALUPDATE') OR define('MATERIALUPDATE','M001'); defined('MATERIALUPDATE') OR define('MATERIALUPDATE','M001');
// define fees program types
defined('SEMYEARFEES') OR define('SEMYEARFEES','Y001');
defined('REGULARFEES') OR define('REGULARFEES','P001');
defined('LATERALFEES') OR define('LATERALFEES','P002');
//encript database table name //encript database table name
defined('LOGIN') OR define('LOGIN','T_Login'); defined('LOGIN') OR define('LOGIN','T_Login');
defined('BRANCH') OR define('BRANCH','T_BranchMaster'); defined('BRANCH') OR define('BRANCH','T_BranchMaster');
@ -144,5 +149,5 @@ defined('STUDENTDOCUMENTTRACKDETAILS') OR define('STUDENTDOCUMENTTRACKDETAILS','
//end of database table name //end of database table name
//encripted password -> md5 //encripted password -> md5
defined('ENCR_PASSWORD') OR define('ENCR_PASSWORD','7594aacdb21d8a9b29f71ea9163a5730'); defined('ENCR_PASSWORD') OR define('ENCR_PASSWORD','e99a18c428cb38d5f260853678922e03');
//end of encripted password //end of encripted password

View File

@ -79,7 +79,6 @@ class Fees_status_model extends CI_Model
* */ * */
public function getStudentFeesStructure($student=null){ public function getStudentFeesStructure($student=null){
$this->db->select('CF.ID,CF.Sem_Year,CF.ProgramType,SFS.FeesID,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees,SM.SessionName as SessionName,SM1.SessionName as ToSessionName'); $this->db->select('CF.ID,CF.Sem_Year,CF.ProgramType,SFS.FeesID,SFS.CourseID,SFS.CourseFees,SFS.STFOrWR,SFS.Waiver,SFS.Others,SFS.RollNo,CU.PC,CU.TC,CU.DC,CU.MC,CU.OtherFees,SM.SessionName as SessionName,SM1.SessionName as ToSessionName');
$this->db->from(STUDENTS_FEES_STATUS.' as SFS'); $this->db->from(STUDENTS_FEES_STATUS.' as SFS');
$this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName'); $this->db->join(SESSIONMASTER.' as SM', 'SM.SessionID = SFS.SessionName');
@ -395,8 +394,9 @@ class Fees_status_model extends CI_Model
* created by kms * created by kms
* */ * */
public function updateFees($feesPaidDetails=null) public function updateFees($feesPaidDetails=null,$courseID=null)
{ {
if($feesPaidDetails['UpdatedBy']=='All'){ if($feesPaidDetails['UpdatedBy']=='All'){
$this->db->select('BranchID'); $this->db->select('BranchID');
$this->db->where('FeesID', $feesPaidDetails['FeesId']); $this->db->where('FeesID', $feesPaidDetails['FeesId']);
@ -406,6 +406,10 @@ class Fees_status_model extends CI_Model
$feesPaidDetails['UpdatedBy'] = $getStudentBranch[0]->BranchID; $feesPaidDetails['UpdatedBy'] = $getStudentBranch[0]->BranchID;
} }
// $this->entryForAllStatus($feesPaidDetails,$courseID);
// die();
$this->db->select('BillNO'); $this->db->select('BillNO');
$this->db->where('UpdatedBy', $feesPaidDetails['UpdatedBy']); $this->db->where('UpdatedBy', $feesPaidDetails['UpdatedBy']);
@ -430,6 +434,14 @@ class Fees_status_model extends CI_Model
$result['paidStatus'] = false; $result['paidStatus'] = false;
$result['message'] = "This bill number is already exist!"; $result['message'] = "This bill number is already exist!";
} else { } else {
$this->db->select('ReceiptNo');
$this->db->where('ReceiptNo', $feesPaidDetails['ReceiptNo']);
if($this->db->get(STUDENTS_FEES_PAID)->first_row() AND $feesPaidDetails['ReceiptNo']!=''){
$result['paidStatus'] = false;
$result['message'] = "This receipt number is already exist!";
}
else{
$this->db->insert(STUDENTS_FEES_PAID, $feesPaidDetails); $this->db->insert(STUDENTS_FEES_PAID, $feesPaidDetails);
if ($this->db->affected_rows() == '1') { if ($this->db->affected_rows() == '1') {
@ -438,16 +450,24 @@ class Fees_status_model extends CI_Model
$feesPayedID = $this->db->insert_id(); $feesPayedID = $this->db->insert_id();
// $entryOfCallTrack = $this->updateInCallTrack($trackDetails); // $entryOfCallTrack = $this->updateInCallTrack($trackDetails);
// day book entry // day book entry
if($feesPaidDetails['BillAmount']!='0'){ if($feesPaidDetails['BillAmount']!='0'){
$dayBookEntry = $this->insertDayBookMaster($feesPaidDetails,$feesPayedID); $dayBookEntry = $this->insertDayBookMaster($feesPaidDetails,$feesPayedID);
} }
// Entry for all status screen except fees
} }
else{ else{
$result['paidStatus'] = false; $result['paidStatus'] = false;
$result['message'] = "Something went wrong.please try again"; $result['message'] = "Something went wrong.please try again";
} }
}
} }
@ -882,7 +902,12 @@ class Fees_status_model extends CI_Model
$paidAmount = $this->db->get()->result(); $paidAmount = $this->db->get()->result();
if($feesAmount[0]->CourseFees+$feesAmount[0]->STFOrWR+$feesAmount[0]->Others-$feesAmount[0]->Waiver <= $paidAmount[0]->PaidAmount AND $feesAmount[0]->CourseFees !='0'){ if($feesAmount[0]->CourseFees+$feesAmount[0]->STFOrWR+$feesAmount[0]->Others-$feesAmount[0]->Waiver <= $paidAmount[0]->PaidAmount AND $feesAmount[0]->CourseFees !='0'){
// get default course fees $valid=1;
}
else{
$valid=0;
}
// get default course fees with paid
$this->db->select('CourseID,CourseName,PC,TC,DC,MC,OtherFees'); $this->db->select('CourseID,CourseName,PC,TC,DC,MC,OtherFees');
$this->db->where('CourseID',$student['CourseID']); $this->db->where('CourseID',$student['CourseID']);
$endFeesDetails = $this->db->get(COURSE); $endFeesDetails = $this->db->get(COURSE);
@ -911,6 +936,7 @@ class Fees_status_model extends CI_Model
$existFeesDetails = $this->db->get(STUDENTS_FEES_STATUS); $existFeesDetails = $this->db->get(STUDENTS_FEES_STATUS);
if($existData=$existFeesDetails->result()){ if($existData=$existFeesDetails->result()){
$fetchData['Valid']=$valid;
$fetchData['ExistValue']=1; $fetchData['ExistValue']=1;
$fetchData['ID']=$row1['Sem_Year']; $fetchData['ID']=$row1['Sem_Year'];
$fetchData['CourseID']=$row1['CourseID']; $fetchData['CourseID']=$row1['CourseID'];
@ -943,6 +969,8 @@ class Fees_status_model extends CI_Model
} }
else{ else{
$fetchData['Valid']=$valid;
$fetchData['ExistValue']=0; $fetchData['ExistValue']=0;
$fetchData['ID']=$row1['Sem_Year']; $fetchData['ID']=$row1['Sem_Year'];
@ -971,10 +999,10 @@ class Fees_status_model extends CI_Model
else { else {
return false; return false;
} }
} /* }
else{ else{
return false; return false;
} }*/
@ -1089,8 +1117,11 @@ class Fees_status_model extends CI_Model
* created by kms * created by kms
* */ * */
public function insertDayBookMaster($data=null,$paymentID){ public function insertDayBookMaster($data=null,$paymentID){
print_r($data); $this->db->distinct();
die(); $this->db->select('Firstname');
$this->db->where('StudentID', $data['StudentID']);
$getStudentName=$this->db->get(STUDENTS)->result();
if($getStudentName){
// this is for income entry // this is for income entry
$insertArray['Date'] = $data['BillDate']; $insertArray['Date'] = $data['BillDate'];
$insertArray['CreatedBy'] = $data['CreatedBy']; $insertArray['CreatedBy'] = $data['CreatedBy'];
@ -1100,7 +1131,8 @@ class Fees_status_model extends CI_Model
$insertArray['Status'] = 'Approved'; $insertArray['Status'] = 'Approved';
$insertArray['PaymentStatus'] = false; $insertArray['PaymentStatus'] = false;
$insertArray['FeesPaymentID'] = $paymentID; $insertArray['FeesPaymentID'] = $paymentID;
//$insertArray['Date'] = $data['BillDate']; $insertArray['VoucherNumber'] = $data['BillNO'];
$insertArray['PaidTo'] = $getStudentName[0]->Firstname;
$insertArray['BranchCode'] = $data['UpdatedBy']; $insertArray['BranchCode'] = $data['UpdatedBy'];
$this->db->select('ID,TypeID'); $this->db->select('ID,TypeID');
@ -1126,7 +1158,8 @@ class Fees_status_model extends CI_Model
$expenseArray['Status'] = 'Approved'; $expenseArray['Status'] = 'Approved';
$expenseArray['PaymentStatus'] = false; $expenseArray['PaymentStatus'] = false;
$expenseArray['FeesPaymentID'] = $paymentID; $expenseArray['FeesPaymentID'] = $paymentID;
$expenseArray['VoucherNumber'] = $data['BillNO'];
$expenseArray['PaidTo'] = $getStudentName[0]->Firstname;
$expenseArray['BranchCode'] = $data['UpdatedBy']; $expenseArray['BranchCode'] = $data['UpdatedBy'];
$this->db->select('ID,TypeID'); $this->db->select('ID,TypeID');
@ -1141,6 +1174,12 @@ class Fees_status_model extends CI_Model
} }
return true; return true;
}
else{
return false;
}
@ -1520,6 +1559,44 @@ class Fees_status_model extends CI_Model
} }
} }
/*
* Entry for all status update
* created by kms
* */
public function entryForAllStatus($feesDetails=null,$courseID=null){
$singleFeesDetails=["SEM1","SEM2","SEM3","SEM4","SEM5","SEM6","SEM7","SEM8"];
$this->db->select('SFS.FeesID');
$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',$courseID);
$this->db->where('SFS.StudentID',$feesDetails['StudentID']);
$existDetails = $this->db->get();
if($existDetails->result()){
return true;
}
else{
$this->db->select('ID,FeesType,ProgramType');
$this->db->where('CourseID',$courseID);
$getFeesTypeDetails = $this->db->get(COURSE_FEES);
if($getFeesTypeDetails->result()){
foreach ($getFeesTypeDetails->result() as $row){
if($row->ProgramType==REGULARFEES OR $row->ProgramType==LATERALFEES){
$insertDetails['StudentID']=$feesDetails['StudentID'];
$insertDetails['CourseID']=$row->ID;
$insertDetails['BranchCode']="";
$insertDetails['ListCode']="";
$insertDetails['StudentID']="";
}
}
}
}
}
} }

View File

@ -17,7 +17,7 @@ class Login_model extends CI_Model
* */ * */
/* /*
* Default login venba@123 -> 7594aacdb21d8a9b29f71ea9163a5730 * Default login abc123 -> e99a18c428cb38d5f260853678922e03
*/ */
public function login($mobile = null, $password = null) public function login($mobile = null, $password = null)

View File

@ -3,7 +3,7 @@
* controllers for ng-table * controllers for ng-table
* Simple table with sorting and filtering on AngularJS * Simple table with sorting and filtering on AngularJS
*/ */
app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", "installmentService", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,installmentService) { app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", "installmentService", "SweetAlert", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state,installmentService,SweetAlert) {
$scope.myModel = { $scope.myModel = {
"studentName": "", "studentName": "",
"mobileNumber": "", "mobileNumber": "",
@ -31,6 +31,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
/* /*
* set model * set model
* */ * */
@ -67,6 +68,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
{ {
"paymentOn":"WAIVER" "paymentOn":"WAIVER"
}, },
{
"paymentOn":"Credit/Debit Card"
}
]; ];
@ -196,6 +200,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* */ * */
$scope.changeTotalFees = function (model) { $scope.changeTotalFees = function (model) {
$scope.updateModel.billAmount = model.BalanceAmount; $scope.updateModel.billAmount = model.BalanceAmount;
$scope.updateModel.date = $filter('date')(new Date(), 'dd-MM-yyyy');
} }
@ -486,6 +491,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
} }
} }
angular.element('.ng-invalid[name=' + firstError + ']').focus(); angular.element('.ng-invalid[name=' + firstError + ']').focus();
swal("", "Please fill session details/installment details", "warning");
} else { } else {
/* if(isNaN(installment.date)){ /* if(isNaN(installment.date)){
@ -543,8 +549,16 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
} }
} }
else{ else{
if(updateModel.Valid=='1'){
var statusUpdate=true; var statusUpdate=true;
} }
else{
var statusUpdate=false;
swal("", "Course fees are not paid so unable to set course fees", "warning");
}
}
if(statusUpdate==true){ if(statusUpdate==true){
$scope.setSessionTo=""; $scope.setSessionTo="";
@ -646,8 +660,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.updateModel = { $scope.updateModel = {
"feesType": $scope.studentFeesInfo[0], "feesType": $scope.studentFeesInfo[0],
"billAmount":$scope.studentFeesInfo[0].BalanceAmount,
"date":$filter('date')(new Date(), 'dd-MM-yyyy')
}; };
/* $scope.billCurrentDate=$filter('date')(new Date(), 'dd-MM-yyyy');
alert($scope.billCurrentDate);*/
} else { } else {
@ -785,10 +803,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.setModel.feesType.SessionName=$scope.feesStructureInfo[0].SessionName; $scope.setModel.feesType.SessionName=$scope.feesStructureInfo[0].SessionName;
$scope.setModel.feesType.SessionNameTo=$scope.feesStructureInfo[0].ToSessionName; $scope.setModel.feesType.SessionNameTo=$scope.feesStructureInfo[0].ToSessionName;
$scope.dateValidations();
} }
$scope.dateValidations();
} else { } else {
$scope.feesStructureInfo=""; $scope.feesStructureInfo="";
$scope.setModel = { $scope.setModel = {
@ -808,13 +825,13 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.changeBatch = function (Details) { $scope.changeBatch = function (Details) {
if(Details.InstallmentDetails != ''){ if(Details.InstallmentDetails != ''){
$scope.setFeesTotalAmount(Details,'2','2'); $scope.setFeesTotalAmount(Details,'2','2','1');
} }
else{ else{
$rootScope.updateMoreItems=[]; $rootScope.updateMoreItems=[];
$scope.setModel.feesType.Others = ''; $scope.setModel.feesType.Others = '';
$scope.setFeesTotalAmount(Details,'1','1'); $scope.setFeesTotalAmount(Details,'1','1','1');
} }
@ -861,9 +878,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
} }
angular.element('.ng-invalid[name=' + firstError + ']').focus(); angular.element('.ng-invalid[name=' + firstError + ']').focus();
swal("", "Please fill session details/installment details", "warning");
} }
else { else {
if(isNaN($rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].DueDate)){ if(isNaN($rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].DueDate)){
$scope.pushDueDate= $rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].DueDate; $scope.pushDueDate= $rootScope.updateMoreItems[$rootScope.updateMoreItems.length-1].DueDate;
} }
@ -955,10 +975,10 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$rootScope.lastInstallemtDate="";*/ $rootScope.lastInstallemtDate="";*/
$rootScope.updateMoreItems=[]; $rootScope.updateMoreItems=[];
} }
$scope.setFeesTotalAmount(model,'1','2'); $scope.setFeesTotalAmount(model,'1','2','1');
} }
else{ else{
$scope.setFeesTotalAmount(model,'3','1'); $scope.setFeesTotalAmount(model,'3','1','1');
} }
@ -970,9 +990,14 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
/* /*
* get set fees total amount * get set fees total amount
* */ * */
$scope.setFeesTotalAmount = function (values,type,type1) { $scope.setFeesTotalAmount = function (values,type,type1,checkPermission) {
if(type==3 || values.Sem_Year=='TC' || values.Sem_Year=='PC' || values.Sem_Year=='DC' || values.Sem_Year=='MC' || values.Sem_Year=='OTHER'){ if(type==3 || values.Sem_Year=='TC' || values.Sem_Year=='PC' || values.Sem_Year=='DC' || values.Sem_Year=='MC' || values.Sem_Year=='OTHER'){
if(values.Valid=='0'){
swal("", "Course fees are not paid so unable to set course fees", "warning");
}
if(values.ActualFees=='' || values.ActualFees==null || values.ActualFees==undefined){ if(values.ActualFees=='' || values.ActualFees==null || values.ActualFees==undefined){
$scope.actFees=0; $scope.actFees=0;
} }
@ -1047,11 +1072,11 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.calculateInstallemnts(values,$scope.setTotalAmount,$scope.othersFees,type); $scope.calculateInstallemnts(values,$scope.setTotalAmount,$scope.othersFees,type);
} }
else if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length<=2){ else if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length<=2){
$scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1); $scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1,checkPermission);
} }
else{ else{
$scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1); $scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1,checkPermission);
} }
} }
@ -1089,11 +1114,11 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.calculateInstallemnts(values,$scope.setTotalAmount,$scope.othersFees,type); $scope.calculateInstallemnts(values,$scope.setTotalAmount,$scope.othersFees,type);
} }
else if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length<=2){ else if(values.InstallmentDetails=='' && $rootScope.updateMoreItems.length<=2){
$scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1); $scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1,checkPermission);
} }
else{ else{
$scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1); $scope.calculateInstallemntsExist(values,$scope.setTotalAmount,$scope.othersFees,type,type1,checkPermission);
} }
@ -1118,8 +1143,273 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
var cDate = moment(); var cDate = moment();
var bDate = moment($scope.BatchDate); var bDate = moment($scope.BatchDate);
var startPayableAmt = parseInt(totAmt); var startPayableAmt = parseInt(totAmt);
if(cDate > bDate && moment(cDate).diff(bDate, 'days')>30){
SweetAlert.swal({
title: "",
text: "The selected installment date is crossing the maximum allowed period. Do you want to continue (Yes/No). If yes you need to get approval from the higher authorities",
type: "info",
showCancelButton: true,
confirmButtonColor: "#eea236", confirmButtonText: "Yes",
cancelButtonText: "No",
closeOnConfirm: true,
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
for (var i = 1; i <= 2; i++) {
if (i == 1) {
/* if (cDate <= bDate) {
var percentage = Math.round(startPayableAmt * 70 / 100);
percentage = Math.round(percentage / 10) * 10;
startPayableAmt = startPayableAmt - percentage;
$scope.insFirstDate = $filter('date')(new Date(cDate), 'dd-MM-yyyy');
var dayDiff2 = moment(bDate).diff(cDate, 'days');
if (dayDiff2 > 30) {
$scope.insSecondDate = moment($scope.BatchDate).subtract(30, 'days');
$scope.insSecondDate = $filter('date')(new Date($scope.insSecondDate), 'dd-MM-yyyy');
}
else if (dayDiff2 > 15 && dayDiff2 <= 30) {
$scope.insSecondDate = moment($scope.BatchDate).subtract(15, 'days');
$scope.insSecondDate = $filter('date')(new Date($scope.insSecondDate), 'dd-MM-yyyy');
}
else {
$scope.insSecondDate = $filter('date')(new Date(cDate), 'dd-MM-yyyy');
}
}
else {*/
var dayDiff = moment().diff(bDate, 'days');
var todatlFineAmt = 0;
var fineAmt1 = 0;
var fineAmt11 = 0;
var countDays = 0;
for (var k = 1; k <= dayDiff; k++) {
if (k <= 90) {
if (startPayableAmt <= 10000) {
fineAmt1 = 300;
}
else if ((startPayableAmt > 10000) && (startPayableAmt <= 20000)) {
fineAmt1 = 600;
}
else if (startPayableAmt > 20000) {
fineAmt1 = 900;
}
}
else {
countDays = countDays+1;
if (countDays<30) {
if(countDays==1){
fineAmt11 = parseInt(fineAmt11)+300;
}
}
else{
countDays=0;
}
}
}
// todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt11);
if(type=='1'){
$scope.setTotalAmount = Math.round(parseInt(totAmt) + parseInt(todatlFineAmt)-parseInt(other));
$scope.setModel.feesType.Others = Math.round(parseInt(todatlFineAmt));
}
else{
$scope.setTotalAmount = Math.round(parseInt(totAmt));
if(other==0){
$scope.setModel.feesType.Others = '';
}
else{
$scope.setModel.feesType.Others = Math.round(parseInt(other));
}
}
startPayableAmt = parseInt($scope.setTotalAmount);
var percentage = Math.round(startPayableAmt * 70 / 100);
percentage = Math.round(percentage / 10) * 10;
startPayableAmt = startPayableAmt - percentage;
$scope.insFirstDate = $filter('date')(new Date(cDate), 'dd-MM-yyyy');
$scope.insSecondDate = $filter('date')(new Date(cDate), 'dd-MM-yyyy');
// }
$scope.updateMoreItems.push({
ID: "",
Name: installmentService.installmentWords(i),
Amount: percentage,
DueDate: $scope.insFirstDate
});
}
else {
startPayableAmt = Math.round(startPayableAmt / 10) * 10;
$scope.updateMoreItems.push({
ID: "",
Name: installmentService.installmentWords(i),
Amount: startPayableAmt,
DueDate: $scope.insSecondDate
});
/* $scope.myModelInstallemt.ID = "";
$scope.myModelInstallemt.name = installmentService.installmentWords(i);
$scope.myModelInstallemt.amount = startPayableAmt;
$scope.myModelInstallemt.date = $scope.insSecondDate;
$rootScope.lastInstallemtDate = $scope.myModelInstallemt.date;*/
}
}
$scope.dateValidations();
}
else {
for (var i = 1; i <= 2; i++) {
if (i == 1) {
/* if (cDate <= bDate) {
var percentage = Math.round(startPayableAmt * 70 / 100);
percentage = Math.round(percentage / 10) * 10;
startPayableAmt = startPayableAmt - percentage;
$scope.insFirstDate = $filter('date')(new Date(cDate), 'dd-MM-yyyy');
var dayDiff2 = moment(bDate).diff(cDate, 'days');
if (dayDiff2 > 30) {
$scope.insSecondDate = moment($scope.BatchDate).subtract(30, 'days');
$scope.insSecondDate = $filter('date')(new Date($scope.insSecondDate), 'dd-MM-yyyy');
}
else if (dayDiff2 > 15 && dayDiff2 <= 30) {
$scope.insSecondDate = moment($scope.BatchDate).subtract(15, 'days');
$scope.insSecondDate = $filter('date')(new Date($scope.insSecondDate), 'dd-MM-yyyy');
}
else {
$scope.insSecondDate = $filter('date')(new Date(cDate), 'dd-MM-yyyy');
}
}
else {*/
var tempCurrentDate = moment(bDate).add(30, 'days');
$scope.insSecondDate = moment($scope.BatchDate).subtract(30, 'days');
var dayDiff = moment(tempCurrentDate).diff(bDate, 'days');
var todatlFineAmt = 0;
var fineAmt1 = 0;
var fineAmt11 = 0;
var countDays = 0;
for (var k = 1; k <= dayDiff; k++) {
if (k <= 90) {
if (startPayableAmt <= 10000) {
fineAmt1 = 300;
}
else if ((startPayableAmt > 10000) && (startPayableAmt <= 20000)) {
fineAmt1 = 600;
}
else if (startPayableAmt > 20000) {
fineAmt1 = 900;
}
}
else {
countDays = countDays+1;
if (countDays<30) {
if(countDays==1){
fineAmt11 = parseInt(fineAmt11)+300;
}
}
else{
countDays=0;
}
}
}
// todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt11);
if(type=='1'){
$scope.setTotalAmount = Math.round(parseInt(totAmt) + parseInt(todatlFineAmt)-parseInt(other));
$scope.setModel.feesType.Others = Math.round(parseInt(todatlFineAmt));
}
else{
$scope.setTotalAmount = Math.round(parseInt(totAmt));
if(other==0){
$scope.setModel.feesType.Others = '';
}
else{
$scope.setModel.feesType.Others = Math.round(parseInt(other));
}
}
startPayableAmt = parseInt($scope.setTotalAmount);
var percentage = Math.round(startPayableAmt * 70 / 100);
percentage = Math.round(percentage / 10) * 10;
startPayableAmt = startPayableAmt - percentage;
$scope.insFirstDate = $filter('date')(new Date(tempCurrentDate), 'dd-MM-yyyy');
$scope.insSecondDate = $filter('date')(new Date(tempCurrentDate), 'dd-MM-yyyy');
//}
$scope.updateMoreItems.push({
ID: "",
Name: installmentService.installmentWords(i),
Amount: percentage,
DueDate: $scope.insFirstDate
});
}
else {
startPayableAmt = Math.round(startPayableAmt / 10) * 10;
$scope.updateMoreItems.push({
ID: "",
Name: installmentService.installmentWords(i),
Amount: startPayableAmt,
DueDate: $scope.insSecondDate
});
/* $scope.myModelInstallemt.ID = "";
$scope.myModelInstallemt.name = installmentService.installmentWords(i);
$scope.myModelInstallemt.amount = startPayableAmt;
$scope.myModelInstallemt.date = $scope.insSecondDate;
$rootScope.lastInstallemtDate = $scope.myModelInstallemt.date;*/
}
}
$scope.dateValidations();
}
}
);
}
else{
for (var i = 1; i <= 2; i++) { for (var i = 1; i <= 2; i++) {
if (i == 1) { if (i == 1) {
if (cDate <= bDate) { if (cDate <= bDate) {
@ -1164,7 +1454,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
else if ((startPayableAmt > 10000) && (startPayableAmt <= 20000)) { else if ((startPayableAmt > 10000) && (startPayableAmt <= 20000)) {
fineAmt1 = 600; fineAmt1 = 600;
} }
else if (startPayableAmt > 30000) { else if (startPayableAmt > 20000) {
fineAmt1 = 900; fineAmt1 = 900;
} }
@ -1240,9 +1530,12 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
} }
} }
$scope.dateValidations(); $scope.dateValidations();
}
} }
@ -1252,7 +1545,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
* calculate exist installment * calculate exist installment
* created by kms * created by kms
* */ * */
$scope.calculateInstallemntsExist = function (model,totAmt,other,type,type1) { $scope.calculateInstallemntsExist = function (model,totAmt,other,type,type1,checkPermission) {
var exBatchDate = moment($scope.BatchDate); var exBatchDate = moment($scope.BatchDate);
if(type==2 || type==1){ if(type==2 || type==1){
if($rootScope.updateMoreItems.length>0){ if($rootScope.updateMoreItems.length>0){
@ -1270,10 +1563,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
if($rootScope.updateMoreItems[position].DueDate.length<=10){ if($rootScope.updateMoreItems[position].DueDate.length<=10){
exDatenew1 = new Date($rootScope.updateMoreItems[position].DueDate.substring(6,10)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(3,5)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(0,2)); exDatenew1 = new Date($rootScope.updateMoreItems[position].DueDate.substring(6,10)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(3,5)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(0,2));
exDatenew1 = moment(exDatenew1); exDatenew1 = moment(exDatenew1);
} }
else{ else{
exDatenew1 = moment($rootScope.updateMoreItems[position].DueDate); exDatenew1 = moment($rootScope.updateMoreItems[position].DueDate);
} }
@ -1312,6 +1603,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
if($rootScope.updateMoreItems.length>2){ if($rootScope.updateMoreItems.length>2){
angular.forEach($rootScope.updateMoreItems,function (values,key) { angular.forEach($rootScope.updateMoreItems,function (values,key) {
if(key>=1 && $rootScope.updateMoreItems.length-1!=key){ if(key>=1 && $rootScope.updateMoreItems.length-1!=key){
@ -1331,6 +1623,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
} }
else if(exDatenew1 > exBatchDate && existLoop==0){ else if(exDatenew1 > exBatchDate && existLoop==0){
exitPayAmt=parseInt(exitPayAmt)-parseInt(existTotAmt); exitPayAmt=parseInt(exitPayAmt)-parseInt(existTotAmt);
var dayDiff = exDatenew1.diff(exBatchDate, 'days'); var dayDiff = exDatenew1.diff(exBatchDate, 'days');
@ -1341,6 +1634,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
var countDays = 0; var countDays = 0;
for (var k = 1; k <= dayDiff; k++) { for (var k = 1; k <= dayDiff; k++) {
if (k <= 90) { if (k <= 90) {
if (exitPayAmt <= 10000) { if (exitPayAmt <= 10000) {
@ -1350,7 +1644,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
else if ((exitPayAmt > 10000) && (exitPayAmt <= 20000)) { else if ((exitPayAmt > 10000) && (exitPayAmt <= 20000)) {
fineAmt1 = 600; fineAmt1 = 600;
} }
else if (exitPayAmt > 30000) { else if (exitPayAmt > 20000) {
fineAmt1 = 900; fineAmt1 = 900;
} }
@ -1439,17 +1733,263 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
} }
} }
}
});
if(checkPermission=='1'){
// check batch date for confirmation
angular.forEach($rootScope.updateMoreItems,function (list,keyV) {
var inDate;
var inBatchDate=moment(exBatchDate).add('30','days')
if(list.DueDate.length<=10){
inDate = new Date(list.DueDate.substring(6,10)+'-'+list.DueDate.substring(3,5)+'-'+list.DueDate.substring(0,2));
inDate = moment(inDate);
}
else{
inDate = moment(list.DueDate).add('1','days');
}
if(exBatchDate<inDate && moment(inDate).diff(exBatchDate, 'days')>30){
SweetAlert.swal({
title: "",
text: "The selected installment date is crossing the maximum allowed period. Do you want to continue (Yes/No). If yes you need to get approval from the higher authorities",
type: "info",
showCancelButton: true,
confirmButtonColor: "#eea236",confirmButtonText: "Yes",
cancelButtonText: "No",
closeOnConfirm: true,
closeOnCancel: true },
function(isConfirm) {
if (isConfirm==false) {
angular.forEach($rootScope.updateMoreItems,function (updateV,updateK) {
$rootScope.updateMoreItems[updateK].DueDate=$filter('date')(new Date(inBatchDate), 'dd-MM-yyyy');
});
$scope.rollBackFeesDetails(model,totAmt,other,type,type1);
}
})
}
});
}
}
}
$scope.dateValidations();
}
/*
* this function used to roll back the details if no
* */
/*
* calculate exist installment
* created by kms
* */
$scope.rollBackFeesDetails = function (model,totAmt,other,type,type1) {
var exBatchDate = moment($scope.BatchDate);
if(type==2 || type==1){
if($rootScope.updateMoreItems.length>0){
var existLoop=0;
var existTotAmt=0
angular.forEach($rootScope.updateMoreItems,function (item,position) {
var exDatenew1;
var exitPayAmt=parseInt(totAmt-other);
/* if(isNaN(moment($rootScope.updateMoreItems[position].DueDate))){
exDatenew1 = new Date($rootScope.updateMoreItems[position].DueDate.substring(6,10)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(3,5)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(0,2));
exDatenew1 = moment(exDatenew1);
}*/
if($rootScope.updateMoreItems[position].DueDate.length<=10){
exDatenew1 = new Date($rootScope.updateMoreItems[position].DueDate.substring(6,10)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(3,5)+'-'+$rootScope.updateMoreItems[position].DueDate.substring(0,2));
exDatenew1 = moment(exDatenew1);
}
else{
exDatenew1 = moment($rootScope.updateMoreItems[position].DueDate);
}
if (exDatenew1 <= exBatchDate) {
if(type=='1'){
$scope.setTotalAmount = Math.round(parseInt(totAmt)-parseInt(other));
// $scope.setModel.feesType.Others = Math.round(parseInt(other));
$scope.setModel.feesType.Others = '';
}
else{
if(other==0){
$scope.setModel.feesType.Others = '';
$scope.setTotalAmount = Math.round(parseInt(totAmt)-parseInt(other));
}
else{
$scope.setTotalAmount = Math.round(parseInt(totAmt)-parseInt(other));
$scope.setModel.feesType.Others = '';
}
}
var existPercentage = Math.round($scope.setTotalAmount * 70 / 100);
existPercentage = Math.round(existPercentage / 10) * 10;
exitPayAmt = parseInt($scope.setTotalAmount)-parseInt(existPercentage);
if(position==0){
$rootScope.updateMoreItems[position].Amount = existPercentage;
}
else if(position==1){
$rootScope.updateMoreItems[position].Amount = exitPayAmt;
}
if($rootScope.updateMoreItems.length>2){
angular.forEach($rootScope.updateMoreItems,function (values,key) {
if(key>=1 && $rootScope.updateMoreItems.length-1!=key){
var currentElementAmt = $rootScope.updateMoreItems[key].Amount;
var dividePrevElementAmt = Math.round(currentElementAmt * 50 / 100);
var divideNextElementAmt = parseInt(currentElementAmt)-parseInt(dividePrevElementAmt);
$rootScope.updateMoreItems[key].Amount = dividePrevElementAmt;
$rootScope.updateMoreItems[key+1].Amount = dividePrevElementAmt;
}
});
}
existTotAmt = parseInt(existTotAmt)+parseInt($rootScope.updateMoreItems[position].Amount);
}
else if(exDatenew1 > exBatchDate && existLoop==0){
exitPayAmt=parseInt(exitPayAmt)-parseInt(existTotAmt);
var dayDiff = exDatenew1.diff(exBatchDate, 'days');
dayDiff = dayDiff+1;
var todatlFineAmt = 0;
var fineAmt1 = 0;
var fineAmt11 = 0;
var countDays = 0;
for (var k = 1; k <= dayDiff; k++) {
if (k <= 90) {
if (exitPayAmt <= 10000) {
fineAmt1 = 300;
}
else if ((exitPayAmt > 10000) && (exitPayAmt <= 20000)) {
fineAmt1 = 600;
}
else if (exitPayAmt > 20000) {
fineAmt1 = 900;
}
}
else {
countDays = countDays+1;
if (countDays<30) {
if(countDays==1){
fineAmt11 = parseInt(fineAmt11)+300;
}
}
else{
countDays=0;
}
}
}
todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt11);
if(type1=='2'){
$scope.setTotalAmount = Math.round(parseInt(totAmt) -parseInt(other) + parseInt(todatlFineAmt));
$scope.setModel.feesType.Others = Math.round(parseInt(todatlFineAmt));
}
else{
$scope.setTotalAmount = Math.round(parseInt(totAmt));
if(other==0){
$scope.setModel.feesType.Others = '';
}
else{
$scope.setModel.feesType.Others = Math.round(parseInt(other));
}
}
if($rootScope.updateMoreItems[position-1]!=undefined){
existLoop=1;
exitPayAmt = parseInt($scope.setTotalAmount);
var existPercentage = Math.round(exitPayAmt * 70 / 100);
existPercentage = Math.round(existPercentage / 10) * 10;
exitPayAmt = parseInt(exitPayAmt)-parseInt(existPercentage);
$rootScope.updateMoreItems[0].Amount = existPercentage;
$rootScope.updateMoreItems[1].Amount = exitPayAmt;
if($rootScope.updateMoreItems.length>2){
angular.forEach($rootScope.updateMoreItems,function (values,key) {
if(key>=1 && $rootScope.updateMoreItems.length-1!=key){
var currentElementAmt = $rootScope.updateMoreItems[key].Amount;
var dividePrevElementAmt = Math.round(currentElementAmt * 50 / 100);
var divideNextElementAmt = parseInt(currentElementAmt)-parseInt(dividePrevElementAmt);
$rootScope.updateMoreItems[key].Amount = dividePrevElementAmt;
$rootScope.updateMoreItems[key+1].Amount = dividePrevElementAmt;
}
});
}
}
else{
existLoop=1;
exitPayAmt = parseInt($scope.setTotalAmount);
var existPercentage = Math.round(exitPayAmt * 70 / 100);
existPercentage = Math.round(existPercentage / 10) * 10;
exitPayAmt = parseInt(exitPayAmt)-parseInt(existPercentage);
$rootScope.updateMoreItems[0].Amount = existPercentage;
$rootScope.updateMoreItems[1].Amount = exitPayAmt;
if($rootScope.updateMoreItems.length>2){
angular.forEach($rootScope.updateMoreItems,function (values,key) {
if(key>=1 && $rootScope.updateMoreItems.length-1!=key){
var currentElementAmt = $rootScope.updateMoreItems[key].Amount;
var dividePrevElementAmt = Math.round(currentElementAmt * 50 / 100);
var divideNextElementAmt = parseInt(currentElementAmt)-parseInt(dividePrevElementAmt);
$rootScope.updateMoreItems[key].Amount = dividePrevElementAmt;
$rootScope.updateMoreItems[key+1].Amount = dividePrevElementAmt;
}
});
}
}
} }
}); });
} }
} }
$scope.dateValidations(); $scope.dateValidations();
} }
@ -1486,6 +2026,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
"Date":'' "Date":''
}) })
return true;
} }
@ -1529,8 +2070,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
if(pastValue==undefined || pastValue==''){ if(pastValue==undefined || pastValue==''){
pastValue=0; pastValue=0;
} }
if(currentValue!=0 && pastValue!=0){ if(parseInt(currentValue)<=parseInt($scope.setTotalAmount)){
if(parseInt(present)<=parseInt($scope.setTotalAmount)){
if(currentValue<=pastValue){ if(currentValue<=pastValue){
var diffVal1=parseInt(pastValue)-parseInt(currentValue); var diffVal1=parseInt(pastValue)-parseInt(currentValue);
@ -1565,7 +2105,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
} }
} }
} }
}
@ -1576,8 +2115,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}]); }]);
/*modal controller /*modal controller
* */ * */
app.controller('ModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $modal, $log) { app.controller('ModalDemoCtrl', ["$scope", "$modal", "$log", function ($scope, $modal, $log) {
//Tooltip for print button //Tooltip for print button
$scope.dynamicTooltip = 'Click to View Bill Details'; $scope.dynamicTooltip = 'Click to View Bill Details';

View File

@ -167,7 +167,7 @@
<input type="text" placeholder="Enter STF/WR Amount" <input type="text" placeholder="Enter STF/WR Amount"
autofocus tabindex="12" class="form-control" name="STF" id="STF" ng-maxlength="9" autofocus tabindex="12" class="form-control" name="STF" id="STF" ng-maxlength="9"
ng-model="setModel.feesType.STFOrWR" ng-pattern="/^[0-9]*$/" ng-change="setFeesTotalAmount(setModel.feesType,'2','2');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'"/> ng-model="setModel.feesType.STFOrWR" ng-pattern="/^[0-9]*$/" ng-change="setFeesTotalAmount(setModel.feesType,'2','2','2');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'"/>
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.STF.$dirty && Form.STF.$invalid" ng-if="Form.STF.$dirty && Form.STF.$invalid"
ng-hide="Form.STF.$error.maxlength || Form.STF.$error.pattern">STF/WR amount is required</span> ng-hide="Form.STF.$error.maxlength || Form.STF.$error.pattern">STF/WR amount is required</span>
@ -183,7 +183,7 @@
<input type="text" placeholder="Enter Other Amount" <input type="text" placeholder="Enter Other Amount"
autofocus tabindex="13" class="form-control" name="others" id="others" ng-maxlength="9" autofocus tabindex="13" class="form-control" name="others" id="others" ng-maxlength="9"
ng-model="setModel.feesType.Others" ng-pattern="/^[0-9]*$/" ng-change="setFeesTotalAmount(setModel.feesType,'2','1');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" readonly/> ng-model="setModel.feesType.Others" ng-pattern="/^[0-9]*$/" ng-change="setFeesTotalAmount(setModel.feesType,'2','1','2');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" readonly/>
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.others.$dirty && Form.others.$invalid" ng-if="Form.others.$dirty && Form.others.$invalid"
ng-hide="Form.others.$error.maxlength || Form.others.$error.pattern">Others amount is required</span> ng-hide="Form.others.$error.maxlength || Form.others.$error.pattern">Others amount is required</span>
@ -207,7 +207,7 @@
ng-if="Form.paid.$error.maxlength || Form.paid.$error.pattern">Enter a valid amount</span> ng-if="Form.paid.$error.maxlength || Form.paid.$error.pattern">Enter a valid amount</span>
</div>--> </div>-->
<div class="col-md-3 form-group" ng-if="setModel.feesType.ProgramType!='P001' && setModel.feesType.ProgramType!='P002'" <!-- <div class="col-md-3 form-group" ng-if="setModel.feesType.ProgramType!='P001' && setModel.feesType.ProgramType!='P002'"
ng-class="{'has-error':Form.waiver.$dirty && Form.waiver.$invalid}"> ng-class="{'has-error':Form.waiver.$dirty && Form.waiver.$invalid}">
<label> <label>
Waiver</span> Waiver</span>
@ -222,11 +222,27 @@
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.waiver.$error.maxlength || Form.waiver.$error.pattern">Enter a valid amount</span> ng-if="Form.waiver.$error.maxlength || Form.waiver.$error.pattern">Enter a valid amount</span>
</div>-->
<div class="col-md-3 form-group" ng-if="setModel.feesType.ProgramType!='P001' && setModel.feesType.ProgramType!='P002'"
ng-class="{'has-error':Form.total.$dirty && Form.total.$invalid}">
<label>
Total Fees</span>
</label>
<input type="text" placeholder="Enter Total Amount"
autofocus tabindex="15" class="form-control" name="total" id="total" ng-maxlength="9"
ng-model="setTotalAmount" ng-pattern="/^[0-9]*$/" readonly/>
<span class="error text-small block"
ng-if="Form.total.$dirty && Form.total.$invalid"
ng-hide="Form.total.$error.maxlength || Form.total.$error.pattern">Total amount is required</span>
<span class="error text-small block"
ng-if="Form.total.$error.maxlength || Form.total.$error.pattern">Enter a valid amount</span>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3 form-group" ng-if="setModel.feesType.ProgramType=='P001' || setModel.feesType.ProgramType=='P002'" <!--<div class="col-md-3 form-group" ng-if="setModel.feesType.ProgramType=='P001' || setModel.feesType.ProgramType=='P002'"
ng-class="{'has-error':Form.waiver.$dirty && Form.waiver.$invalid}"> ng-class="{'has-error':Form.waiver.$dirty && Form.waiver.$invalid}">
<label> <label>
Waiver</span> Waiver</span>
@ -241,8 +257,8 @@
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.waiver.$error.maxlength || Form.waiver.$error.pattern">Enter a valid amount</span> ng-if="Form.waiver.$error.maxlength || Form.waiver.$error.pattern">Enter a valid amount</span>
</div> </div>-->
<div class="col-md-3 form-group" <div class="col-md-3 form-group" ng-if="setModel.feesType.ProgramType=='P001' || setModel.feesType.ProgramType=='P002'"
ng-class="{'has-error':Form.total.$dirty && Form.total.$invalid}"> ng-class="{'has-error':Form.total.$dirty && Form.total.$invalid}">
<label> <label>
Total Fees</span> Total Fees</span>
@ -334,7 +350,7 @@
placeholder="Select Date" placeholder="Select Date"
min-date="getDateArray[$index].Date" min-date="getDateArray[$index].Date"
max-date="getDateArray[$index+2].Date" max-date="getDateArray[$index+2].Date"
close-text="Close" ng-change="setFeesTotalAmount(setModel.feesType,'2','2');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" ng-readonly="true" required="required"/> close-text="Close" ng-change="setFeesTotalAmount(setModel.feesType,'2','2','1');" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" ng-readonly="true" required="required"/>
<span class="error text-small block" <span class="error text-small block"
ng-if="n.DueDate==undefined">Date is required.</span> ng-if="n.DueDate==undefined">Date is required.</span>
<!--<span class="success text-small block"--> <!--<span class="success text-small block"-->
@ -351,70 +367,6 @@
</div> </div>
<!--<div class="row">
&lt;!&ndash;<div class="col-md-3 form-group"
ng-class="{'has-error':Form.insName.$dirty && Form.insName.$invalid,'has-success':Form.insName.$valid}">
<label>
Installment <span
class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Installment"
tabindex="14" class="form-control" name="insName"
ng-model="myModelInstallemt.name" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'"/>
<span class="error text-small block"
ng-if="Form.insName.$dirty && Form.insName.$error.required">Installment is required</span>
<span class="error text-small block"
ng-if="Form.insName.$dirty && Form.insName.$error.pattern">Enter a valid installment</span>
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.instfeesAmount.$dirty && Form.instfeesAmount.$invalid, 'has-success':Form.instfeesAmount.$valid}">
<label>
Amount <span
class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Amount"
autofocus tabindex="15" class="form-control" name="instfeesAmount" id="instfeesAmount" ng-maxlength="8"
ng-model="myModelInstallemt.amount" ng-pattern="/^[0-9]*$/" required="" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'"/>
<span class="error text-small block"
ng-if="Form.instfeesAmount.$dirty && Form.instfeesAmount.$invalid"
ng-hide="Form.instfeesAmount.$error.maxlength || Form.instfeesAmount.$error.pattern">Amount is required</span>
<span class="error text-small block"
ng-if="Form.instfeesAmount.$error.maxlength || Form.instfeesAmount.$error.pattern">Enter a valid amount</span>
</div>
<div data-ng-controller="DatepickerDemoCtrl">
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.date.$dirty && Form.date.$invalid, 'has-success':Form.date.$valid}">
<label>
Due Date <span
class="symbol required"></span>
</label>
<input type="text"
class="form-control " tabindex="16"
ng-click="startOpen = !startOpen"
datepicker-popup="dd-MM-yyyy"
ng-model="myModelInstallemt.date"
is-open="startOpen"
ng-init="startOpen = false"
name="date"
datepicker-options="dateOptions"
placeholder="Select Date"
max-date="futureDate"
close-text="Close" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'" required="required"/>
<span class="error text-small block"
ng-if="Form.date.$dirty && Form.date.$error.required">Date is required.</span>
&lt;!&ndash;<span class="success text-small block"&ndash;&gt;
&lt;!&ndash;ng-if="Form.date.$valid ">Thank You</span>&ndash;&gt;
</div>
</div>&ndash;&gt;
<div class="col-md-3">
<input type="button" class="btn btn-sm btn-info" title="Click to add one more items" value="Add More" ng-click="clickMoreItems(Form,setModel.feesType);" style="margin-top:16%;" ng-disabled="setModel.feesType.ExistValue=='1' && userType=='R002'"/>
</div>
</div>-->
</div> </div>
@ -459,7 +411,7 @@
<th>Course Fees</th> <th>Course Fees</th>
<th>STF/WR</th> <th>STF/WR</th>
<th>Others</th> <th>Others</th>
<th>Waiver</th> <!-- <th>Waiver</th>-->
<th>Payable Fees</th> <th>Payable Fees</th>
</tr> </tr>
@ -473,7 +425,7 @@
<td>{{p.ActualFees}}</td> <td>{{p.ActualFees}}</td>
<td>{{p.STFOrWR}}</td> <td>{{p.STFOrWR}}</td>
<td>{{p.Others}}</td> <td>{{p.Others}}</td>
<td>{{p.Waiver}}</td> <!-- <td>{{p.Waiver}}</td>-->
<td>{{p.PayableFees}}</td> <td>{{p.PayableFees}}</td>
</tr> </tr>

View File

@ -66,6 +66,9 @@
<label ng-if="updateModel.feesType.ProgramType=='Y001'"> <label ng-if="updateModel.feesType.ProgramType=='Y001'">
Session <span class="symbol required"></span> Session <span class="symbol required"></span>
</label> </label>
<label ng-if="updateModel.feesType.ProgramType!='Y001' && updateModel.feesType.ProgramType!='P001' && updateModel.feesType.ProgramType!='P002'">
Session <!--<span class="symbol required"></span>-->
</label>
<input type="text" placeholder="Enter Session Name" <input type="text" placeholder="Enter Session Name"
tabindex="8" class="form-control" name="sessionname" tabindex="8" class="form-control" name="sessionname"
@ -158,7 +161,7 @@
ng-if="Form.others.$error.maxlength || Form.others.$error.pattern">Enter a valid amount</span> ng-if="Form.others.$error.maxlength || Form.others.$error.pattern">Enter a valid amount</span>
</div> </div>
<div class="col-md-3 form-group" <!--<div class="col-md-3 form-group"
ng-class="{'has-error':Form.waiver.$dirty && Form.waiver.$invalid}"> ng-class="{'has-error':Form.waiver.$dirty && Form.waiver.$invalid}">
<label> <label>
Waiver</span> Waiver</span>
@ -173,7 +176,7 @@
<span class="error text-small block" <span class="error text-small block"
ng-if="Form.waiver.$error.maxlength || Form.waiver.$error.pattern">Enter a valid amount</span> ng-if="Form.waiver.$error.maxlength || Form.waiver.$error.pattern">Enter a valid amount</span>
</div> </div>-->
<div class="col-md-3 form-group" <div class="col-md-3 form-group"
ng-class="{'has-error':Form.total.$dirty && Form.total.$invalid}"> ng-class="{'has-error':Form.total.$dirty && Form.total.$invalid}">
<label> <label>
@ -425,7 +428,7 @@
<th>Course Fees</th> <th>Course Fees</th>
<th>STF/WR</th> <th>STF/WR</th>
<th>Others</th> <th>Others</th>
<th>Waiver</th> <!-- <th>Waiver</th>-->
<th>Payable Fees</th> <th>Payable Fees</th>
<th>Paid</th> <th>Paid</th>
<th>Balance</th> <th>Balance</th>
@ -446,7 +449,7 @@
<td>{{p.CourseFees}}</td> <td>{{p.CourseFees}}</td>
<td>{{p.STFOrWR}}</td> <td>{{p.STFOrWR}}</td>
<td>{{p.Others}}</td> <td>{{p.Others}}</td>
<td>{{p.Waiver}}</td> <!--<td>{{p.Waiver}}</td>-->
<td>{{p.PayableAmount}}</td> <td>{{p.PayableAmount}}</td>
<td>{{p.PaidBillAmount}}</td> <td>{{p.PaidBillAmount}}</td>
<td>{{p.BalanceAmount}}</td> <td>{{p.BalanceAmount}}</td>

View File

@ -13,6 +13,11 @@
padding-bottom: 30px; padding-bottom: 30px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.ti-plus:before {
color: #006f95;
}
</style> </style>
<!-- start: UI BOOTSTRAP MODALS --> <!-- start: UI BOOTSTRAP MODALS -->
<div class="container-fluid container-fullw bg-white"> <div class="container-fluid container-fullw bg-white">

View File

@ -212,21 +212,21 @@
</a> </a>
</div> </div>
</div> </div>
<div class="col-xs-5 text-center no-padding"> <div class="col-xs-6 text-center no-padding">
<a class="text-blue"> <a class="text-blue">
Course &nbsp;:&nbsp;{{course.CourseName}} Course &nbsp;:&nbsp;{{course.CourseName}}
</a> </a>
</div> </div>
<div class="col-xs-3 text-center no-padding"> <div class="col-xs-6 text-center no-padding">
<a class="text-blue"> <a class="text-blue">
Enrollment ID &nbsp;:&nbsp;{{course.EnrollmentID}} Enrollment ID &nbsp;:&nbsp;{{course.EnrollmentID}}
</a> </a>
</div> </div>
<div class="col-xs-4 text-center no-padding"> <!-- <div class="col-xs-4 text-center no-padding">
<a class="text-blue"> <a class="text-blue">
Session &nbsp;:&nbsp;{{course.SessionName}} Session &nbsp;:&nbsp;{{course.SessionName}}
</a> </a>
</div> </div>-->
</div> </div>