mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 11:26:51 +00:00
1926: Added Preview with future tranches
This commit is contained in:
parent
c580b81dde
commit
ffc3fee65a
@ -1677,6 +1677,7 @@
|
||||
"label.button.Guarantor": "Guarantor",
|
||||
"label.button.undodisbursal": "Undo Disbursal",
|
||||
"label.button.undolastdisbursal": "Undo Last Disbursal",
|
||||
"label.button.schedulepreview": "Preview Schedule",
|
||||
"label.button.makerepayment": "Make Repayment",
|
||||
"label.button.waiveinterest": "Waive Interest",
|
||||
"label.button.writeoff": "Write-Off",
|
||||
|
||||
@ -119,6 +119,9 @@
|
||||
case "undolastdisbursal":
|
||||
location.path('/loanaccount/' + accountId + '/undolastdisbursal');
|
||||
break;
|
||||
case "schedulepreview":
|
||||
scope.previewSchedule();
|
||||
break;
|
||||
case "addsubsidy":
|
||||
location.path('/loanaccount/' + accountId + '/addsubsidy');
|
||||
break;
|
||||
@ -367,6 +370,10 @@
|
||||
name: "button.loanscreenreport",
|
||||
taskPermissionName: 'READ_LOAN'
|
||||
},
|
||||
{
|
||||
name: "button.schedulepreview",
|
||||
taskPermissionName: 'READ_LOAN'
|
||||
},
|
||||
{
|
||||
name: "button.listguarantor",
|
||||
taskPermissionName: 'READ_GUARANTOR'
|
||||
@ -844,6 +851,25 @@
|
||||
return false;
|
||||
};
|
||||
|
||||
scope.previewSchedule = function () {
|
||||
$modal.open({
|
||||
templateUrl: 'showschedule.html',
|
||||
controller: PreviewScheduleCtrl,
|
||||
windowClass: 'app-modal-window'
|
||||
});
|
||||
};
|
||||
|
||||
var PreviewScheduleCtrl = function ($scope, $modalInstance) {
|
||||
$scope.loandetails = scope.loandetails;
|
||||
resourceFactory.loanResource.get({loanId: routeParams.id, resourceType: 'schedulepreview'}, function (data) {
|
||||
$scope.repaymentscheduleinfo = data;
|
||||
});
|
||||
|
||||
$scope.cancel = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
};
|
||||
|
||||
/***
|
||||
* we are using orderBy(https://docs.angularjs.org/api/ng/filter/orderBy) filter to sort fields in ui
|
||||
* api returns dates in array format[yyyy, mm, dd], converting the array of dates to date object
|
||||
|
||||
@ -82,7 +82,6 @@
|
||||
scope.formData.daysInYearType = scope.product.daysInYearType.id;
|
||||
scope.formData.daysInMonthType = scope.product.daysInMonthType.id;
|
||||
scope.formData.isInterestRecalculationEnabled = scope.product.isInterestRecalculationEnabled;
|
||||
scope.formData.considerFutureDisbursmentsInSchedule = scope.product.considerFutureDisbursmentsInSchedule;
|
||||
scope.formData.interestRecalculationCompoundingMethod = scope.product.interestRecalculationData.interestRecalculationCompoundingType.id;
|
||||
scope.formData.rescheduleStrategyMethod = scope.product.interestRecalculationData.rescheduleStrategyType.id;
|
||||
scope.formData.preClosureInterestCalculationStrategy = scope.product.interestRecalculationData.preClosureInterestCalculationStrategy.id;
|
||||
@ -289,11 +288,6 @@
|
||||
scope.penaltyToIncomeAccountMappings = [];
|
||||
scope.chargesSelected = [];
|
||||
scope.selectedConfigurableAttributes = [];
|
||||
if(considerFutureDisbursmentsInSchedule.checked)
|
||||
scope.formData.considerFutureDisbursmentsInSchedule = true;
|
||||
else{
|
||||
scope.formData.considerFutureDisbursmentsInSchedule = false;
|
||||
}
|
||||
var temp = '';
|
||||
|
||||
//configure fund sources for payment channels
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
scope.incomeAndLiabilityAccountOptions = scope.incomeAccountOptions.concat(scope.liabilityAccountOptions);
|
||||
scope.penaltyOptions = scope.product.penaltyOptions || [];
|
||||
scope.chargeOptions = scope.product.chargeOptions || [];
|
||||
scope.considerFutureDisbursmentsInSchedule = scope.product.considerFutureDisbursmentsInSchedule;
|
||||
scope.charges = [];
|
||||
for(var i in scope.product.charges){
|
||||
if(scope.product.charges[i].chargeData){
|
||||
@ -496,11 +495,6 @@
|
||||
scope.selectedConfigurableAttributes = [];
|
||||
var reqFirstDate = dateFilter(scope.date.first, scope.df);
|
||||
var reqSecondDate = dateFilter(scope.date.second, scope.df);
|
||||
if(isFutureDisbursementsToBeShown.checked)
|
||||
scope.formData.considerFutureDisbursmentsInSchedule = true;
|
||||
else{
|
||||
scope.formData.considerFutureDisbursmentsInSchedule = false;
|
||||
}
|
||||
var temp = '';
|
||||
//configure fund sources for payment channels
|
||||
for (var i in scope.configureFundOptions) {
|
||||
|
||||
@ -1508,4 +1508,8 @@ figure {
|
||||
|
||||
.border1px {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.app-modal-window .modal-dialog {
|
||||
width: 900px;
|
||||
}
|
||||
@ -1044,6 +1044,127 @@
|
||||
<button class="btn btn-primary" ng-click="delete()">{{'label.button.confirm' | translate}}</button>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/ng-template" id="showschedule.html" class="width100">
|
||||
<div class="width100">
|
||||
|
||||
<div class="modal-header silver">
|
||||
<h3 class="bolder">{{'label.heading.loanrepaymentschedule' | translate}}</h3>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="row span" style="margin-left:-1px;margin-top: -20px;margin-right:-1px">
|
||||
|
||||
<div class="col-sm-6 col-md-6">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{'label.heading.customername' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.clientName}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>{{'label.heading.customerid' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.clientAccountNo}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>{{'label.heading.loanno' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.accountNo}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{'label.heading.productname' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.loanProductName}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-6">
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{'label.heading.sanctiondate' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.timeline.approvedOnDate | DateFormat}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{'label.heading.sanctionamount' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.approvedPrincipal}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>{{'label.heading.disbursementdate' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.timeline.actualDisbursementDate | DateFormat}}</span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>{{'label.heading.disbursementammount' | translate}}:</th>
|
||||
<td><span class="padded-td">{{loandetails.principal}}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="well">
|
||||
<table class="table table-striped .width100" style="margin-bottom: -20px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>{{'label.heading.date' | translate}}</th>
|
||||
<th>{{'label.heading.days' | translate}}</th>
|
||||
<th>{{'label.heading.disbursement' | translate}}</th>
|
||||
<th>{{'label.heading.principaldue' | translate}}</th>
|
||||
<th>{{'label.heading.principalbalance' | translate}}</th>
|
||||
<th>{{'label.heading.interestdue' | translate}}</th>
|
||||
<th>{{'label.heading.fees' | translate}}</th>
|
||||
<th>{{'label.heading.penalty' | translate}}</th>
|
||||
<th>{{'label.heading.due' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="period in repaymentscheduleinfo.periods">
|
||||
<td>{{period.period}}</td>
|
||||
<td>{{period.dueDate | DateFormat}}</td>
|
||||
<td>{{period.daysInPeriod}}</td>
|
||||
<td>{{period.principalDisbursed | number}}</td>
|
||||
<td>{{period.principalDue| number}}</td>
|
||||
<td>{{period.principalLoanBalanceOutstanding| number}}</td>
|
||||
<td>{{period.interestDue| number}}</td>
|
||||
<td>{{period.feeChargesDue| number}}</td>
|
||||
<td>{{period.penaltyChargesDue| number}}</td>
|
||||
<td>{{period.totalDueForPeriod| number}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot class="ui-widget-header">
|
||||
<tr>
|
||||
<th colspan="2">{{'label.heading.total' | translate}}</th>
|
||||
<th>{{repaymentscheduleinfo.loanTermInDays}}</th>
|
||||
<th>{{repaymentscheduleinfo.totalPrincipalDisbursed| number}}</th>
|
||||
<th>{{repaymentscheduleinfo.totalPrincipalExpected| number}}</th>
|
||||
<th></th>
|
||||
<th>{{repaymentscheduleinfo.totalInterestCharged| number}}</th>
|
||||
<th>{{repaymentscheduleinfo.totalFeeChargesCharged| number}}</th>
|
||||
<th>{{repaymentscheduleinfo.totalPenaltyChargesCharged| number}}</th>
|
||||
<th>{{repaymentscheduleinfo.totalRepaymentExpected| number}}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-offset-9 paddedleft120">
|
||||
<button class="btn btn-warning" ng-click="cancel()">{{'label.button.cancel' | translate}}</button>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
|
||||
<tab heading="{{'label.heading.loandocuments' | translate}}" select="getLoanDocuments()">
|
||||
<div class="pull-right" data-ng-show="choice">
|
||||
<a href="#/addloandocument/{{loandetails.id}}" class="btn btn-primary"><i class="icon-plus icon-white"></i>{{'label.button.upload'
|
||||
|
||||
@ -989,17 +989,6 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-ng-show="formData.isInterestRecalculationEnabled">
|
||||
<label class="control-label col-sm-2">{{'label.input.enablefuturedisbursement'
|
||||
| translate }}<span class="required">*</span></label>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<label class="checkbox control-label">
|
||||
<input id="considerFutureDisbursmentsInSchedule" type="checkbox" ng-checked="response.uiDisplayConfigurations.loanAccount.isDefaultValue.considerFutureDisbursmentsInSchedule"
|
||||
ng-model="considerFutureDisbursmentsInSchedule">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<h3>{{ 'label.heading.gauranteeRequirements' | translate }}</h3>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
|
||||
@ -872,17 +872,6 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" data-ng-show="formData.isInterestRecalculationEnabled">
|
||||
<label class="control-label col-sm-2">{{'label.input.enablefuturedisbursement'
|
||||
| translate }}<span class="required">*</span></label>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<label class="checkbox control-label">
|
||||
<input id="isFutureDisbursementsToBeShown" type="checkbox"
|
||||
ng-model="considerFutureDisbursmentsInSchedule">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<h3>{{ 'label.heading.gauranteeRequirements' | translate }}</h3>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
|
||||
@ -365,10 +365,6 @@
|
||||
<td>{{'label.input.issubsidyapplicable' | translate}}</td>
|
||||
<td colspan="3">{{loanproduct.interestRecalculationData.isSubsidyApplicable | YesOrNo}}</td>
|
||||
</tr>
|
||||
<tr data-ng-show="loanproduct.isInterestRecalculationEnabled">
|
||||
<td>{{'label.input.allow.future.disbursement' | translate}}</td>
|
||||
<td colspan="3">{{loanproduct.considerFutureDisbursmentsInSchedule | YesOrNo}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><br/></td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user