FINERACT-2455: Working Capital Loan Transaction - Goodwill Credit - Accounting#5837
Open
somasorosdpc wants to merge 2 commits into
Conversation
858cc25 to
11a1624
Compare
11a1624 to
6b93417
Compare
96efaf7 to
e68ed22
Compare
galovics
approved these changes
May 15, 2026
|
|
||
| private List<GetWorkingCapitalLoanTransactionIdResponse> findMatchingTransactions(Long loanId, String transactionType, | ||
| private TransactionType resolveTransactionType(String transactionType) { | ||
| return Arrays.stream(TransactionType.values()).filter(t -> t.name().equalsIgnoreCase(transactionType.replace(" ", "_"))).findFirst() |
Contributor
There was a problem hiding this comment.
I think we do not need an array and stream here, it could be simplified toTransactionType.valueOf(transactionType.toUpperCase().replace(' ', '_'))
oleksii-novikov-onix
suggested changes
May 15, 2026
e68ed22 to
0b9f17f
Compare
0b9f17f to
5b0c2f5
Compare
adamsaghy
reviewed
May 18, 2026
|
|
||
| @Override | ||
| public void postJournalEntriesForRepayment(final WorkingCapitalLoan loan, final WorkingCapitalLoanTransaction txn, | ||
| public void postJournalEntriesForRepaymentLikeTransaction(final WorkingCapitalLoan loan, final WorkingCapitalLoanTransaction txn, |
Contributor
There was a problem hiding this comment.
Would it make sense to rename this method to "postJournalEntries"?
adamsaghy
reviewed
May 18, 2026
| } else { | ||
| postRegularRepaymentEntries(office, productId, currencyCode, transactionDate, paymentTypeId, txn, principalPortion, feesPortion, | ||
| penaltiesPortion, overpaymentPortion); | ||
| if (LoanTransactionType.REPAYMENT.equals(txn.getTypeOf())) { |
Contributor
There was a problem hiding this comment.
Would it make sense use switch here instead and list all supported transaction type?
Would it make sense to throw error if unsupported transaction type is found?
adamsaghy
reviewed
May 18, 2026
| feesPortion, penaltiesPortion, overpaymentPortion); | ||
| } | ||
| } | ||
| if (LoanTransactionType.GOODWILL_CREDIT.equals(txn.getTypeOf()) && !isChargedOff) { |
Contributor
There was a problem hiding this comment.
Would it make sense to handle these use cases, similarly as above repayment does?
- Having condition whether need to create journal entries for non charged-off loan?
- Having condition whether need to create journal entries for charged-off loan? -> unsupported yet...
…ccounting - E2E tests Signed-off-by: Peter Kovacs <peter.kovacs@dpc.hu>
5b0c2f5 to
3d7c9ee
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.