Search in sources :

Example 46 with Block

use of name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block in project portfolio by buchen.

the class ComdirectPDFExtractor method addBuyTransaction.

@SuppressWarnings("nls")
private void addBuyTransaction() {
    DocumentType type = new DocumentType("Wertpapierkauf");
    this.addDocumentTyp(type);
    Block block = new Block("^(\\* )?Wertpapierkauf *.*");
    type.addBlock(block);
    Transaction<BuySellEntry> pdfTransaction = new Transaction<BuySellEntry>().subject(() -> {
        BuySellEntry entry = new BuySellEntry();
        entry.setType(PortfolioTransaction.Type.BUY);
        return entry;
    }).section(// 
    "date").match(// 
    "Geschäftstag *: (?<date>\\d+.\\d+.\\d{4}+) .*").assign((t, v) -> t.setDate(asDate(v.get("date")))).section("isin", "name", // 
    "wkn").find(// 
    "Wertpapier-Bezeichnung *WPKNR/ISIN *").match(// 
    "^(?<name>(\\S{1,} )*) *(?<wkn>\\S*) *$").match(// 
    "(\\S{1,} )* *(?<isin>\\S*) *$").assign((t, v) -> t.setSecurity(getOrCreateSecurity(v))).section("shares").optional().match(// 
    "^St\\. *(?<shares>[\\d.]+(,\\d+)?) .*").assign((t, v) -> t.setShares(asShares(v.get("shares")))).section("shares").optional().match(// 
    "^ Summe *St\\. *(?<shares>[\\d.]+(,\\d+)?) .*").assign((t, v) -> t.setShares(asShares(v.get("shares")))).section("amount", // 
    "currency").find(// 
    ".*Zu Ihren Lasten( vor Steuern)? *").match(// 
    ".* \\d+.\\d+.\\d{4}+ *(?<currency>\\w{3}+) *(?<amount>[\\d.]+,\\d+).*").assign((t, v) -> {
        t.setCurrencyCode(asCurrencyCode(v.get("currency")));
        t.setAmount(asAmount(v.get("amount")));
    }).section("tax").optional().match(// 
    "^a *b *g *e *f *ü *h *r *t *e *S *t *e *u *e *r *n *(?<tax>.*)$").assign((t, v) -> {
        Unit unit = createTaxUnit(v.get("tax"));
        if (unit == null || unit.getAmount().isZero())
            return;
        t.getPortfolioTransaction().addUnit(unit);
        MutableMoney total = MutableMoney.of(t.getPortfolioTransaction().getCurrencyCode());
        total.add(t.getPortfolioTransaction().getMonetaryAmount());
        total.add(unit.getAmount());
        t.setMonetaryAmount(total.toMoney());
    }).wrap(t -> {
        if (t.getPortfolioTransaction().getShares() == 0)
            throw new IllegalArgumentException(Messages.PDFMsgMissingShares);
        return new BuySellEntryItem(t);
    });
    addFeesSection(pdfTransaction);
    block.set(pdfTransaction);
    addTaxRefunds(type, "^(\\* )?Wertpapierkauf *.*");
}
Also used : PortfolioTransaction(name.abuchen.portfolio.model.PortfolioTransaction) Money(name.abuchen.portfolio.money.Money) Client(name.abuchen.portfolio.model.Client) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) IOException(java.io.IOException) Messages(name.abuchen.portfolio.Messages) MutableMoney(name.abuchen.portfolio.money.MutableMoney) Matcher(java.util.regex.Matcher) Transaction(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction) Unit(name.abuchen.portfolio.model.Transaction.Unit) BuySellEntry(name.abuchen.portfolio.model.BuySellEntry) Pattern(java.util.regex.Pattern) BuySellEntry(name.abuchen.portfolio.model.BuySellEntry) MutableMoney(name.abuchen.portfolio.money.MutableMoney) PortfolioTransaction(name.abuchen.portfolio.model.PortfolioTransaction) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) Transaction(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) Unit(name.abuchen.portfolio.model.Transaction.Unit)

Example 47 with Block

use of name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block in project portfolio by buchen.

the class ComdirectPDFExtractor method addDividendTransaction.

