-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding support for Ginmon VL Sparen #4379
adding support for Ginmon VL Sparen #4379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hallo @christen90
I would prefer that we process “Ginmon” as a (new) separate PDF importer, as sub-companies tend to change/convert their software more often. We would then have the problem of always looping “Ginmon” into a fixed importer.
It should be relatively easy to separate this.
Regards
Alex
Block BuySellBlock = new Block( | ||
"^([\\d]{2}\\.[\\d]{2}\\.) ([\\d]{2}\\.[\\d]{2}\\.) (Wertpapierverkauf|Wertpapierkauf) ([\\.,\\d]+)[\\+\\-]$"); | ||
type.addBlock(BuySellBlock); | ||
BuySellBlock.set(new Transaction<BuySellEntry>() | ||
|
||
.subject(() -> { | ||
BuySellEntry portfolioTransaction = new BuySellEntry(); | ||
portfolioTransaction.setType(PortfolioTransaction.Type.BUY); | ||
return portfolioTransaction; | ||
}) | ||
|
||
.section("amount", "date", "isin", "shares", "type") // | ||
.documentContext("currency", "year") // | ||
.match("^([\\d]{2}\\.[\\d]{2}\\.) (?<date>[\\d]{2}\\.[\\d]{2}\\.) (?<type>Wertpapierverkauf|Wertpapierkauf) (?<amount>[\\.,\\d]+)[\\+\\-]$") // | ||
.match("^.* (?<isin>[A-Z]{2}[A-Z0-9]{9}[0-9])\\* +(?<shares>[\\.,\\d]+)$") // | ||
.assign((t, v) -> { | ||
if ("Wertpapierverkauf".equals(v.get("type"))) | ||
t.setType(PortfolioTransaction.Type.SELL); | ||
t.setSecurity(getOrCreateSecurity(v)); | ||
t.setDate(asDate(v.get("date") + v.get("year"))); | ||
t.setCurrencyCode(v.get("currency")); | ||
t.setShares(asShares(v.get("shares"))); | ||
t.setAmount(asAmount(v.get("amount"))); | ||
v.getTransactionContext().put(FAILURE, | ||
Messages.MsgErrorTransactionAlternativeDocumentRequired); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you know 😉, we do not import securities bookings via account statements. In your example, you have already shown via Kauf14.txt that there are separate statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow they generate account statements with buys only. To have a better error message I tried it this way. Tagging it as non importable.
Currently the only Ginmon specific document is the invoice. And this will be marked as non importable. You mean that this one shall be moved to a new importer? Best regards Christian |
Hello @christen90
Yes, all documents created by “Ginmon Vermögensverwaltung GmbH”.
The way I see it, they all are. Except Verkauf14.txt is apparently a regular member of the DAB Group.
As a hint... if there are problems with the DAB, simply lock the document: PDFParser.java-->"mustNotInclude"
Regards |
I moved the invoice to a new importer. Please see a picture of pdf document (reference Kontoumsaetze09.txt - example for all account statements I provided with this PR) and confirm if you really would treat them as Ginmon documents instead of DAB. For me Ginmon is just mentioned in the addressfield but I understand Ginmon not as the publisher of PDF. |
Add new Ginmon PDF-Importer
Hello @christen90 For the Gimnon fee statement, we use the Gimnon statement document directly and not the account statement. I have also tidied up the DAB a bit. Regards |
Account Statements
Buys
Sells
Fees
Non Importables