mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 15:56:48 +00:00
Merge pull request #259 from satish-conflux/RM_1083_dev
Loan Application Bug and Enhancement
This commit is contained in:
commit
7ea3a4245c
@ -32,7 +32,8 @@
|
||||
"interestChargedFromDate": true,
|
||||
"displayName": true,
|
||||
"interestRatePerPeriod": true,
|
||||
"loanPurposeId": true
|
||||
"loanPurposeId": true,
|
||||
"syncRepaymentsWithMeeting" : true
|
||||
},
|
||||
"isAutoPopulate":{
|
||||
"interestChargedFromDate": true
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
scope.formRequestData.approvedOnDate = dateFilter(new Date(scope.restrictDate), scope.df);
|
||||
|
||||
scope.charges = [];
|
||||
scope.existingCharges = [];
|
||||
var curIndex = 0;
|
||||
|
||||
resourceFactory.loanApplicationReferencesResource.getByLoanAppId({loanApplicationReferenceId: scope.loanApplicationReferenceId}, function (applicationData) {
|
||||
@ -45,6 +46,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.copy(scope.charges,scope.existingCharges);
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -276,7 +278,7 @@
|
||||
this.formValidationData.calendarId = scope.loanaccountinfo.calendarOptions[0].id;
|
||||
scope.syncRepaymentsWithMeeting = this.formValidationData.syncRepaymentsWithMeeting;
|
||||
}
|
||||
delete this.formValidationData.syncRepaymentsWithMeeting;
|
||||
//delete this.formValidationData.syncRepaymentsWithMeeting;
|
||||
|
||||
if (scope.formRequestData.expectedDisbursementDate) {
|
||||
this.formValidationData.interestChargedFromDate = reqThirdDate;
|
||||
@ -316,8 +318,11 @@
|
||||
|
||||
this.formValidationData.locale = scope.optlang.code;
|
||||
this.formValidationData.dateFormat = scope.df;
|
||||
scope.calculateLoanScheduleData = {};
|
||||
angular.copy(scope.formValidationData,scope.calculateLoanScheduleData);
|
||||
delete scope.calculateLoanScheduleData.syncRepaymentsWithMeeting;
|
||||
if (isDisplayData) {
|
||||
resourceFactory.loanResource.save({command: 'calculateLoanSchedule'}, this.formValidationData, function (data) {
|
||||
resourceFactory.loanResource.save({command: 'calculateLoanSchedule'}, scope.calculateLoanScheduleData, function (data) {
|
||||
scope.repaymentscheduleinfo = data;
|
||||
scope.formValidationData.syncRepaymentsWithMeeting = scope.syncRepaymentsWithMeeting;
|
||||
});
|
||||
@ -353,6 +358,11 @@
|
||||
}
|
||||
|
||||
scope.submitData = {};
|
||||
scope.submitData.formValidationData = {};
|
||||
angular.copy(scope.formValidationData,scope.submitData.formValidationData);
|
||||
if(scope.submitData.formValidationData.syncRepaymentsWithMeeting){
|
||||
delete scope.submitData.formValidationData.syncRepaymentsWithMeeting;
|
||||
}
|
||||
scope.submitData.formValidationData = scope.formValidationData;
|
||||
scope.submitData.formRequestData = scope.formRequestData;
|
||||
/**
|
||||
|
||||
@ -223,11 +223,13 @@
|
||||
if (scope.charges.length > 0) {
|
||||
scope.formRequestData.submitApplication.charges = [];
|
||||
for (var i in scope.charges) {
|
||||
scope.formRequestData.submitApplication.charges.push({
|
||||
chargeId: scope.charges[i].chargeId,
|
||||
amount: scope.charges[i].amount,
|
||||
dueDate: dateFilter(scope.charges[i].dueDate, scope.df)
|
||||
});
|
||||
var chargeData = {};
|
||||
chargeData.chargeId = scope.charges[i].chargeId;
|
||||
chargeData.amount = scope.charges[i].amount;
|
||||
if(scope.charges[i].dueDate){
|
||||
chargeData.dueDate = dateFilter(new Date(scope.charges[i].dueDate), scope.df);
|
||||
}
|
||||
scope.formRequestData.submitApplication.charges.push(chargeData);
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,7 +241,7 @@
|
||||
delete this.formRequestData.submitApplication.calendarId;
|
||||
}
|
||||
}
|
||||
delete this.formRequestData.submitApplication.syncRepaymentsWithMeeting;
|
||||
// delete this.formRequestData.submitApplication.syncRepaymentsWithMeeting;
|
||||
|
||||
if (this.date.interestChargedFromDate) {
|
||||
this.formRequestData.submitApplication.interestChargedFromDate = this.date.interestChargedFromDate;
|
||||
@ -262,6 +264,7 @@
|
||||
}
|
||||
|
||||
scope.formRequestPreveieData = angular.copy(scope.formRequestData.submitApplication);
|
||||
delete scope.formRequestPreveieData.syncRepaymentsWithMeeting;
|
||||
if (scope.formRequestData.disburse.actualDisbursementDate) {
|
||||
scope.formRequestPreveieData.expectedDisbursementDate = dateFilter(new Date(scope.formRequestData.disburse.actualDisbursementDate), scope.df);
|
||||
} else {
|
||||
@ -289,14 +292,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isDisplayData){
|
||||
resourceFactory.loanResource.save({command: 'calculateLoanSchedule'}, scope.formRequestPreveieData, function (data) {
|
||||
scope.repaymentscheduleinfo = data;
|
||||
scope.formRequestData.submitApplication.syncRepaymentsWithMeeting = scope.syncRepaymentsWithMeeting;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scope.submit = function () {
|
||||
@ -304,11 +305,13 @@
|
||||
if (scope.charges.length > 0) {
|
||||
scope.formRequestData.submitApplication.charges = [];
|
||||
for (var i in scope.charges) {
|
||||
scope.formRequestData.submitApplication.charges.push({
|
||||
chargeId: scope.charges[i].chargeId,
|
||||
amount: scope.charges[i].amount,
|
||||
dueDate: dateFilter(scope.charges[i].dueDate, scope.df)
|
||||
});
|
||||
var chargeData = {};
|
||||
chargeData.chargeId = scope.charges[i].chargeId;
|
||||
chargeData.amount = scope.charges[i].amount;
|
||||
if(scope.charges[i].dueDate){
|
||||
chargeData.dueDate = dateFilter(new Date(scope.charges[i].dueDate), scope.df);
|
||||
}
|
||||
scope.formRequestData.submitApplication.charges.push(chargeData);
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,7 +326,7 @@
|
||||
if (this.formRequestData.submitApplication.syncRepaymentsWithMeeting) {
|
||||
this.formRequestData.submitApplication.calendarId = scope.loanaccountinfo.calendarOptions[0].id;
|
||||
}
|
||||
delete this.formRequestData.submitApplication.syncRepaymentsWithMeeting;
|
||||
//delete this.formRequestData.submitApplication.syncRepaymentsWithMeeting;
|
||||
|
||||
if (scope.date.interestChargedFromDate) {
|
||||
this.formRequestData.submitApplication.interestChargedFromDate = dateFilter(new Date(scope.date.interestChargedFromDate), scope.df);
|
||||
@ -362,6 +365,9 @@
|
||||
this.formRequestData.locale = scope.optlang.code;
|
||||
this.formRequestData.dateFormat = scope.df;
|
||||
|
||||
scope.disburseData = {};
|
||||
angular.copy(scope.formRequestData,scope.disburseData);
|
||||
delete scope.disburseData.submitApplication.syncRepaymentsWithMeeting;
|
||||
resourceFactory.loanApplicationReferencesResource.update({
|
||||
loanApplicationReferenceId: scope.loanApplicationReferenceId,
|
||||
command: 'disburse'
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<button ng-click="printDiv('print');">Print Div</button>
|
||||
<button ng-click="printDiv('print');" ng-hide="true">Print Div</button>
|
||||
|
||||
<span><a ng-hide="report"><i class="icon-circle-arrow-left">{{'label.anchor.backtoloaninfo'
|
||||
| translate}}</i></a><br><br></span>
|
||||
@ -271,8 +271,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div ng-if="charges.length > 0">
|
||||
<table width="width100">
|
||||
<div ng-if="existingCharges.length > 0">
|
||||
<table class="width100">
|
||||
<tr class="bottomborder">
|
||||
<td colspan="4"><strong>{{'label.heading.charges' | translate}}</strong></td>
|
||||
</tr>
|
||||
@ -282,7 +282,7 @@
|
||||
<td>{{'label.heading.amount' | translate}}</td>
|
||||
<td>{{'label.heading.collectedon' | translate}}</td>
|
||||
</tr>
|
||||
<tr ng-repeat="charge in charges" ng-hide="charge.penalty">
|
||||
<tr ng-repeat="charge in existingCharges">
|
||||
<td>{{charge.name}}</td>
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
<td>{{charge.amount|number}}</td>
|
||||
@ -484,7 +484,7 @@
|
||||
<tr ng-repeat="calendar in loanaccountinfo.calendarOptions">
|
||||
<td align="center"><input type="checkbox"
|
||||
ng-model="formValidationData.syncRepaymentsWithMeeting"
|
||||
ng-change="syncRepaymentsWithMeetingchange()">
|
||||
ng-change="syncRepaymentsWithMeetingchange()" ng-disabled="response.uiDisplayConfigurations.loanAccount.isReadOnlyField.syncRepaymentsWithMeeting">
|
||||
</td>
|
||||
<td><label>{{ 'label.input.syncrepaymentswithmeeting' | translate }}</label>
|
||||
</td>
|
||||
|
||||
@ -271,8 +271,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div ng-if="charges.length > 0">
|
||||
<table width="width100">
|
||||
<div ng-if="charges.length > 0" ng-hide="formData.status.id > 200">
|
||||
<table class="width100">
|
||||
<tr class="bottomborder">
|
||||
<td colspan="4"><strong>{{'label.heading.charges' | translate}}</strong></td>
|
||||
</tr>
|
||||
@ -282,7 +282,7 @@
|
||||
<td>{{'label.heading.amount' | translate}}</td>
|
||||
<td>{{'label.heading.collectedon' | translate}}</td>
|
||||
</tr>
|
||||
<tr ng-repeat="charge in charges" ng-hide="charge.penalty">
|
||||
<tr ng-repeat="charge in charges">
|
||||
<td>{{charge.name}}</td>
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
<td>{{charge.amount|number}}</td>
|
||||
@ -376,8 +376,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div ng-if="formData.approvedData.loanApplicationSanctionTrancheDatas.length > 0">
|
||||
<table width="width100">
|
||||
<div width="width100" ng-if="formData.approvedData.loanApplicationSanctionTrancheDatas.length > 0">
|
||||
<table class="width100">
|
||||
<tr class="bottomborder">
|
||||
<td colspan="4"><strong>{{'label.heading.tranche' | translate}}</strong>
|
||||
</td>
|
||||
@ -402,8 +402,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div ng-if="charges.length > 0">
|
||||
<table width="width100">
|
||||
<div width="width100" ng-if="charges.length > 0">
|
||||
<table class="width100">
|
||||
<tr class="bottomborder">
|
||||
<td colspan="4"><strong>{{'label.heading.charges' | translate}}</strong>
|
||||
</td>
|
||||
@ -414,7 +414,7 @@
|
||||
<td>{{'label.heading.amount' | translate}}</td>
|
||||
<td>{{'label.heading.collectedon' | translate}}</td>
|
||||
</tr>
|
||||
<tr ng-repeat="charge in charges" ng-hide="charge.penalty">
|
||||
<tr ng-repeat="charge in charges">
|
||||
<td>{{charge.name}}</td>
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
<td>{{charge.amount|number}}</td>
|
||||
@ -445,10 +445,11 @@
|
||||
{{calendar.humanReadable}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr ng-repeat="calendar in loanaccountinfo.calendarOptions">
|
||||
<td align="center"><input type="checkbox"
|
||||
ng-model="formRequestData.submitApplication.syncRepaymentsWithMeeting"
|
||||
ng-change="syncRepaymentsWithMeetingchange()">
|
||||
ng-change="syncRepaymentsWithMeetingchange()" ng-disabled="response.uiDisplayConfigurations.loanAccount.isReadOnlyField.syncRepaymentsWithMeeting">
|
||||
</td>
|
||||
<td><label>{{ 'label.input.syncrepaymentswithmeeting' | translate }}</label>
|
||||
</td>
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
</span>
|
||||
<span ng-if="formData.status.id === 100">
|
||||
<a class="btn btn-primary" data-ng-click="requestApprovalLoanAppRef()"
|
||||
has-permission='REQUEST_APPROVAL_LOANAPPLICATIONREFERENCE'><i
|
||||
has-permission='REQUESTFORAPPROVAL_LOANAPPLICATIONREFERENCE'><i
|
||||
class="icon-ok-sign icon-white"></i>{{'label.button.request.approval' | translate}}</a>
|
||||
</span>
|
||||
<span ng-if="formData.status.id === 200">
|
||||
@ -114,8 +114,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div ng-if="charges.length > 0">
|
||||
<table width="width100">
|
||||
<div ng-hide="formData.status.id > 200" ng-if="charges.length > 0">
|
||||
<table class="width100">
|
||||
<tr class="bottomborder">
|
||||
<td colspan="4"><strong>{{'label.heading.charges' | translate}}</strong></td>
|
||||
</tr>
|
||||
@ -125,7 +125,7 @@
|
||||
<td>{{'label.heading.amount' | translate}}</td>
|
||||
<td>{{'label.heading.collectedon' | translate}}</td>
|
||||
</tr>
|
||||
<tr ng-repeat="charge in charges" ng-hide="charge.penalty">
|
||||
<tr ng-repeat="charge in charges">
|
||||
<td>{{charge.name}}</td>
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
<td>{{charge.amount|number}}</td>
|
||||
@ -212,7 +212,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div ng-if="formData.approvedData.loanApplicationSanctionTrancheDatas.length > 0">
|
||||
<table width="width100">
|
||||
<table class="width100">
|
||||
<tr class="bottomborder">
|
||||
<td colspan="4"><strong>{{'label.heading.tranche' | translate}}</strong></td>
|
||||
</tr>
|
||||
@ -232,7 +232,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div ng-if="charges.length > 0">
|
||||
<table width="width100">
|
||||
<table class="width100">
|
||||
<tr class="bottomborder">
|
||||
<td colspan="4"><strong>{{'label.heading.charges' | translate}}</strong></td>
|
||||
</tr>
|
||||
@ -242,7 +242,7 @@
|
||||
<td>{{'label.heading.amount' | translate}}</td>
|
||||
<td>{{'label.heading.collectedon' | translate}}</td>
|
||||
</tr>
|
||||
<tr ng-repeat="charge in charges" ng-hide="charge.penalty">
|
||||
<tr ng-repeat="charge in charges">
|
||||
<td>{{charge.name}}</td>
|
||||
<td>{{charge.chargeCalculationType.value}}</td>
|
||||
<td>{{charge.amount|number}}</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user