diff --git a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts
index d565dea27..9b05992be 100644
--- a/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts
+++ b/src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts
@@ -41,6 +41,8 @@ export class LoansAccountDetailsStepComponent implements OnInit {
loanId: any = null;
+ loanProductSelected = false;
+
/** Loans Account Template with product data */
@Output() loansAccountProductTemplate = new EventEmitter();
/**
@@ -106,6 +108,7 @@ export class LoansAccountDetailsStepComponent implements OnInit {
this.loanPurposeOptions = response.loanPurposeOptions;
this.fundOptions = response.fundOptions;
this.accountLinkingOptions = response.accountLinkingOptions;
+ this.loanProductSelected = true;
if (response.createStandingInstructionAtDisbursement) {
this.loansAccountDetailsForm.get('createStandingInstructionAtDisbursement').patchValue(response.createStandingInstructionAtDisbursement);
}
diff --git a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.html b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.html
new file mode 100644
index 000000000..ea86f6e83
--- /dev/null
+++ b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.html
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
diff --git a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.scss b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.spec.ts b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.spec.ts
new file mode 100644
index 000000000..d7761273a
--- /dev/null
+++ b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { LoansAccountScheduleStepComponent } from './loans-account-schedule-step.component';
+
+describe('LoansAccountScheduleStepComponent', () => {
+ let component: LoansAccountScheduleStepComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ LoansAccountScheduleStepComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(LoansAccountScheduleStepComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.ts
new file mode 100644
index 000000000..83dcfce93
--- /dev/null
+++ b/src/app/loans/loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component.ts
@@ -0,0 +1,47 @@
+import { Component, Input, OnInit } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+import { LoansService } from 'app/loans/loans.service';
+import { SettingsService } from 'app/settings/settings.service';
+
+@Component({
+ selector: 'mifosx-loans-account-schedule-step',
+ templateUrl: './loans-account-schedule-step.component.html',
+ styleUrls: ['./loans-account-schedule-step.component.scss']
+})
+export class LoansAccountScheduleStepComponent implements OnInit {
+
+ /** Loans Account Template */
+ @Input() loansAccountTemplate: any;
+ /** Loans Account Product Template */
+ @Input() loansAccountProductTemplate: any;
+ /** Loans Account Data */
+ @Input() loansAccount: any;
+
+ showRepayment = false;
+ repaymentScheduleDetails: any = {periods: []};
+
+ loanId: any = null;
+
+ constructor(private loansService: LoansService,
+ private settingsService: SettingsService,
+ private route: ActivatedRoute) {
+ this.loanId = this.route.snapshot.params['loanId'];
+ }
+
+ ngOnInit(): void { }
+
+ showRepaymentInfo(): void {
+ this.repaymentScheduleDetails = {periods: []};
+ this.showRepayment = !this.showRepayment;
+ if (this.showRepayment) {
+ const locale = this.settingsService.language.code;
+ const dateFormat = this.settingsService.dateFormat;
+ const payload = this.loansService.buildLoanRequestPayload(this.loansAccount, this.loansAccountTemplate,
+ this.loansAccountProductTemplate.calendarOptions, locale, dateFormat);
+
+ this.loansService.calculateLoanSchedule(payload).subscribe((response: any) => {
+ this.repaymentScheduleDetails = response;
+ });
+ }
+ }
+}
diff --git a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html
index 400111aba..5e5a79edc 100644
--- a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html
+++ b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.html
@@ -163,7 +163,6 @@
-
Calculate interest for exact days in partial period
@@ -192,19 +191,20 @@
Moratorium
-
+
Grace on principal payment
-
+
Grace on interest payment
-
- On Arreas Aging
-
+
+ On arrears ageing
+
+
Installment Amount
@@ -360,7 +360,6 @@
-