@@ -148,7 +148,7 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges {
148148 this . loanProductAccountingForm . patchValue ( {
149149 enableAccrualActivityPosting : this . loanProductsTemplate . enableAccrualActivityPosting
150150 } ) ;
151- if ( this . capitalizedIncome . enableIncomeCapitalization ) {
151+ if ( this . capitalizedIncome && this . capitalizedIncome . enableIncomeCapitalization ) {
152152 this . loanProductAccountingForm . patchValue ( {
153153 deferredIncomeLiabilityAccountId : accountingMappings . deferredIncomeLiabilityAccount . id ,
154154 incomeFromCapitalizationAccountId : accountingMappings . incomeFromCapitalizationAccount . id
@@ -165,7 +165,7 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges {
165165 incomeFromPenaltyAccountId : accountingMappings . incomeFromPenaltyAccount . id ,
166166 incomeFromRecoveryAccountId : accountingMappings . incomeFromRecoveryAccount . id ,
167167 writeOffAccountId : accountingMappings . writeOffAccount . id ,
168- goodwillCreditAccountId : accountingMappings . goodwillCreditAccount . id ,
168+ goodwillCreditAccountId : accountingMappings . goodwillCreditAccount ? .id || null ,
169169 overpaymentLiabilityAccountId : accountingMappings . overpaymentLiabilityAccount . id ,
170170 chargeOffFraudExpenseAccountId : accountingMappings . chargeOffFraudExpenseAccount
171171 ? accountingMappings . chargeOffFraudExpenseAccount . id
@@ -591,7 +591,7 @@ export class LoanProductAccountingStepComponent implements OnInit, OnChanges {
591591
592592 setCapitalizedIncomeControls ( ) {
593593 if ( this . isAccountingAccrualBased ) {
594- if ( this . capitalizedIncome . enableIncomeCapitalization ) {
594+ if ( this . capitalizedIncome && this . capitalizedIncome . enableIncomeCapitalization ) {
595595 this . loanProductAccountingForm . addControl (
596596 'deferredIncomeLiabilityAccountId' ,
597597 new UntypedFormControl ( '' , Validators . required )
0 commit comments