Merge branch 'master' of https://bitbucket.org/venbainformationtechnology/apollodec
This commit is contained in:
commit
3e82e7ab1d
@ -39,7 +39,7 @@ class Fees_Status_Controller extends REST_Controller {
|
||||
$this->methods['getUniversityCourseForFees_post']['limit'] = 1000; // 1000 requests per hour per user/key
|
||||
$this->methods['getFeesStructureAssign_post']['limit'] = 1000; // 1000 requests per hour per user/key
|
||||
$this->methods['setFeesForStudent_post']['limit'] = 1000; // 1000 requests per hour per user/key
|
||||
$this->methods['sendStudentNotification_post']['limit'] = 2000; // 2000 requests per hour per user/key
|
||||
// $this->methods['sendStudentNotification_post']['limit'] = 2000; // 2000 requests per hour per user/key
|
||||
|
||||
|
||||
// load the model
|
||||
@ -55,14 +55,14 @@ class Fees_Status_Controller extends REST_Controller {
|
||||
* */
|
||||
public function getStudentList_post()
|
||||
{
|
||||
$search['requestedBy'] = $this->post('requestedtBy');
|
||||
$search['Firstname'] = $this->post('studentName');
|
||||
$search['MobileNumber'] = $this->post('mobileNumber');
|
||||
$search['UniversityID'] = $this->post('university');
|
||||
$search['CourseID'] = $this->post('course');
|
||||
$search['requestedDept'] = $this->post('requestedDept');
|
||||
$search['requestedBy'] = $this->post('requestedtBy');
|
||||
$search['Firstname'] = $this->post('studentName');
|
||||
$search['MobileNumber'] = $this->post('mobileNumber');
|
||||
$search['UniversityID'] = $this->post('university');
|
||||
$search['CourseID'] = $this->post('course');
|
||||
$search['requestedDept'] = $this->post('requestedDept');
|
||||
$search['requestedBranch'] = $this->post('branchId');
|
||||
$getStudentDetails = $this->Fees_model->getStudentList($search);
|
||||
$getStudentDetails = $this->Fees_model->getStudentList($search);
|
||||
if ($getStudentDetails)
|
||||
{
|
||||
$getStudentDetails['status'] = REST_Controller::HTTP_OK;
|
||||
@ -121,15 +121,15 @@ class Fees_Status_Controller extends REST_Controller {
|
||||
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
|
||||
/*for track purpose*/
|
||||
|
||||
/* $trackDetails['MobileNumber'] = $this->post('mobileNumber');
|
||||
$trackDetails['LeadName'] = $this->post('studentName');
|
||||
$trackDetails['University'] = $this->post('university');
|
||||
$trackDetails['Course'] = $this->post('course');
|
||||
$trackDetails['StatusCode'] = $this->post('statusCode');
|
||||
$trackDetails['FollowupOn'] = $now->format('d-m-Y');
|
||||
$trackDetails['FollowupComments'] = $this->post('commentsForStudent');
|
||||
$trackDetails['CreatedBy'] = $this->post('createdBy');
|
||||
$trackDetails['CreatedOn'] = $now->format('Y-m-d H:i:s');*/
|
||||
/* $trackDetails['MobileNumber'] = $this->post('mobileNumber');
|
||||
$trackDetails['LeadName'] = $this->post('studentName');
|
||||
$trackDetails['University'] = $this->post('university');
|
||||
$trackDetails['Course'] = $this->post('course');
|
||||
$trackDetails['StatusCode'] = $this->post('statusCode');
|
||||
$trackDetails['FollowupOn'] = $now->format('d-m-Y');
|
||||
$trackDetails['FollowupComments'] = $this->post('commentsForStudent');
|
||||
$trackDetails['CreatedBy'] = $this->post('createdBy');
|
||||
$trackDetails['CreatedOn'] = $now->format('Y-m-d H:i:s');*/
|
||||
|
||||
/*track array end*/
|
||||
|
||||
@ -266,24 +266,25 @@ class Fees_Status_Controller extends REST_Controller {
|
||||
* send notification for student
|
||||
* created by kms
|
||||
* */
|
||||
public function sendStudentNotification_post(){
|
||||
public function sendStudentNotification_get(){
|
||||
|
||||
$sendMessage = $this->Fees_model->studentNotification();
|
||||
|
||||
if ($sendMessage)
|
||||
{
|
||||
$this->response([
|
||||
'message' => 'Done!',
|
||||
'status' => REST_Controller::HTTP_OK
|
||||
], REST_Controller::HTTP_OK); // NOT_FOUND (404) being the HTTP response code
|
||||
echo "Success";
|
||||
/* $this->response([
|
||||
'message' => 'Done!',
|
||||
'status' => REST_Controller::HTTP_OK
|
||||
], REST_Controller::HTTP_OK); // NOT_FOUND (404) being the HTTP response code*/
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No records found!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
/* $this->response([
|
||||
'message' => 'No records found!',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -898,15 +898,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
var dayDiff = moment().diff(bDate, 'days');
|
||||
var todatlFineAmt = 0;
|
||||
var fineAmt1 = 0;
|
||||
// var fineAmt2 = 0;
|
||||
// var fineAmt3 = 0;
|
||||
// var fineAmt4 = 0;
|
||||
// var fineAmt5 = 0;
|
||||
// var fineAmt6 = 0;
|
||||
// var fineAmt7 = 0;
|
||||
// var fineAmt8 = 0;
|
||||
// var fineAmt9 = 0;
|
||||
// var fineAmt10 = 0;
|
||||
var fineAmt11 = 0;
|
||||
var countDays = 0;
|
||||
for (var k = 1; k <= dayDiff; k++) {
|
||||
@ -939,50 +930,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
|
||||
}
|
||||
}
|
||||
/*else if (k > 90) {
|
||||
if (k > 90 && k <= 120) {
|
||||
fineAmt2 = 300;
|
||||
|
||||
}
|
||||
else if (k > 120 && k <= 150) {
|
||||
fineAmt3 = 300;
|
||||
|
||||
}
|
||||
else if (k > 150 && k <= 180) {
|
||||
fineAmt4 = 300;
|
||||
|
||||
}
|
||||
else if (k > 180 && k <= 210) {
|
||||
fineAmt5 = 300;
|
||||
|
||||
}
|
||||
else if (k > 210 && k <= 240) {
|
||||
fineAmt6 = 300;
|
||||
|
||||
}
|
||||
else if (k > 240 && k <= 270) {
|
||||
fineAmt7 = 300;
|
||||
|
||||
}
|
||||
else if (k > 270 && k <= 300) {
|
||||
fineAmt8 = 300;
|
||||
|
||||
}
|
||||
else if (k > 300 && k <= 330) {
|
||||
fineAmt9 = 300;
|
||||
|
||||
}
|
||||
else if (k > 330 && k <= 360) {
|
||||
fineAmt10 = 300;
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
fineAmt11 = 300;
|
||||
}
|
||||
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
// todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
|
||||
@ -1056,6 +1003,187 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
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 exDatenew2;
|
||||
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);
|
||||
|
||||
}
|
||||
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 > 30000) {
|
||||
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;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
/* //start
|
||||
|
||||
var exDatenew1;
|
||||
var exDatenew2;
|
||||
var exitPayAmt=parseInt(totAmt-other);
|
||||
@ -1158,7 +1286,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
|
||||
}
|
||||
}
|
||||
/* else if (k > 90) {
|
||||
/!* else if (k > 90) {
|
||||
if (k > 90 && k <= 120) {
|
||||
fineAmt2 = 300;
|
||||
|
||||
@ -1214,7 +1342,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
}
|
||||
|
||||
|
||||
}*/
|
||||
}*!/
|
||||
|
||||
}
|
||||
// todatlFineAmt = parseInt(fineAmt1) + parseInt(fineAmt2) + parseInt(fineAmt3) + parseInt(fineAmt4) + parseInt(fineAmt5) + parseInt(fineAmt6) + parseInt(fineAmt7) + parseInt(fineAmt8) + parseInt(fineAmt9) + parseInt(fineAmt10) + parseInt(fineAmt11);
|
||||
@ -1257,6 +1385,9 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// end*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user