@@ -29,7 +29,7 @@ public String getLabel()
2929
3030 private void addAccountStatementTransaction ()
3131 {
32- final DocumentType type = new DocumentType ("akf bank" , //
32+ final var type = new DocumentType ("akf bank" , //
3333 documentContext -> documentContext //
3434 // @formatter:off
3535 // Nr. Valuta / Buchungstag Buchungstext EUR
@@ -44,7 +44,7 @@ private void addAccountStatementTransaction()
4444 // 01 08.04.2011 / 08.04.2011 Gutschrift 29.000,12
4545 // 01 16.08.2022 / 16.08.2022 SEPA Gutschrift Bank 755,00
4646 // @formatter:on
47- Block depositBlock = new Block ("^[\\ d]{2} [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} (Gutschrift|SEPA Gutschrift( Bank)?) .*$" );
47+ var depositBlock = new Block ("^[\\ d]{2} [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} (Gutschrift|SEPA Gutschrift( Bank)?) .*$" );
4848 type .addBlock (depositBlock );
4949 depositBlock .set (new Transaction <AccountTransaction >()
5050
@@ -72,10 +72,10 @@ private void addAccountStatementTransaction()
7272 // 01 14.11.2012 / 14.11.2012 Einzelüberweisung -5,00
7373 // Gebühren für Nachbe-
7474 // @formatter:on
75- Block removalBlock = new Block ("^[\\ d]{2} [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} "
76- + "(Einzel)?(.*berweisung.*"
77- + "|Festgeld Anlage"
78- + "|Sparkonto K.ndigung) \\ -[\\ .,\\ d]+$" );
75+ var removalBlock = new Block ("^[\\ d]{2} [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} " //
76+ + "(Einzel)?(.*berweisung.*" //
77+ + "|Festgeld Anlage" //
78+ + "|Sparkonto K.ndigung) \\ -[\\ .,\\ d]+$" ); //
7979 type .addBlock (removalBlock );
8080 removalBlock .setMaxSize (2 );
8181 removalBlock .set (new Transaction <AccountTransaction >()
@@ -89,7 +89,7 @@ private void addAccountStatementTransaction()
8989 + "|Festgeld Anlage" //
9090 + "|Sparkonto K.ndigung)) " //
9191 + "\\ -(?<amount>[\\ .,\\ d]+)$" ) //
92- .match ("^(?<type>[^\\ s]+).*$" )
92+ .match ("^(?<type>[^\\ s]+).*$" ) //
9393 .assign ((t , v ) -> {
9494 // @formatter:off
9595 // Is type is "Gebühren" change from REMOVAL to FEES
@@ -105,7 +105,7 @@ private void addAccountStatementTransaction()
105105
106106 .wrap (TransactionItem ::new ));
107107
108- Block interestBlock = new Block ("^[\\ d]{2} [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} Kontoabschlu. [\\ .,\\ d]+$" );
108+ var interestBlock = new Block ("^[\\ d]{2} [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} Kontoabschlu. [\\ .,\\ d]+$" );
109109 type .addBlock (interestBlock );
110110 interestBlock .set (new Transaction <AccountTransaction >()
111111
@@ -121,7 +121,7 @@ private void addAccountStatementTransaction()
121121 .documentContext ("currency" ) //
122122 .match ("^[\\ d]{2} (?<date>[\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4}) \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} Kontoabschlu. (?<amount>[\\ .,\\ d]+)$" ) //
123123 .match ("^v\\ . (?<note1>[\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4}) b\\ . (?<note2>[\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4}).*$" ) //
124- .match ("^Zinsen zu[\\ s]{1,}(?<note3>[\\ .,\\ d]+).*$" )
124+ .match ("^Zinsen zu[\\ s]{1,}(?<note3>[\\ .,\\ d]+).*$" ) //
125125 .assign ((t , v ) -> {
126126 t .setDateTime (asDate (v .get ("date" )));
127127 t .setAmount (asAmount (v .get ("amount" )));
@@ -138,7 +138,7 @@ private void addAccountStatementTransaction()
138138 .match ("^[\\ d]{2} [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} Kontoabschlu. \\ -(?<tax>[\\ .,\\ d]+)$" ) //
139139 .match ("^Abgeltungssteuer.*$" ) //
140140 .assign ((t , v ) -> {
141- Money tax = Money .of (v .get ("currency" ), asAmount (v .get ("tax" )));
141+ var tax = Money .of (v .get ("currency" ), asAmount (v .get ("tax" )));
142142 t .addUnit (new Unit (Unit .Type .TAX , tax ));
143143
144144 t .setMonetaryAmount (t .getMonetaryAmount ().subtract (tax ));
@@ -154,7 +154,7 @@ private void addAccountStatementTransaction()
154154 .match ("^[\\ d]{2} (?<date>[\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4}) \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} Kontoabschlu. \\ -(?<tax>[\\ .,\\ d]+)$" ) //
155155 .match ("^Solidarit.tszuschlag.*$" ) //
156156 .assign ((t , v ) -> {
157- Money tax = Money .of (v .get ("currency" ), asAmount (v .get ("tax" )));
157+ var tax = Money .of (v .get ("currency" ), asAmount (v .get ("tax" )));
158158 t .addUnit (new Unit (Unit .Type .TAX , tax ));
159159
160160 t .setMonetaryAmount (t .getMonetaryAmount ().subtract (tax ));
@@ -170,7 +170,7 @@ private void addAccountStatementTransaction()
170170 .match ("^[\\ d]{2} (?<date>[\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4}) \\ / [\\ d]{2}\\ .[\\ d]{2}\\ .[\\ d]{4} Kontoabschlu. \\ -(?<tax>[\\ .,\\ d]+)$" ) //
171171 .match ("^Kirchensteuer.*$" ) //
172172 .assign ((t , v ) -> {
173- Money tax = Money .of (v .get ("currency" ), asAmount (v .get ("tax" )));
173+ var tax = Money .of (v .get ("currency" ), asAmount (v .get ("tax" )));
174174 t .addUnit (new Unit (Unit .Type .TAX , tax ));
175175
176176 t .setMonetaryAmount (t .getMonetaryAmount ().subtract (tax ));
0 commit comments