system workflow templates do not respect the selected pdf format anymore
I have noticed that system workflow templates no longer respect the formats.
pdf formats can be configured via communication > pdf formats. In my case there are 2 pdf formats (and the default_invoice_pdf_format came together with an update probably a few months ago):
When I edit a system workflow template and choose - Standard - or DIN A4 it still chooses the default_invoice_pdf_format.
It is hardcoded in the code as you can see here: https://lab.civicrm.org/dev/core/-/blob/master/CRM/Contribute/Form/Task/Invoice.php (line 236). I do not know why this has been implemented. There might be a reason for it. But it seems like a bug for me.
If I choose - Standard - in the system workflow templates I expect that this format will be choosed. Such a change (without notice) could also led to major problems when sending invoices automatically.
Workaround for us for now was to change the default_invoice_pdf_format to the same values as our standard format.
(noticed on CiviCRM version 5.56.2)