-
Notifications
You must be signed in to change notification settings - Fork 486
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
templates: de: improve parsing QualityHosting lines #422
base: master
Are you sure you want to change the base?
Conversation
rmilecki
commented
Oct 8, 2022
A single QualityHosting invoice position spans across multiple lines. For that reason it uses a very generic RegEx for middle lines: line: '^\s+(?P<desc>.+)$' That doesn't work well with multi-page invoices. It's because above RegEx matches page footer lines. That results in footer content getting extracted as invoice line "desc". Improve that situation by adding "last_line" RegEx matching position last line. That prevents parsing lines between last and first lines (e.g. footer content). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
So what do we do about this pull request? It received some minor cross-pull-request comment in the #417:
As If we need to test some corner cases - that can be done using custom templates & tests. I added support for such in the just-merged #414. |
I'd suggest we let this one sit here for a moment. Wen't trought the re lib docs. need some time to test and verify things. Will report back in #417 |
As in 417 mentioned. For this particular invoice we could make the lastline specific, (or either leave it very generic, like before this pr) As per your previous suggestion: (I quikly drafted this, it needs testing..) |
Used this version of thetemplate to check the code of #417.
@rmilecki Is it ok for you to use this version? |