From b1452bd83bdc87082ef080b999669731f16ee059 Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Mon, 6 Oct 2025 10:44:39 -0500 Subject: [PATCH] WEB-316: Advance Accounting for loan transaction classification --- .../advanced-accounting-mapping-rule.component.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts index 8b225294f..cba4f9bdf 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-accounting-step/advanced-accounting-mapping-rule/advanced-accounting-mapping-rule.component.ts @@ -21,6 +21,7 @@ import { DeleteDialogComponent } from 'app/shared/delete-dialog/delete-dialog.co import { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component'; import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base'; import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-base'; +import { GLAccount } from 'app/shared/models/general.model'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; @Component({ @@ -316,16 +317,19 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit { }); } - getGlAccountData(valueId: number): any { - const glAccountData = [ + getGlAccountData(valueId: number): GLAccount | null { + const glAccountDatas = [ this.incomeAccountData, this.expenseAccountData, this.assetAccountData, this.liabilityAccountData ]; - return glAccountData.find((i: any) => { - return i.id === valueId; - }); + for (const glAccountData of glAccountDatas) { + const glAccount = glAccountData.find((i: GLAccount) => i.id === valueId); + if (glAccount) { + return glAccount; + } + } return null; } }