FINERACT-2107: Cumulative loan product creation fix

This commit is contained in:
Adam Saghy
2024-07-24 14:33:13 +02:00
parent b5f2f699c3
commit 9c6bc90c84
2 changed files with 10 additions and 2 deletions
@@ -154,7 +154,11 @@ export class CreateLoanProductComponent implements OnInit {
loanProduct['dueDaysForRepaymentEvent'] = null;
loanProduct['overDueDaysForRepaymentEvent'] = null;
}
loanProduct['supportedInterestRefundTypes'] = this.mapStringEnumOptionToIdList(loanProduct['supportedInterestRefundTypes']);
if (this.isAdvancedPaymentStrategy) {
loanProduct['supportedInterestRefundTypes'] = this.mapStringEnumOptionToIdList(loanProduct['supportedInterestRefundTypes']);
} else {
delete loanProduct['supportedInterestRefundTypes'];
}
delete loanProduct['useDueForRepaymentsConfigurations'];
this.productsService.createLoanProduct(loanProduct)
@@ -184,7 +184,11 @@ export class EditLoanProductComponent implements OnInit {
loanProduct['dueDaysForRepaymentEvent'] = null;
loanProduct['overDueDaysForRepaymentEvent'] = null;
}
loanProduct['supportedInterestRefundTypes'] = this.mapStringEnumOptionToIdList(loanProduct['supportedInterestRefundTypes']);
if (this.isAdvancedPaymentStrategy) {
loanProduct['supportedInterestRefundTypes'] = this.mapStringEnumOptionToIdList(loanProduct['supportedInterestRefundTypes']);
} else {
delete loanProduct['supportedInterestRefundTypes'];
}
delete loanProduct['useDueForRepaymentsConfigurations'];
this.productsService.updateLoanProduct(this.loanProductAndTemplate.id, loanProduct)