FINERACT-1724: Fix NPE issues + Incorrect arguments to mysqld_stmt_bulk_execute

This commit is contained in:
Adam Saghy
2022-12-16 14:20:52 +01:00
committed by Arnold Gálovics
parent 4d5dce0309
commit 70f2783508
3 changed files with 7 additions and 2 deletions
@@ -489,7 +489,8 @@ public class SavingsAccountInterestPostingServiceImpl implements SavingsAccountI
private boolean createWithHoldTransaction(final BigDecimal amount, final LocalDate date, final SavingsAccountData savingsAccountData) {
boolean isTaxAdded = false;
if (savingsAccountData.getTaxGroup() != null && amount.compareTo(BigDecimal.ZERO) > 0) {
if (savingsAccountData.getTaxGroup() != null && savingsAccountData.getTaxGroup().getTaxAssociations() != null
&& amount.compareTo(BigDecimal.ZERO) > 0) {
Map<TaxComponentData, BigDecimal> taxSplit = TaxUtils.splitTaxData(amount, date,
savingsAccountData.getTaxGroup().getTaxAssociations().stream().collect(Collectors.toSet()), amount.scale());
BigDecimal totalTax = TaxUtils.totalTaxDataAmount(taxSplit);