diff --git a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts
index 0e36cfd3b..7e8fc7e59 100644
--- a/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts
+++ b/src/app/loans/loans-view/loan-term-variations-tab/loan-term-variations-tab.component.ts
@@ -6,7 +6,7 @@ import { ActivatedRoute } from '@angular/router';
templateUrl: './loan-term-variations-tab.component.html',
styleUrls: ['./loan-term-variations-tab.component.scss']
})
-export class LoanTermVariationsTabComponent implements OnInit {
+export class LoanTermVariationsTabComponent {
/** Loan Details Data */
loanTermVariationsData: any[] = [];
@@ -21,8 +21,4 @@ export class LoanTermVariationsTabComponent implements OnInit {
});
this.loanId = this.route.parent.parent.snapshot.params['loanId'];
}
-
- ngOnInit(): void {
- }
-
}
diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html
index f627c9f23..0ea1ff088 100644
--- a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html
+++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html
@@ -542,15 +542,19 @@
{{ 'labels.heading.Interest Recalculation' | trans
{{ 'labels.inputs.Frequency Interval for recalculation' | translate}}:
-
{{ loanProduct.interestRecalculationData.recalculationRestFrequencyInterval }}
+
{{ loanProduct.interestRecalculationData.recalculationRestFrequencyInterval }}
{{ 'labels.inputs.Rest Frequency Date' | translate}}:
- {{ loanProduct.interestRecalculationData.recalculationRestFrequencyDate }}
+ {{ loanProduct.interestRecalculationData.recalculationRestFrequencyDate }}
{{ 'labels.inputs.Is Arrears recognization based on original schedule' | translate}}:
- {{ loanProduct.isArrearsBasedOnOriginalSchedule | yesNo }}
+ {{ loanProduct.interestRecalculationData.isArrearsBasedOnOriginalSchedule | yesNo }}
+
+
+ {{ 'labels.inputs.Do not calculate interest on past due principal balances' | translate}}:
+ {{ loanProduct.interestRecalculationData.disallowInterestCalculationOnPastDue | yesNo }}
diff --git a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts
index 6cf47424c..d79904493 100644
--- a/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts
+++ b/src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.ts
@@ -160,7 +160,8 @@ export class LoanProductSummaryComponent implements OnInit, OnChanges {
allowCompoundingOnEod: this.loanProduct.allowCompoundingOnEod,
isArrearsBasedOnOriginalSchedule: this.loanProduct.isArrearsBasedOnOriginalSchedule,
isCompoundingToBePostedAsTransaction: this.loanProduct.isCompoundingToBePostedAsTransaction,
- recalculationRestFrequencyInterval: this.loanProduct.recalculationRestFrequencyInterval
+ recalculationRestFrequencyInterval: this.loanProduct.recalculationRestFrequencyInterval,
+ disallowInterestCalculationOnPastDue: this.loanProduct.disallowInterestCalculationOnPastDue,
};
}
diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html
index 357497e84..ba26d00de 100644
--- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html
+++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html
@@ -433,6 +433,10 @@ {{'labels.heading.Interest Recalculation' | tran
{{'labels.inputs.Is Arrears recognization based on original schedule' | translate}}?
+
+ {{'labels.inputs.Do not calculate interest on past due principal balances' | translate}}
+
+
diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts
index 96ac1abbf..45b6d3f7f 100644
--- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts
+++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts
@@ -370,6 +370,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
this.loanProductSettingsForm.removeControl('recalculationRestFrequencyType');
this.loanProductSettingsForm.removeControl('isArrearsBasedOnOriginalSchedule');
}
+ this.enableFieldsWhenScheduleTypeIsProgressiveAndInterestRateRecalculationEnabled();
});
this.loanProductSettingsForm.get('holdGuaranteeFunds').valueChanges
@@ -491,9 +492,25 @@ export class LoanProductSettingsStepComponent implements OnInit {
this.setRescheduleStrategies();
}
this.processingStrategyService.initialize(this.isAdvancedTransactionProcessingStrategy);
+ this.enableFieldsWhenScheduleTypeIsProgressiveAndInterestRateRecalculationEnabled();
});
}
+ private enableFieldsWhenScheduleTypeIsProgressiveAndInterestRateRecalculationEnabled() {
+ const isProgressiveLoan = this.loanProductSettingsForm.get('loanScheduleType').value === LoanProducts.LOAN_SCHEDULE_TYPE_PROGRESSIVE;
+ const isInterestRecalculationEnabled = this.loanProductSettingsForm.get('isInterestRecalculationEnabled').value == true;
+ const shouldControlExists = isProgressiveLoan && isInterestRecalculationEnabled;
+ const isControlExists = this.loanProductSettingsForm.contains('disallowInterestCalculationOnPastDue');
+
+ if (shouldControlExists && !isControlExists) {
+ this.loanProductSettingsForm.addControl('disallowInterestCalculationOnPastDue', new UntypedFormControl(''));
+ this.loanProductSettingsForm.patchValue({'disallowInterestCalculationOnPastDue': this.loanProductsTemplate.interestRecalculationData?.disallowInterestCalculationOnPastDue ?? false});
+ } else if (isControlExists && !shouldControlExists) {
+ this.loanProductSettingsForm.patchValue({'disallowInterestCalculationOnPastDue': undefined });
+ this.loanProductSettingsForm.removeControl('disallowInterestCalculationOnPastDue');
+ }
+ }
+
private setRescheduleStrategies() {
if (this.advancedTransactionProcessingStrategyDisabled) {
this.rescheduleStrategyTypeData = this.rescheduleStrategyTypeDataBase.filter(
diff --git a/src/app/products/loan-products/models/loan-product.model.ts b/src/app/products/loan-products/models/loan-product.model.ts
index b72d8b99e..e0e08e729 100644
--- a/src/app/products/loan-products/models/loan-product.model.ts
+++ b/src/app/products/loan-products/models/loan-product.model.ts
@@ -52,6 +52,7 @@ export interface LoanProduct {
recalculationCompoundingFrequencyType?: number;
recalculationRestFrequencyType?: number;
allowCompoundingOnEod?: boolean;
+ disallowInterestCalculationOnPastDue?: boolean;
isArrearsBasedOnOriginalSchedule?: boolean;
isCompoundingToBePostedAsTransaction?: boolean;
recalculationRestFrequencyInterval?: number;
@@ -168,4 +169,5 @@ export interface InterestRecalculationData {
isCompoundingToBePostedAsTransaction: boolean;
preClosureInterestCalculationStrategy: OptionData;
allowCompoundingOnEod: boolean;
+ disallowInterestCalculationOnPastDue: boolean;
}
diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json
index b009717ae..bc009cbf7 100644
--- a/src/assets/translations/en-US.json
+++ b/src/assets/translations/en-US.json
@@ -1506,6 +1506,7 @@
"Dividend Period End Date": "Dividend Period End Date",
"Dividend Period Start Date": "Dividend Period Start Date",
"Dividends": "Dividends",
+ "Do not calculate interest on past due principal balances": "Do not calculate interest on past due principal balances",
"Documents": "Documents",
"Document Key": "Document Key",
"Document Type": "Document Type",