mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 13:51:55 +00:00
Fix-2658 specific due date loan charge
This commit is contained in:
parent
38813f1316
commit
c90f8f63af
@ -6,6 +6,8 @@
|
||||
scope.formData = {};
|
||||
scope.isCollapsed = true;
|
||||
scope.loanId = routeParams.id;
|
||||
scope.first = {};
|
||||
scope.first.date = new Date();
|
||||
resourceFactory.loanChargeTemplateResource.get({loanId: scope.loanId}, function (data) {
|
||||
scope.charges = data.chargeOptions;
|
||||
});
|
||||
@ -27,10 +29,9 @@
|
||||
scope.submit = function () {
|
||||
this.formData.locale = scope.optlang.code;
|
||||
this.formData.dateFormat = scope.df;
|
||||
if (this.formData.dueDate) {
|
||||
this.formData.dueDate = dateFilter(this.formData.dueDate, scope.df);
|
||||
if(scope.chargeData.chargeTimeType.id==2){
|
||||
this.formData.dueDate = dateFilter(this.first.date, scope.df);
|
||||
}
|
||||
;
|
||||
resourceFactory.loanResource.save({resourceType: 'charges', loanId: scope.loanId}, this.formData, function (data) {
|
||||
location.path('/viewloanaccount/' + data.loanId);
|
||||
});
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</ul>
|
||||
<div class="card">
|
||||
<div class="content">
|
||||
<form class="form-horizontal" novalidate="" name="loanchargeform" ng-submit="submit()">
|
||||
<form class="form-horizontal" novalidate="" name="loanchargeform" rc-submit="submit()">
|
||||
<api-validate></api-validate>
|
||||
<fieldset>
|
||||
<legend>{{ 'label.heading.addloancharge' | translate }}</legend>
|
||||
@ -53,14 +53,18 @@
|
||||
<input type="text" class="form-control" value="{{chargeData.chargeTimeType.value}}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="chargeData.chargeTimeType.id==2">
|
||||
<label class="control-label col-sm-2">{{ 'label.input.dueon' | translate }}<span
|
||||
class="required">*</span></label>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<input id="dueDate" type="text" datepicker-pop="dd MMMM yyyy" class="form-control"
|
||||
placeholder="{{'label.input.duedate' | translate}}" ng-model="formData.dueDate"
|
||||
is-open="opened" min="minDate" max="'2020-06-22'"/>
|
||||
<input id="dueDate" name = "dueDate" type="text" datepicker-pop="dd MMMM yyyy" class="form-control"
|
||||
placeholder="{{'label.input.duedate' | translate}}" ng-model="first.date"
|
||||
is-open="opened" min="minDate" max="'2020-06-22'" readonly required late-Validate/>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<form-validate valattributeform="loanchargeform" valattribute="dueDate"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user