Browse Source

Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

Laurent Destailleur 2 years ago
parent
commit
84f79b592c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      htdocs/compta/facture/class/facture.class.php

+ 3 - 2
htdocs/compta/facture/class/facture.class.php

@@ -5550,8 +5550,9 @@ class Facture extends CommonInvoice
 								}
 								if (empty($to) && !empty($recipient->email)) {
 									$to[] = $recipient->email;
-								} else {
-									$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for user.";
+								}
+								if (empty($to)) {
+									$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for invoice or customer.";
 									$error++;
 								}
 							} else {