From 75686c7f4c70654dec0e46f938579a33d470eed0 Mon Sep 17 00:00:00 2001 From: pc_11 <76156941+PC-11-00@users.noreply.github.com> Date: Thu, 1 Jun 2023 12:55:29 +0530 Subject: [PATCH] =?UTF-8?q?fix:not=20able=20to=20create=20a=20tranche=20lo?= =?UTF-8?q?an=20account=20when=20"Disallow=20Expected=20Disbursements"=20c?= =?UTF-8?q?heckbox=20is=20disabled=C2=A0=20(#1763)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit now we can create loan account when “disallow expected disbursements” is disabled Fixes: #1752 LGTM tested locally all config working as expected --- .../loans-account-terms-step.component.html | 2 +- .../loans-account-terms-step.component.ts | 13 ++++++++----- src/app/loans/loans.service.ts | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) 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 16b6445ef..2e176e07d 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 @@ -297,7 +297,7 @@ - diff --git a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts index bb6bdf103..2d7ef36fa 100644 --- a/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts +++ b/src/app/loans/loans-account-stepper/loans-account-terms-step/loans-account-terms-step.component.ts @@ -127,7 +127,8 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { 'fixedEmiAmount': this.loansAccountTermsData.fixedEmiAmount, 'maxOutstandingLoanBalance': this.loansAccountTermsData.maxOutstandingLoanBalance, 'transactionProcessingStrategyCode': this.loansAccountTermsData.transactionProcessingStrategyCode, - 'interestRateDifferential':this.loansAccountTermsData.interestRateDifferential + 'interestRateDifferential':this.loansAccountTermsData.interestRateDifferential, + 'multiDisburseLoan': this.loansAccountTermsData.multiDisburseLoan }); this.multiDisburseLoan = this.loansAccountTermsData.multiDisburseLoan; @@ -210,7 +211,8 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { 'fixedEmiAmount': this.loansAccountTermsData.fixedEmiAmount, 'maxOutstandingLoanBalance': this.loansAccountTermsData.maxOutstandingLoanBalance, 'transactionProcessingStrategyCode': this.loansAccountTermsData.transactionProcessingStrategyCode, - 'interestRateDifferential':this.loansAccountTermsData.interestRateDifferential + 'interestRateDifferential':this.loansAccountTermsData.interestRateDifferential, + 'multiDisburseLoan': this.loansAccountTermsData.multiDisburseLoan }); } this.createloansAccountTermsForm(); @@ -272,7 +274,8 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { 'isTopup': [''], 'maxOutstandingLoanBalance': [''], 'interestRateDifferential':[''], - 'transactionProcessingStrategyCode': ['', Validators.required] + 'transactionProcessingStrategyCode': ['', Validators.required], + 'multiDisburseLoan': [false] }); } @@ -304,8 +307,8 @@ export class LoansAccountTermsStepComponent implements OnInit, OnChanges { }), new InputBase({ controlName: 'principal', - label: 'Principal', - value: (currentPrincipalAmount - this.totalMultiDisbursed), + label: `Principal(It should be less than equal to the ${currentPrincipalAmount})`, + value: '', type: 'number', required: true, order: 2 diff --git a/src/app/loans/loans.service.ts b/src/app/loans/loans.service.ts index 37b6d2725..921e0a945 100644 --- a/src/app/loans/loans.service.ts +++ b/src/app/loans/loans.service.ts @@ -587,7 +587,7 @@ export class LoansService { delete loansAccountData.isValid; loansAccountData.principal = loansAccountData.principalAmount; delete loansAccountData.principalAmount; - + delete loansAccountData.multiDisburseLoan; //this was just added so that disbursement data can be send in the backend return loansAccountData; }