@SuppressWarnings("nls")
private void addDividendTransaction() {
    DocumentType dividende = new DocumentType("Abrechnung Dividendengutschrift");
    this.addDocumentTyp(dividende);
    DocumentType ertrag = new DocumentType("Abrechnung Ertragsgutschrift");
    this.addDocumentTyp(ertrag);
    Block block = new Block(".*G *u *t *s *c *h *r *i *f *t *f *ä *l *l *i *g *e *r *W *e *r *t *p *a *p *i *e *r *- *E *r *t *r *ä *g *e *");
    dividende.addBlock(block);
    ertrag.addBlock(block);
    block.set(new Transaction<AccountTransaction>().subject(() -> {
        AccountTransaction t = new AccountTransaction();
        t.setType(AccountTransaction.Type.DIVIDENDS);
        return t;
    }).section("wkn", "name", "isin", "shares").optional().match(// 
    "^\\s*(p\\s*e\\s*r) *\\+?[\\d .]+  (?<name>.*)      (?<wkn>.*)").match(// 
    "^\\s*(S\\s*T\\s*K) *(?<shares>\\+?[\\d .]+,\\+?[\\d ]+).*    .* {4}(?<isin>.*)$").assign((t, v) -> {
        v.put("isin", stripBlanks(v.get("isin")));
        v.put("wkn", stripBlanks(v.get("wkn")));
        t.setSecurity(getOrCreateSecurity(v));
        t.setShares(asShares(stripBlanks(v.get("shares"))));
    }).section("currency", "amount", // 
    "date").find(// 
    ".*Zu Ihren Gunsten vor Steuern *").match(// 
    "^.*(?<date>\\d{2}.\\d{2}.\\d{4}) *(?<currency>\\w{3}+) *(?<amount>[\\d.]+,\\d+) *$").assign((t, v) -> {
        t.setCurrencyCode(asCurrencyCode(v.get("currency")));
        t.setAmount(asAmount(v.get("amount")));
        t.setDateTime(asDate(v.get("date")));
    }).section("currency", // 
    "gross").optional().find("^Bruttobetrag: *(?<currency>\\w{3}+) *(?<gross>[\\d.]+,\\d+)").assign((t, v) -> {
        long gross = asAmount(v.get("gross"));
        long tax = gross - t.getAmount();
        Unit unit = new Unit(Unit.Type.TAX, Money.of(asCurrencyCode(v.get("currency")), tax));
        if (unit.getAmount().getCurrencyCode().equals(t.getCurrencyCode()))
            t.addUnit(unit);
    }).wrap(TransactionItem::new));
}
Also used : PortfolioTransaction(name.abuchen.portfolio.model.PortfolioTransaction) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) Transaction(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) Unit(name.abuchen.portfolio.model.Transaction.Unit)

Example 48 with Block

use of name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block in project portfolio by buchen.

the class ComdirectPDFExtractor method addTaxTransaction.

