FINERACT-2455: WC - Transaction Type - Repayment#5760
Draft
mariiaKraievska wants to merge 1 commit intoapache:developfrom
Draft
FINERACT-2455: WC - Transaction Type - Repayment#5760mariiaKraievska wants to merge 1 commit intoapache:developfrom
mariiaKraievska wants to merge 1 commit intoapache:developfrom
Conversation
Contributor
|
@mariiaKraievska please rebase |
efa67c2 to
fed79a3
Compare
galovics
approved these changes
Apr 13, 2026
3cb9188 to
3002a02
Compare
budaidev
reviewed
Apr 13, 2026
| final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors) | ||
| .resource(WorkingCapitalLoanConstants.RESOURCE_NAME); | ||
|
|
||
| final LocalDate transactionDate = this.fromApiJsonHelper.parameterHasValue(WorkingCapitalLoanConstants.transactionDateParamName, |
Contributor
There was a problem hiding this comment.
Do we actually want to use the actualDisbursementDate for fallback, instead of the transcationDate parameter? Is it really the same?
Contributor
Author
There was a problem hiding this comment.
Thank you 👍 I removed the fallback. For WCL repayment we now accept only transactionDate.
3002a02 to
dee3550
Compare
| BigDecimal result = BigDecimal.ZERO; | ||
| for (ProjectedPayment payment : model.payments()) { | ||
| if (payment.paymentNo() > 0 && payment.npvValue() != null && payment.npvValue().getAmount() != null) { | ||
| result = result.add(Objects.requireNonNullElse(payment.npvValue().getAmount(), BigDecimal.ZERO), mc); |
Contributor
There was a problem hiding this comment.
Objects.requireNonNullElse(payment.npvValue().getAmount(), BigDecimal.ZERO) is redundant, the if guard above already ensures getAmount() != null
Contributor
There was a problem hiding this comment.
Simplify to result = result.add(payment.npvValue().getAmount(), mc)
51ecea1 to
7969bb6
Compare
7969bb6 to
13b494c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.