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

fix: import transaction number empty #88

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.core.SystemExtractionParameters;
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.core.Transaction;
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.core.UserExtractionParameters;
import org.javers.common.collections.Arrays;

import java.sql.Array;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Set;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -48,8 +51,8 @@ public Set<Transaction> applyExtractionParameters(Set<Transaction> txs,
return txTypes.isEmpty() || txTypes.contains(tx.getTransactionType());
})
.filter(tx -> {
val transactionNumbers = userExtractionParameters.getTransactionNumbers();

val transactionNumbers = new ArrayList<>(userExtractionParameters.getTransactionNumbers());
transactionNumbers.removeIf(String::isEmpty);
return transactionNumbers.isEmpty() || transactionNumbers.contains(tx.getInternalTransactionNumber());
})
.collect(Collectors.toSet());
Expand Down
Loading