@SuppressWarnings("nls")
private void addTaxTransaction() {
    // TODO 1: combine with dividend-transaction of other file
    // TODO 2: not matched by buy/sell with taxes...
    // just char sequence
    DocumentType type = new DocumentType("Steuerliche Behandlung: Ausländische Dividende");
    // type.setMustExclude("Wertpapierkauf");
    this.addDocumentTyp(type);
    Block block = new Block("^\\s*Steuerliche Behandlung:.*");
    type.addBlock(block);
    block.set(new Transaction<AccountTransaction>().subject(() -> {
        AccountTransaction t = new AccountTransaction();
        t.setType(AccountTransaction.Type.TAXES);
        return t;
    }).section("wkn", "name", "isin", "shares").optional().match(// 
    "^(Stk.)\\W*(?<shares>\\d[\\d .,]*)(?<name>.*),\\W*(WKN / ISIN:)(?<wkn>.*)/(?<isin>.*)$").assign((t, v) -> {
        v.put("isin", stripBlanks(v.get("isin")));
        v.put("wkn", stripBlanks(v.get("wkn")));
        t.setSecurity(getOrCreateSecurity(v));
        t.setShares(asShares(stripBlanks(v.get("shares"))));
    }).section(// 
    "date").match(// 
    "^.*Die Gutschrift erfolgt mit Valuta\\s+(?<date>\\d{2}.\\d{2}.\\d{4}).*$").assign((t, v) -> {
        t.setDateTime(asDate(v.get("date")));
    }).section("tax", "currency").optional().match(// 
    "^\\s*(K\\s*a\\s*p\\s*i\\s*t\\s*a\\s*l\\s*e\\s*r\\s*t\\s*r\\s*a\\s*g\\s*s\\s*t\\s*e\\s*u\\s*e\\s*r)" + // 
    "(?<currency>[A-Z\\s]+)(?<tax>[\\d\\s,-]+)$").assign((t, v) -> {
        v.put("currency", stripBlanksAndUnderscores(v.get("currency")));
        v.put("tax", stripBlanksAndUnderscores(v.get("tax")));
        t.setCurrencyCode(asCurrencyCode(v.get("currency")));
        t.addUnit(new Unit(Unit.Type.TAX, Money.of(asCurrencyCode(v.get("currency")), asAmount(v.get("tax")))));
    }).section("tax", "currency").optional().match("^\\s*(K\\s*i\\s*r\\s*c\\s*h\\s*e\\s*n\\s*s\\s*t\\s*e\\s*u\\s*e\\s*r)" + "(?<currency>[A-Z\\s_]+)(?<tax>[\\d\\s,-_]+)$").assign((t, v) -> {
        v.put("currency", stripBlanksAndUnderscores(v.get("currency")));
        v.put("tax", stripBlanksAndUnderscores(v.get("tax")));
        t.addUnit(new Unit(Unit.Type.TAX, Money.of(asCurrencyCode(v.get("currency")), asAmount(v.get("tax")))));
    }).section("tax", "currency").optional().match("^\\s*(S\\s*o\\s*l\\s*i\\s*d\\s*a\\s*r\\s*i\\s*t\\s*ä\\s*t\\s*s\\s*z\\s*u\\s*s\\s*c\\s*h\\s*l\\s*a\\s*g)" + "(?<currency>[A-Z\\s_]+)(?<tax>[\\d\\s,-_]+)$").assign((t, v) -> {
        v.put("currency", stripBlanksAndUnderscores(v.get("currency")));
        v.put("tax", stripBlanksAndUnderscores(v.get("tax")));
        t.addUnit(new Unit(Unit.Type.TAX, Money.of(asCurrencyCode(v.get("currency")), asAmount(v.get("tax")))));
    }).section("tax", // abgeführte Steuern
    "currency").match("^\\s*(a\\s*b\\s*g\\s*e\\s*f\\s*ü\\s*h\\s*r\\s*t\\s*e\\s*S\\s*t\\s*e\\s*u\\s*er\\s*n)" + "(?<currency>[A-Z\\s_]+)(?<tax>[\\d\\s,-_]+)$").assign((t, v) -> {
        v.put("currency", stripBlanksAndUnderscores(v.get("currency")));
        v.put("tax", stripBlanksAndUnderscores(v.get("tax")));
        t.setCurrencyCode(asCurrencyCode(v.get("currency")));
        t.setAmount(asAmount(v.get("tax")));
    }).wrap(TransactionItem::new));
}
Also used : PortfolioTransaction(name.abuchen.portfolio.model.PortfolioTransaction) Money(name.abuchen.portfolio.money.Money) Client(name.abuchen.portfolio.model.Client) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) IOException(java.io.IOException) Messages(name.abuchen.portfolio.Messages) MutableMoney(name.abuchen.portfolio.money.MutableMoney) Matcher(java.util.regex.Matcher) Transaction(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction) Unit(name.abuchen.portfolio.model.Transaction.Unit) BuySellEntry(name.abuchen.portfolio.model.BuySellEntry) Pattern(java.util.regex.Pattern) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) Unit(name.abuchen.portfolio.model.Transaction.Unit)

Example 49 with Block

use of name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block in project portfolio by buchen.

the class ConsorsbankPDFExtractor method addQ42017DividendTransaction.

