Skip to content

Commit

Permalink
FINERACT-2107: Cumulative loan product creation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsaghy committed Jul 24, 2024
1 parent b5f2f69 commit 9c6bc90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9c6bc90

Please sign in to comment.