Merge pull request #1518 from anika-001/fix-1475

Fix - #1475
This commit is contained in:
Adam Saghy
2022-09-09 10:49:12 +02:00
committed by GitHub
@@ -64,10 +64,13 @@ export class SavingProductAccountingStepComponent implements OnInit {
'incomeFromFeeAccountId': this.savingProductsTemplate.accountingMappings.incomeFromFeeAccount.id,
'incomeFromPenaltyAccountId': this.savingProductsTemplate.accountingMappings.incomeFromPenaltyAccount.id,
'incomeFromInterestId': this.savingProductsTemplate.accountingMappings.incomeFromInterest.id,
'escheatLiabilityId': this.savingProductsTemplate.accountingMappings.escheatLiabilityAccount.id,
'advancedAccountingRules': (this.savingProductsTemplate.paymentChannelToFundSourceMappings || this.savingProductsTemplate.feeToIncomeAccountMappings || this.savingProductsTemplate.penaltyToIncomeAccountMappings) ? true : false
});
if (this.isDormancyTrackingActive.value) {
this.savingProductAccountingForm.patchValue({
'escheatLiabilityId': this.savingProductsTemplate.accountingMappings.escheatLiabilityAccount.id,
});
}
this.savingProductAccountingForm.setControl('paymentChannelToFundSourceMappings',
this.formBuilder.array((this.savingProductsTemplate.paymentChannelToFundSourceMappings || []).map((paymentFundSource: any) =>
({ paymentTypeId: paymentFundSource.paymentType.id, fundSourceAccountId: paymentFundSource.fundSourceAccount.id }))));