From a3bd4a8cfd30927b9574a51d5343ce72f64f1008 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 26 Apr 2023 17:48:09 +0200 Subject: [PATCH] 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++; }