From aad4bb40e30e30a230546c2eb333e0806f0f0d84 Mon Sep 17 00:00:00 2001 From: Daniel Klepatsch Date: Wed, 27 Mar 2024 22:11:07 +0100 Subject: [PATCH 1/2] Modify Bigbank testcase to include cent amounts --- .../pdf/bigbank/BigbankPDFExtractorTest.java | 6 +++--- .../datatransfer/pdf/bigbank/Kontoauszug01.txt | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/BigbankPDFExtractorTest.java b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/BigbankPDFExtractorTest.java index dfb80bdc52..8e6270241c 100644 --- a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/BigbankPDFExtractorTest.java +++ b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/BigbankPDFExtractorTest.java @@ -46,15 +46,15 @@ public void testKontoauszug01() new AssertImportActions().check(results, CurrencyUnit.EUR); // assert transaction - assertThat(results, hasItem(deposit(hasDate("2024-03-20"), hasAmount("EUR", 10.00), // + assertThat(results, hasItem(deposit(hasDate("2024-03-20"), hasAmount("EUR", 10.12), // hasSource("Kontoauszug01.txt"), hasNote(null)))); // assert transaction - assertThat(results, hasItem(deposit(hasDate("2024-03-21"), hasAmount("EUR", 1500.00), // + assertThat(results, hasItem(deposit(hasDate("2024-03-21"), hasAmount("EUR", 1500.34), // hasSource("Kontoauszug01.txt"), hasNote(null)))); // assert transaction - assertThat(results, hasItem(removal(hasDate("2024-03-25"), hasAmount("EUR", 10.00), // + assertThat(results, hasItem(removal(hasDate("2024-03-25"), hasAmount("EUR", 10.12), // hasSource("Kontoauszug01.txt"), hasNote(null)))); } } diff --git a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/Kontoauszug01.txt b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/Kontoauszug01.txt index 5fd2855c92..5525d60791 100644 --- a/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/Kontoauszug01.txt +++ b/name.abuchen.portfolio.tests/src/name/abuchen/portfolio/datatransfer/pdf/bigbank/Kontoauszug01.txt @@ -12,14 +12,14 @@ Kontoauszug von 01.03.2024 bis 25.03.2024 IBAN: EE123456789101112131 Anfangssaldo 01.03.2024 0,00 Datum Gegenkonto Buchung Name Betrag in EUR -20.03.2024 AT123456789101112131 Einzahlung ffIpWotyu dJMdyU +10,00 -21.03.2024 AT123456789101112131 Einzahlung oDkoRVZEb TxDUxE +1 500,00 -25.03.2024 AT123456789101112131 Auszahlung sUBHAKqzf vNNKxT -10,00 +20.03.2024 AT123456789101112131 Einzahlung ffIpWotyu dJMdyU +10,12 +21.03.2024 AT123456789101112131 Einzahlung oDkoRVZEb TxDUxE +1 500,34 +25.03.2024 AT123456789101112131 Auszahlung sUBHAKqzf vNNKxT -10,12 Endsaldo 25.03.2024 1 500,00 Anfangssaldo 01.03.2024 0,00 -Summe Belastungen -10,00 -Summe Gutschriften +1 510,00 -Endsaldo 25.03.2024 1 500,00 +Summe Belastungen -10,12 +Summe Gutschriften +1 510,46 +Endsaldo 25.03.2024 1 500,34 Dies ist ein automatisch generierter Kontoauszug. BIGBANK AS Telefon 0810 900 629 Riia 2, Tartu E-mail kundenservice@bigbank.at From be8e1438bcb37287b43d68b1e66a597c6d9fef41 Mon Sep 17 00:00:00 2001 From: Daniel Klepatsch Date: Wed, 27 Mar 2024 22:11:39 +0100 Subject: [PATCH 2/2] Fix Bigbank PDF importer Bigbank uses Estonian number format in their account transactions statement, namley a comma for decimal separation. Therefore amounts need to be parsed with the correct language code, and de_CH would have ignored decimal places. --- .../abuchen/portfolio/datatransfer/pdf/BigbankPDFExtractor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BigbankPDFExtractor.java b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BigbankPDFExtractor.java index 43503c4b39..b3af718fda 100644 --- a/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BigbankPDFExtractor.java +++ b/name.abuchen.portfolio/src/name/abuchen/portfolio/datatransfer/pdf/BigbankPDFExtractor.java @@ -92,6 +92,6 @@ private void addAccountStatementTransaction() @Override protected long asAmount(String value) { - return ExtractorUtils.convertToNumberLong(value, Values.Amount, "de", "CH"); + return ExtractorUtils.convertToNumberLong(value, Values.Amount, "et", "EE"); } }