-
Notifications
You must be signed in to change notification settings - Fork 2.6k
FINERACT-1183: archive FD and RD products #5967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,7 +145,9 @@ public void validateForFixedDepositUpdate(final String json) { | |
|
|
||
| validateDepositTermDetailForUpdate(element, baseDataValidator); | ||
|
|
||
| validateChartsData(element, baseDataValidator); | ||
| if (fromApiJsonHelper.parameterExists(chartsParamName, element)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This condition can be moved into |
||
| validateChartsData(element, baseDataValidator); | ||
| } | ||
|
|
||
| validateDepositAmountForUpdate(element, baseDataValidator); | ||
|
|
||
|
|
@@ -202,7 +204,9 @@ public void validateForRecurringDepositUpdate(final String json) { | |
|
|
||
| validateRecurringDepositUpdate(element, baseDataValidator); | ||
|
|
||
| validateChartsData(element, baseDataValidator); | ||
| if (fromApiJsonHelper.parameterExists(chartsParamName, element)) { | ||
| validateChartsData(element, baseDataValidator); | ||
| } | ||
|
|
||
| validateDepositAmountForUpdate(element, baseDataValidator); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -202,6 +202,7 @@ public Long handleFDAccountClosure(final FixedDepositAccount account, final Paym | |
| if (onClosureType == DepositAccountOnClosureType.REINVEST_PRINCIPAL_AND_INTEREST | ||
| || onClosureType == DepositAccountOnClosureType.REINVEST_PRINCIPAL_ONLY) { | ||
| ExternalId externalId = this.externalIdFactory.create(); | ||
| this.depositAccountAssembler.validateProductApplicationDate(closedDate, account.savingsProduct()); | ||
| FixedDepositAccount reinvestedDeposit = account.reInvest(account.getAccountBalance(), externalId); | ||
| this.depositAccountAssembler.assignSavingAccountHelpers(reinvestedDeposit); | ||
| reinvestedDeposit.updateMaturityDateAndAmountBeforeAccountActivation(mc, isPreMatureClosure, | ||
|
|
@@ -271,6 +272,7 @@ public Long handleFDAccountMaturityClosure(final FixedDepositAccount account, fi | |
| } | ||
| ExternalId externalId = this.externalIdFactory.create(); | ||
|
|
||
| this.depositAccountAssembler.validateProductApplicationDate(closedDate, account.savingsProduct()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe validations should occur as early as possible. Could we move this validator to be executed as one of the initial steps and only begin processing after it has successfully passed? |
||
| FixedDepositAccount reinvestedDeposit = account.reInvest(reInvestAmount, externalId); | ||
| this.depositAccountAssembler.assignSavingAccountHelpers(reinvestedDeposit); | ||
| reinvestedDeposit.updateMaturityDateAndAmountBeforeAccountActivation(mc, isPreMatureClosure, | ||
|
|
@@ -352,6 +354,7 @@ public Long handleRDAccountClosure(final RecurringDepositAccount account, final | |
| } else { | ||
| reInvestAmount = account.getAccountBalance(); | ||
| } | ||
| this.depositAccountAssembler.validateProductApplicationDate(closedDate, account.savingsProduct()); | ||
| RecurringDepositAccount reinvestedDeposit = account.reInvest(reInvestAmount); | ||
| depositAccountAssembler.assignSavingAccountHelpers(reinvestedDeposit); | ||
| this.savingsAccountRepository.save(reinvestedDeposit); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be BigDecimal