From a3bd4a8cfd30927b9574a51d5343ce72f64f1008 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 26 Apr 2023 17:48:09 +0200 Subject: [PATCH 1/2] fix: cron sendEmailsRemindersOnInvoiceDueDate if contact exists and email exists the is an error --- htdocs/compta/facture/class/facture.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index af8caa73b12..6e61a62b9d0 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5550,7 +5550,8 @@ class Facture extends CommonInvoice } if (empty($to) && !empty($recipient->email)) { $to[] = $recipient->email; - } else { + } + if (empty($to)) { $errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for user."; $error++; } From 0d830aef89208022d5972702ec69c55e080ff65c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 26 Apr 2023 17:50:59 +0200 Subject: [PATCH 2/2] fix: cron sendEmailsRemindersOnInvoiceDueDate if contact exists and mail on thridparty exists there is an error --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6e61a62b9d0..fbb86a4a29f 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5552,7 +5552,7 @@ class Facture extends CommonInvoice $to[] = $recipient->email; } if (empty($to)) { - $errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for user."; + $errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for invoice or customer."; $error++; } } else {