-
Notifications
You must be signed in to change notification settings - Fork 482
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
Support "priority" and add 2 templates for InsERT-software-generated invoices #416
Support "priority" and add 2 templates for InsERT-software-generated invoices #416
Conversation
rmilecki
commented
Oct 1, 2022
Thanks for this very interesting PR! Will need some time to test it. Just a thought.. Either way, being able to parse multiple invoices and minimize the writing write specific templates is a big plus. |
I'm happy to get a positive respose to this. Take your time to review / test this.
I think at loading templates takes the most time. This part doesn't get changed with this pull request. With this change Since you mentioned perfromance I think we should check why loading templates takes so much time. Is that file access or parsing YAML? Maybe we could optimize / cache? (Just a topic for another discussion) |
b0f6ce1
to
ab331d9
Compare
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.
I'm about to give this one a 👍 as tests are all green.
Please attend to comments if possible.
ab331d9
to
6257ec7
Compare
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.
"Fasttracking" this as getting the functionality is more of an priority then debating my detailed comments.
cae8c67
to
d99abc3
Compare
Made the same performance update as on the 'old code' in #470 |
btw, I run this trough the profiler. No noticable difference on the performance. |
d99abc3
to
948a82f
Compare
In case of multiple templates matching given invoice - choose the one with the highest "priority" value. To provide proper support for prioritizing AND existing templates (backward compatibility) the default value 5 is assumed in case "priority" property is missing. This feature can be used for writing more generic as well as more specific templates. So far all templates were assumed to be company-specific. With this change we can have: 1. Invoice-generating software specific templates 2. In-company varying templates This feature may be very useful for: 1. Countries with just few very popular accounting software applications 2. Big companies with multiple departments adding some invoice details Signed-off-by: Rafał Miłecki <[email protected]>
In case of multiple matches we only had an option to return a sum of numeric values. Add more functions. Signed-off-by: Rafał Miłecki <[email protected]>
InsERT is one of the most popular Polish accounting software company. They have two very common softwares: 1. Subiekt nexo 2. Subiekt GT Add 2 templates to parse invoices generated by above softwares. Those templates are software-specific so they have priority set to 3. This allows parsing a lot invoices issued in Poland. Signed-off-by: Rafał Miłecki <[email protected]>
948a82f
to
7ffe2ac
Compare
Just reverted the performance changes. As we are discussing them in #470. |