@SuppressWarnings("nls")
private void addQ42017DividendTransaction() {
    DocumentType type = new DocumentType("Dividendengutschrift");
    this.addDocumentTyp(type);
    Block block = new Block("Dividendengutschrift.*");
    type.addBlock(block);
    block.set(new Transaction<AccountTransaction>().subject(() -> {
        AccountTransaction t = new AccountTransaction();
        t.setType(AccountTransaction.Type.DIVIDENDS);
        return t;
    }).section("name", "wkn", "isin", // 
    "currency").find(// 
    "Wertpapierbezeichnung WKN ISIN").match(// 
    "(?<name>.*) (?<wkn>[^ ]*) (?<isin>[^ ]*)$").match("Dividende pro Stück ([\\d.]+,\\d+) (?<currency>\\w{3}+).*").assign((t, v) -> {
        t.setSecurity(getOrCreateSecurity(v));
    }).section("amount", // 
    "currency").match("Netto zugunsten IBAN (.*) (?<amount>[\\d.]+,\\d+) (?<currency>\\w{3}+)$").assign((t, v) -> {
        t.setCurrencyCode(asCurrencyCode(v.get("currency")));
        t.setAmount(asAmount(v.get("amount")));
    }).section(// 
    "shares").match(// 
    "(?<shares>[\\d.]+(,\\d+)?) Stück").assign((t, v) -> t.setShares(asShares(v.get("shares")))).section(// 
    "date").match("Valuta (?<date>\\d+.\\d+.\\d{4}+).*").assign((t, v) -> t.setDateTime(asDate(v.get("date")))).section("exchangeRate", "fxAmount", "fxCurrency", "amount", "currency").optional().match("Brutto in (\\w{3}+) (?<fxAmount>[\\d.]+,\\d+) (?<fxCurrency>\\w{3}+)").match(// 
    "Devisenkurs (?<exchangeRate>[\\d.]+,\\d+) (\\w{3}+) / (\\w{3}+)").match(// 
    "Brutto in (\\w{3}+) (?<amount>[\\d.]+,\\d+) (?<currency>\\w{3}+)").assign((t, v) -> {
        BigDecimal rate = asExchangeRate(v.get("exchangeRate"));
        BigDecimal inverseRate = BigDecimal.ONE.divide(rate, 10, BigDecimal.ROUND_HALF_DOWN);
        type.getCurrentContext().put("exchangeRate", inverseRate.toPlainString());
        Money fxAmount = Money.of(asCurrencyCode(v.get("fxCurrency")), asAmount(v.get("fxAmount")));
        Money amount = Money.of(asCurrencyCode(v.get("currency")), asAmount(v.get("amount")));
        if (!t.getCurrencyCode().equals(t.getSecurity().getCurrencyCode())) {
            Unit grossValue = new Unit(Unit.Type.GROSS_VALUE, amount, fxAmount, inverseRate);
            t.addUnit(grossValue);
        }
    }).section("tax", "currency").optional().match("abzgl. Quellensteuer .* (\\w{3}+) (?<tax>[\\d.]+,\\d+) (?<currency>\\w{3}+)").assign((t, v) -> {
        Money tax = Money.of(asCurrencyCode(v.get("currency")), asAmount(v.get("tax")));
        if (tax.getCurrencyCode().equals(t.getCurrencyCode())) {
            t.addUnit(new Unit(Unit.Type.TAX, tax));
        } else if (type.getCurrentContext().containsKey("exchangeRate")) {
            BigDecimal exchangeRate = new BigDecimal(type.getCurrentContext().get("exchangeRate"));
            Money txTax = Money.of(t.getCurrencyCode(), BigDecimal.valueOf(tax.getAmount()).multiply(exchangeRate).setScale(0, BigDecimal.ROUND_HALF_UP).longValue());
            t.addUnit(new Unit(Unit.Type.TAX, txTax));
            // update gross value if necessary
            if (!t.getCurrencyCode().equals(t.getSecurity().getCurrencyCode())) {
                Unit grossValue = t.getUnit(Unit.Type.GROSS_VALUE).get();
                t.removeUnit(grossValue);
                t.addUnit(new Unit(Unit.Type.GROSS_VALUE, grossValue.getAmount().subtract(txTax), grossValue.getForex().subtract(tax), grossValue.getExchangeRate()));
            }
        }
    }).section("tax", "currency").optional().match("abzgl. Kapitalertragsteuer .* (\\w{3}+) (?<tax>[\\d.]+,\\d+) (?<currency>\\w{3}+)$").assign((t, v) -> {
        Money tax = Money.of(asCurrencyCode(v.get("currency")), asAmount(v.get("tax")));
        t.addUnit(new Unit(Unit.Type.TAX, tax));
    }).section("tax", "currency").optional().match("abzgl. Solidaritätszuschlag .* (\\w{3}+) (?<tax>[\\d.]+,\\d+) (?<currency>\\w{3}+)$").assign((t, v) -> {
        Money tax = Money.of(asCurrencyCode(v.get("currency")), asAmount(v.get("tax")));
        t.addUnit(new Unit(Unit.Type.TAX, tax));
    }).wrap(t -> t.getAmount() != 0 ? new TransactionItem(t) : null));
}
Also used : PortfolioTransaction(name.abuchen.portfolio.model.PortfolioTransaction) Money(name.abuchen.portfolio.money.Money) Client(name.abuchen.portfolio.model.Client) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) CurrencyUnit(name.abuchen.portfolio.money.CurrencyUnit) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) Type(name.abuchen.portfolio.model.Transaction.Unit.Type) IOException(java.io.IOException) BigDecimal(java.math.BigDecimal) Transaction(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction) Unit(name.abuchen.portfolio.model.Transaction.Unit) Optional(java.util.Optional) BuySellEntry(name.abuchen.portfolio.model.BuySellEntry) RoundingMode(java.math.RoundingMode) Money(name.abuchen.portfolio.money.Money) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) CurrencyUnit(name.abuchen.portfolio.money.CurrencyUnit) Unit(name.abuchen.portfolio.model.Transaction.Unit) BigDecimal(java.math.BigDecimal)

