Skip to content
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

feat: Adding operation type to transactionitem #170

Conversation

Kammerlo
Copy link
Member

@Kammerlo Kammerlo commented Feb 28, 2025

What is done in this PR:

  • Added an additional field to transactionItem -> CREDIT or DEBIT
  • Fixed the calucalation of amountLcy and amountFcy
  • Removed unused JournalTask (which is adjusting the amounts), since this is done by the ERP adapter
  • Refactored and removed the use of Lombok.val for better readability

@Kammerlo Kammerlo changed the title feat: first implementation feat: Adding operation type to transactionitem Feb 28, 2025
@Kammerlo Kammerlo marked this pull request as ready for review March 3, 2025 15:00
@Kammerlo Kammerlo self-assigned this Mar 3, 2025
@@ -44,4 +45,10 @@ public void run(TransactionEntity tx) {
}
}

private static BigDecimal getSumOfOperationType(Set<TransactionItemEntity> txItems, OperationType credit) {
return txItems.stream()
.filter(transactionItemEntity -> transactionItemEntity.getOperationType().equals(credit))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also do: == for enums

@@ -43,4 +44,12 @@ public void run(TransactionEntity tx) {
}
}

private static BigDecimal getSumOfFcy(Set<TransactionItemEntity> txItems, OperationType credit) {
return txItems.stream()
.filter(transactionItemEntity -> transactionItemEntity.getOperationType().equals(credit))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also do: == for enums

@Kammerlo Kammerlo merged commit a7782b5 into main Mar 6, 2025
5 checks passed
@Kammerlo Kammerlo deleted the feat/LOB-905-BE-Processing-and-Display-of-Journal-Transactions-revision branch March 6, 2025 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants