Closed jpardenoy closed 7 months ago
I figured a quickfix myself but I don't know if it will work.
In class/actions_sendrecurringinvoicebymail.class.php under line 86 $facturerec = $parameters['facturerec'];
, add the code :
if(!($facturerec instanceof FactureRec)){ return 0; }
If someone can confirm...?
💥 Howie ! 🤕
Pretty bad bug, sorry : Dolibarr 16 reused the afterCreationOfRecurringInvoice
hook for the suppliers' invoice templates but with a different table in the database. Thus, generated supplier's invoices are sent to the eventual customer which has a template with a matching the database's id...
Your fix seems great. I'll test it some more with old versions of Dolibarr and release it.
Thanks for the notice !
When I create a supplier invoice template, it sends an email to a random thirdparty with the supplier invoice. It happens weither the template is set to draft or not. I have no form to stop it.