Skip to content

Commit

Permalink
interestChargedFromDisbursementDate flag only for cumulative loans
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsaghy committed Feb 12, 2025
1 parent 36cb50b commit 10fcf28
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,11 @@ <h4 fxFlex="98%" class="mat-h4">{{ 'labels.heading.Interest Calculations' | tran
<p>{{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }}</p>
</mat-checkbox>

<mat-checkbox
fxFlex="48%"
formControlName="interestRecognitionOnDisbursementDate"
>
<p>{{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}</p>
</mat-checkbox>
<ng-container *ngIf="isProgressive">
<mat-checkbox formControlName="interestRecognitionOnDisbursementDate" fxFlex="48%">
<p>{{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}</p>
</mat-checkbox>
</ng-container>

<mat-form-field fxFlex="48%">
<mat-label>{{ 'labels.inputs.Arrears tolerance' | translate }} </mat-label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
currency: Currency;

productEnableDownPayment = false;
isProgressive = false;

/**
* Create Loans Account Terms Form
Expand Down Expand Up @@ -127,7 +128,8 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {
this.loansAccountTermsData = this.loansAccountTemplate;
}
this.productEnableDownPayment = this.loansAccountTermsData.product.enableDownPayment;

this.isProgressive =
this.loansAccountTermsData.loanScheduleType.code == LoanProducts.LOAN_SCHEDULE_TYPE_PROGRESSIVE;
if (this.loansAccountTermsData.product) {
this.loanProduct = this.loansAccountTermsData.product;
}
Expand Down Expand Up @@ -164,6 +166,10 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges {

this.setAdvancedPaymentStrategyControls();

if (this.loansAccountTermsData.loanScheduleType.code == LoanProducts.LOAN_SCHEDULE_TYPE_CUMULATIVE) {
this.loansAccountTermsForm.removeControl('interestRecognitionOnDisbursementDate');
}

if (this.loansAccountTermsData.isLoanProductLinkedToFloatingRate) {
this.loansAccountTermsForm.removeControl('interestRatePerPeriod');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ <h3>{{ 'labels.heading.Loan Details' | translate }}</h3>
</div>

<div fxFlexFill>
<span fxFlex="50%"
>{{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}:</span
>
<span fxFlex="50%">{{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}:</span>
<span fxFlex="50%">{{ loanDetails.interestRecognitionOnDisbursementDate | yesNo }}</span>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,10 @@ <h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Settings' | translate }}</h3>
</div>

<div fxFlexFill>
<span fxFlex="47%"
>{{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}:</span
>
<span fxFlex="47%">{{ 'labels.inputs.Is interest recognition on disbursement date?' | translate }}:</span>
<span fxFlex="53%">{{ loanProduct.interestRecognitionOnDisbursementDate | yesNo }}</span>
</div>

<h3 class="mat-h3" fxFlexFill>{{ 'labels.inputs.Loan Schedule' | translate }}</h3>

<mat-divider [inset]="true"></mat-divider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h3 fxFlex="23%" class="mat-h3">{{ 'labels.inputs.Interest Rates' | translate }}
>
{{ 'labels.inputs.Is Zero Interest Rate?' | translate }}
</mat-checkbox>

<mat-checkbox
fxFlex="32%"
labelPosition="before"
Expand Down

0 comments on commit 10fcf28

Please sign in to comment.