- 🇦🇹Austria mvonfrie
Or write an post update hook which loops over all invoices and if they have a PDF generated, moves the file and updates the file entity accordingly.
- 🇮🇱Israel jsacksick
What about defining an invoice type config setting "invoice type file path" relative to private files folder. Then the logic could get the path and look there if the file exists already. Then the rest of the logic could get in action.
Why not, perhaps directory path? It should be made clear that the directory set is relative to the private directory.
@dercheffe: feel free to work on this if you're able to :).
- 🇮🇱Israel jsacksick
My concern from #3 is still valid so I wonder how we could mitigate that... I don't think looping over invoices is an acceptable solution for sites with a large number of invoices... And I don't think this is desirable either.
Maybe we add a descriptive text explaining the potential issues when updating the directory?
- 🇩🇪Germany dercheffe Sersheim, Germany
Yes, the descriptive text is not a bad solution. Perhaps additionally there could be a checkbox for triggering for the file movement to the new path per invoice type at own risk, when saving the config with a (new) sub directory path.
- Merge request !21Issue #3099417 by jsacksick: Opportunity to save the invoices in a subdirectory under private. → (Merged) created by jsacksick
- 🇮🇱Israel jsacksick
Ok, here's a first attempt at this... This would deserve new tests, but don't really have the time to write them atm...
-
jsacksick →
committed 2b167e0e on 8.x-2.x
Issue #3099417 by jsacksick, dercheffe: Opportunity to save the invoices...
-
jsacksick →
committed 2b167e0e on 8.x-2.x