Example 50 with Block

use of name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block in project portfolio by buchen.

the class ConsorsbankPDFExtractor method addPreemptiveBuyTransaction.

@SuppressWarnings("nls")
private void addPreemptiveBuyTransaction() {
    DocumentType type = new DocumentType("BEZUG");
    this.addDocumentTyp(type);
    Block block = new Block("^BEZUG AM .*$");
    type.addBlock(block);
    Transaction<BuySellEntry> pdfTransaction = new Transaction<>();
    block.set(pdfTransaction);
    pdfTransaction.subject(() -> {
        BuySellEntry entry = new BuySellEntry();
        entry.setType(PortfolioTransaction.Type.BUY);
        return entry;
    });
    // 
    pdfTransaction.section("wkn", "isin", "name", "currency").find(// 
    "(Wertpapier|Bezeichnung) WKN ISIN").match(// 
    "^(?<name>.*) (?<wkn>[^ ]*) (?<isin>[^ ]*)$").match("(Kurs|Preis pro Anteil) (\\d+,\\d+) (?<currency>\\w{3}+) .*").assign((t, v) -> t.setSecurity(getOrCreateSecurity(v))).section(// 
    "shares").find(// 
    "Einheit Umsatz( F\\Dlligkeit)?").match(// 
    "^ST (?<shares>[\\d.]+(,\\d+)?).*$").assign((t, v) -> t.setShares(asShares(v.get("shares")))).section("date", "amount", "currency").match(// 
    "Wert (?<date>\\d+.\\d+.\\d{4}+) (?<currency>\\w{3}+) (?<amount>[\\d.]+,\\d+)").assign((t, v) -> {
        t.setAmount(asAmount(v.get("amount")));
        t.setCurrencyCode(asCurrencyCode(v.get("currency")));
        t.setDate(asDate(v.get("date")));
    }).wrap(BuySellEntryItem::new);
    addFeesSectionsTransaction(pdfTransaction);
}
Also used : PortfolioTransaction(name.abuchen.portfolio.model.PortfolioTransaction) Money(name.abuchen.portfolio.money.Money) Client(name.abuchen.portfolio.model.Client) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) CurrencyUnit(name.abuchen.portfolio.money.CurrencyUnit) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) Type(name.abuchen.portfolio.model.Transaction.Unit.Type) IOException(java.io.IOException) BigDecimal(java.math.BigDecimal) Transaction(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction) Unit(name.abuchen.portfolio.model.Transaction.Unit) Optional(java.util.Optional) BuySellEntry(name.abuchen.portfolio.model.BuySellEntry) RoundingMode(java.math.RoundingMode) BuySellEntry(name.abuchen.portfolio.model.BuySellEntry) PortfolioTransaction(name.abuchen.portfolio.model.PortfolioTransaction) AccountTransaction(name.abuchen.portfolio.model.AccountTransaction) Transaction(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction) DocumentType(name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType) Block(name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block)

Aggregations

Block (name.abuchen.portfolio.datatransfer.pdf.PDFParser.Block)83 DocumentType (name.abuchen.portfolio.datatransfer.pdf.PDFParser.DocumentType)83 Transaction (name.abuchen.portfolio.datatransfer.pdf.PDFParser.Transaction)81 PortfolioTransaction (name.abuchen.portfolio.model.PortfolioTransaction)81 IOException (java.io.IOException)80 AccountTransaction (name.abuchen.portfolio.model.AccountTransaction)80 BuySellEntry (name.abuchen.portfolio.model.BuySellEntry)80 Client (name.abuchen.portfolio.model.Client)80 Unit (name.abuchen.portfolio.model.Transaction.Unit)79 Money (name.abuchen.portfolio.money.Money)78 Map (java.util.Map)58 Matcher (java.util.regex.Matcher)58 Pattern (java.util.regex.Pattern)58 BigDecimal (java.math.BigDecimal)42 Values (name.abuchen.portfolio.money.Values)16 BiConsumer (java.util.function.BiConsumer)9 MutableMoney (name.abuchen.portfolio.money.MutableMoney)7 RoundingMode (java.math.RoundingMode)6 Optional (java.util.Optional)5 Type (name.abuchen.portfolio.model.Transaction.Unit.Type)5