diff --git a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bondoracapital/BondoraCapitalPDFExtractorTest.java b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bondoracapital/BondoraCapitalPDFExtractorTest.java index 909003fc2e..7e47d99997 100644 --- a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bondoracapital/BondoraCapitalPDFExtractorTest.java +++ b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bondoracapital/BondoraCapitalPDFExtractorTest.java @@ -6,10 +6,12 @@ import java.time.LocalDateTime; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import org.junit.Test; +import name.abuchen.portfolio.datatransfer.Extractor; import name.abuchen.portfolio.datatransfer.Extractor.Item; import name.abuchen.portfolio.datatransfer.Extractor.TransactionItem; import name.abuchen.portfolio.datatransfer.actions.AssertImportActions; @@ -18,7 +20,6 @@ import name.abuchen.portfolio.model.AccountTransaction; import name.abuchen.portfolio.model.Client; import name.abuchen.portfolio.money.CurrencyUnit; -import name.abuchen.portfolio.money.Money; import name.abuchen.portfolio.money.Values; @SuppressWarnings("nls") @@ -37,38 +38,53 @@ public void testKontoauszug01() assertThat(results.size(), is(211)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check deposit - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-01-15T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug01.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(100.00)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(209) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-08-06T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug01.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.31)))); - - // check removal - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(210) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.REMOVAL)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-08-07T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug01.txt")); - assertThat(transaction.getNote(), is("Abheben")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(203.00)))); + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(211L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-01-15T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(100.00))); + assertThat(transaction.getSource(), is("Kontoauszug01.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + iter = results.stream().filter(TransactionItem.class::isInstance).skip(1).iterator(); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-01-16T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.02))); + assertThat(transaction.getSource(), is("Kontoauszug01.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + iter = results.stream().filter(TransactionItem.class::isInstance).skip(210).iterator(); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.REMOVAL)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-08-07T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(203.00))); + assertThat(transaction.getSource(), is("Kontoauszug01.txt")); + assertThat(transaction.getNote(), is("Abheben")); + } } @Test @@ -84,37 +100,65 @@ public void testKontoauszug02() assertThat(results.size(), is(4)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check deposit - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-04T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug02.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(200.00)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-05T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug02.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.04)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(2) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-06T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug02.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.03)))); + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(4L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-04T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(200.00))); + assertThat(transaction.getSource(), is("Kontoauszug02.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-05T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.04))); + assertThat(transaction.getSource(), is("Kontoauszug02.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-06T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.03))); + assertThat(transaction.getSource(), is("Kontoauszug02.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-07T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.04))); + assertThat(transaction.getSource(), is("Kontoauszug02.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } } @Test @@ -130,39 +174,51 @@ public void testKontoauszug03() assertThat(results.size(), is(3)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check interest - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-25T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug03.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(1.00)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-26T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug03.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(1.01)))); - - // check deposit - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(2) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-02T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug03.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(300.00)))); - + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(3L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-25T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(1.00))); + assertThat(transaction.getSource(), is("Kontoauszug03.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-26T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(1.01))); + assertThat(transaction.getSource(), is("Kontoauszug03.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-02T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(300.00))); + assertThat(transaction.getSource(), is("Kontoauszug03.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } } @Test @@ -178,38 +234,65 @@ public void testKontoauszug04() assertThat(results.size(), is(4)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check interest - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-18T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug04.txt")); - assertThat(transaction.getNote(), is("Go & Grow returns")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.31)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-19T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug04.txt")); - assertThat(transaction.getNote(), is("Go & Grow returns")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.30)))); - - // check removal - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(2) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.REMOVAL)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-20T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug04.txt")); - assertThat(transaction.getNote(), is("Withdrawal")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(1.00)))); - + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(4L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-18T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.31))); + assertThat(transaction.getSource(), is("Kontoauszug04.txt")); + assertThat(transaction.getNote(), is("Go & Grow returns")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-19T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.30))); + assertThat(transaction.getSource(), is("Kontoauszug04.txt")); + assertThat(transaction.getNote(), is("Go & Grow returns")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.REMOVAL)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-20T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(1.00))); + assertThat(transaction.getSource(), is("Kontoauszug04.txt")); + assertThat(transaction.getNote(), is("Withdrawal")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-11-20T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.10))); + assertThat(transaction.getSource(), is("Kontoauszug04.txt")); + assertThat(transaction.getNote(), is("Go & Grow returns")); + } } @Test @@ -225,24 +308,51 @@ public void testKontoauszug05() assertThat(results.size(), is(3)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check interest - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-07T00:00"))); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(1500)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-08T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug05.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.27)))); + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(3L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-07T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(1500.00))); + assertThat(transaction.getSource(), is("Kontoauszug05.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-08T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.27))); + assertThat(transaction.getSource(), is("Kontoauszug05.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-09-09T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.27))); + assertThat(transaction.getSource(), is("Kontoauszug05.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } } @Test @@ -258,49 +368,65 @@ public void testKontoauszug06() assertThat(results.size(), is(4)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check deposit - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-05T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug06.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(25)))); - - // check deposit - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-06T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug06.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(4.91)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(2) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-06T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug06.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.02)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(3) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-31T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug06.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.06)))); + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(4L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-05T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(25.00))); + assertThat(transaction.getSource(), is("Kontoauszug06.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-06T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(4.91))); + assertThat(transaction.getSource(), is("Kontoauszug06.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-06T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.02))); + assertThat(transaction.getSource(), is("Kontoauszug06.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2020-10-31T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.06))); + assertThat(transaction.getSource(), is("Kontoauszug06.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } } @Test @@ -316,38 +442,51 @@ public void testKontoauszug07() assertThat(results.size(), is(3)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check deposit - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2021-12-25T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug07.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(5.00)))); - - // check deposit - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2021-12-27T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug07.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(15.00)))); - - // check deposit - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(2) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2021-12-27T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug07.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(980.00)))); + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(3L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2021-12-25T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(5.00))); + assertThat(transaction.getSource(), is("Kontoauszug07.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2021-12-27T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(15.00))); + assertThat(transaction.getSource(), is("Kontoauszug07.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2021-12-27T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(980.00))); + assertThat(transaction.getSource(), is("Kontoauszug07.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } } @Test @@ -363,180 +502,51 @@ public void testKontoauszug08() assertThat(results.size(), is(16)); new AssertImportActions().check(results, CurrencyUnit.EUR); - // check interest - AccountTransaction transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-01-29T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(1) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-01-30T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(2) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-01-31T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(3) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-01T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(4) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-02T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(5) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-03T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(6) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-04T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(7) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-05T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(8) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-06T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check deposit - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(9) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-07T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Überweisen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(1000.00)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(10) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-07T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.22)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(11) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-08T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.40)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(12) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-09T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.39)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(13) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-10T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.40)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(14) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-11T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.40)))); - - // check interest - transaction = (AccountTransaction) results.stream().filter(TransactionItem.class::isInstance).skip(15) - .findFirst().orElseThrow(IllegalArgumentException::new).getSubject(); - - assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); - - assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-12T00:00"))); - assertThat(transaction.getSource(), is("Kontoauszug08.txt")); - assertThat(transaction.getNote(), is("Go & Grow Zinsen")); - assertThat(transaction.getMonetaryAmount(), is(Money.of(CurrencyUnit.EUR, Values.Amount.factorize(0.40)))); + // check transaction + // get transactions + Iterator iter = results.stream().filter(TransactionItem.class::isInstance).iterator(); + assertThat(results.stream().filter(TransactionItem.class::isInstance).count(), is(16L)); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-01-29T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.22))); + assertThat(transaction.getSource(), is("Kontoauszug08.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } + + iter = results.stream().filter(TransactionItem.class::isInstance).skip(9).iterator(); + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.DEPOSIT)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-07T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(1000.00))); + assertThat(transaction.getSource(), is("Kontoauszug08.txt")); + assertThat(transaction.getNote(), is("Überweisen")); + } + + if (iter.hasNext()) + { + Item item = iter.next(); + + // assert transaction + AccountTransaction transaction = (AccountTransaction) item.getSubject(); + assertThat(transaction.getType(), is(AccountTransaction.Type.INTEREST)); + assertThat(transaction.getCurrencyCode(), is(CurrencyUnit.EUR)); + assertThat(transaction.getDateTime(), is(LocalDateTime.parse("2022-02-07T00:00"))); + assertThat(transaction.getAmount(), is(Values.Amount.factorize(0.22))); + assertThat(transaction.getSource(), is("Kontoauszug08.txt")); + assertThat(transaction.getNote(), is("Go & Grow Zinsen")); + } } } diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BondoraCapitalPDFExtractor.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BondoraCapitalPDFExtractor.java index 0a34166c1e..37903038d5 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BondoraCapitalPDFExtractor.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BondoraCapitalPDFExtractor.java @@ -13,14 +13,6 @@ @SuppressWarnings("nls") public class BondoraCapitalPDFExtractor extends AbstractPDFExtractor { - static String ACCOUNT_STATEMENT_TRANSACTION_REGEX = "^(?[\\d]{2}.[\\d]{2}.[\\d]{4}|[\\d]{4}.[\\d]{2}.[\\d]{2}) " - + "(?[^\\p{Sc}\\d]*)" - + "([\\D\\s]*)?" - + "(?[\\.',\\d\\s]+)" - + "([\\D\\s]*)?" - + "[\\.',\\d\\s]+" - + "([\\D\\s]*)?$"; - public BondoraCapitalPDFExtractor(Client client) { super(client); @@ -42,7 +34,7 @@ private void addAccountStatementTransaction() final DocumentType type = new DocumentType("(Zusammenfassung|Summary)"); this.addDocumentTyp(type); - Block block = new Block(ACCOUNT_STATEMENT_TRANSACTION_REGEX); + Block block = new Block("^([\\d]{2}.[\\d]{2}.[\\d]{4}|[\\d]{4}.[\\d]{2}.[\\d]{2}) .*$"); type.addBlock(block); Transaction pdfTransaction = new Transaction<>(); @@ -55,7 +47,16 @@ private void addAccountStatementTransaction() block.set(pdfTransaction); pdfTransaction .section("date", "note", "amount") - .match(ACCOUNT_STATEMENT_TRANSACTION_REGEX) + .match("^(?([\\d]{2}.[\\d]{2}.[\\d]{4}|[\\d]{4}.[\\d]{2}.[\\d]{2})) " + + "(?(.berweisen|" + + "Transfer|" + + "Abheben|" + + "Go & Grow Zinsen|" + + "Go & Grow returns|" + + "Withdrawal)) " + + "(\\p{Sc})?(\\W)?" + + "(?[\\.,'\\d\\s]+)" + + "(\\W)?(\\p{Sc})(\\W)?[\\.,'\\d\\s]+(\\W)?(\\p{Sc})?$") .assign((t, v) -> { t.setDateTime(asDate(v.get("date"))); t.setAmount(asAmount(v.get("amount"))); @@ -93,7 +94,7 @@ private void addAccountStatementTransaction() @Override protected long asAmount(String value) { - value = value.trim().replaceAll("\\s", ""); //$NON-NLS-1$//$NON-NLS-2$ + value = value.trim().replaceAll("\\s", ""); //$NON-NLS-1$//$NON-NLS-2$ String language = "de"; //$NON-NLS-1$ String country = "DE"; //$NON-NLS-1$