-
Notifications
You must be signed in to change notification settings - Fork 617
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
Feature rework comdirect #3577
Feature rework comdirect #3577
Conversation
Closes #3553 Closes #3313 Closes #1131 https://forum.portfolio-performance.info/t/pdf-import-von-comdirect/1647/229 https://forum.portfolio-performance.info/t/pdf-import-von-comdirect/1647/236 https://forum.portfolio-performance.info/t/pdf-import-von-comdirect/1647/242 https://forum.portfolio-performance.info/t/pdf-import-von-comdirect/1647/254 https://forum.portfolio-performance.info/t/pdf-import-von-comdirect/1647/270 https://forum.portfolio-performance.info/t/pdf-import-von-comdirect/1647/276 https://forum.portfolio-performance.info/t/pdf-import-von-comdirect/1647/283 ComDirect provides two documents for the transaction. The security transaction and the taxes treatment. Both documents are provided as one PDF or as two PDFs. The security transaction includes the fees, but not the correct taxes and the taxes treatment includes all taxes (including withholding tax), but not all fees. Therefore, we use the documents based on their function and merge both documents, if possible, as one transaction. Always import the securities transaction and the taxes treatment for a correct transaction. Due to rounding differences, the correct gross amount is not always shown in the securities transaction.
Hi @nirus, please have a look at this commit: 4c23cef It is a commit on top of your pull request #3555. It addresses the issue that the exchange rate is stored permanently in the security. For one, this is polluting the XML. Furthermore, the current algorithm cannot handle if one import contains multiple such documents (as they override the exchange rate). This change does the following:
The only change in the test is that "failed" transactions (the ones that will never be imported), do not have a grossValue of 0 anymore. As you can see, I added a method #matchSaleAndTaxTransactions which creates a list of pairs of sale and tax transaction. The same list could later be used to merge the sale and tax where applicable. I changed it so that I have directly already typed objects. |
Hallo @buchen I modified your source code a bit so that I (sorry) understood it better when reading and added it to my pull request. As a side note: Thank you |
Yeah. I justed looked at the Targobank importer. The post processing looks very similar |
Closing because it is now included in your pull request |
No description provided.