Skip to content

Commit a49dcd9

Browse files
author
Jose Alberto Hernandez
committed
fix: Loan Product detail view using charges
1 parent dc1f82e commit a49dcd9

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/app/products/loan-products/common/loan-product-summary/loan-product-summary.component.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -780,11 +780,7 @@ <h3 class="mat-h3 flex-fill">{{ 'labels.heading.Charges' | translate }}</h3>
780780

781781
<mat-divider [inset]="true"></mat-divider>
782782

783-
<table
784-
class="mat-elevation-z1 flex-fill"
785-
mat-table
786-
[dataSource]="loanProduct.charges | chargesPenaltyFilter: false"
787-
>
783+
<table class="mat-elevation-z1 flex-100" mat-table [dataSource]="loanProduct.charges | chargesPenaltyFilter: false">
788784
<ng-container matColumnDef="name">
789785
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Name' | translate }}</th>
790786
<td mat-cell *matCellDef="let charge">
@@ -821,7 +817,7 @@ <h3 class="mat-h3 flex-fill">{{ 'labels.inputs.Overdue Charges' | translate }}</
821817

822818
<mat-divider [inset]="true"></mat-divider>
823819

824-
<table class="mat-elevation-z1 flex-fill" mat-table [dataSource]="loanProduct.charges | chargesPenaltyFilter: true">
820+
<table class="mat-elevation-z1 flex-100" mat-table [dataSource]="loanProduct.charges | chargesPenaltyFilter: true">
825821
<ng-container matColumnDef="name">
826822
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Name' | translate }}</th>
827823
<td mat-cell *matCellDef="let overdueCharge">

src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/loan-product-accounting-step.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)