WEB-316: Advance Accounting for loan transaction classification
This commit is contained in:
+9
-5
@@ -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 { FormDialogComponent } from 'app/shared/form-dialog/form-dialog.component';
|
||||||
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-base';
|
||||||
import { SelectBase } from 'app/shared/form-dialog/formfield/model/select-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';
|
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -316,16 +317,19 @@ export class AdvancedAccountingMappingRuleComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
getGlAccountData(valueId: number): any {
|
getGlAccountData(valueId: number): GLAccount | null {
|
||||||
const glAccountData = [
|
const glAccountDatas = [
|
||||||
this.incomeAccountData,
|
this.incomeAccountData,
|
||||||
this.expenseAccountData,
|
this.expenseAccountData,
|
||||||
this.assetAccountData,
|
this.assetAccountData,
|
||||||
this.liabilityAccountData
|
this.liabilityAccountData
|
||||||
];
|
];
|
||||||
return glAccountData.find((i: any) => {
|
for (const glAccountData of glAccountDatas) {
|
||||||
return i.id === valueId;
|
const glAccount = glAccountData.find((i: GLAccount) => i.id === valueId);
|
||||||
});
|
if (glAccount) {
|
||||||
|
return glAccount;
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user