fix: Prevent account transfer charges when no savings account is linked (#2364)

- Added getter to check if a savings account is linked (loansSavingsAccountLinked).
- Filtered out charges with 'Account transfer' payment mode when no savings account is linked.
This commit is contained in:
Abhinav R Cillanki
2025-03-27 21:35:33 -06:00
committed by GitHub
parent ff927ffecf
commit 2aae48c8d3
3 changed files with 13 additions and 0 deletions
@@ -53,6 +53,7 @@
[loansAccountProductTemplate]="loansAccountProductTemplate"
[loansAccountTemplate]="loansAccountTemplate"
[loansAccountFormValid]="loansAccountFormValid"
[loansSavingsAccountLinked]="loansSavingsAccountLinked"
>
</mifosx-loans-account-charges-step>
</mat-step>
@@ -119,6 +119,10 @@ export class CreateLoansAccountComponent {
return this.loansAccountDetailsForm.valid && this.loansAccountTermsForm.valid;
}
get loansSavingsAccountLinked() {
return this.loansAccountDetailsStep.loansAccountDetailsForm.get('linkAccountId').value;
}
/** Gets principal Amount */
get loanPrincipal() {
return this.loansAccountTermsStep.loansAccountTermsForm.value.principal;