diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index f5b39b3f704..1e3a7f038ff 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -54,7 +54,7 @@ MaxSize=Maximum size
AttachANewFile=Attach a new file/document
LinkedObject=Linked object
Miscellaneous=Miscellaneous
-NbOfActiveNotifications=Number of notifications
+NbOfActiveNotifications=Number of notifications (nb of recipient emails)
PredefinedMailTest=This is a test mail.\nThe two lines are separated by a carriage return.\n\n__SIGNATURE__
PredefinedMailTestHtml=This is a test mail (the word test must be in bold).
The two lines are separated by a carriage return.
__SIGNATURE__
PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __FACREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php
index 1845669dcfc..388a271cd8c 100644
--- a/htdocs/societe/notify/card.php
+++ b/htdocs/societe/notify/card.php
@@ -169,6 +169,8 @@ if ($result > 0)
print '
| '.$langs->trans("NbOfActiveNotifications").' | ';
print '';
+ $nb=0;
+ // List of per contact notifications
$sql = "SELECT COUNT(n.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."notify_def as n";
$sql.= " WHERE fk_soc = ".$object->id;
@@ -187,6 +189,13 @@ if ($result > 0)
else {
dol_print_error($db);
}
+ // List of notifications enabled for fixed email
+ foreach($conf->global as $key => $val)
+ {
+ if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue;
+ $listtmp=explode(',',$val);
+ $nb+=count($listtmp);
+ }
print $nb;
print ' |
';
print '';
@@ -273,16 +282,21 @@ if ($result > 0)
foreach($conf->global as $key => $val)
{
if (! preg_match('/^NOTIFICATION_FIXEDEMAIL_(.*)/', $key, $reg)) continue;
- //print $key.' - '.$val.' - '.$reg[1].'
';
- print '| '.$val;
- if (isValidEmail($val))
+ print ' |
';
+ $listtmp=explode(',',$val);
+ foreach($listtmp as $keyemail => $valemail)
{
- print ' <'.$val.'>';
- }
- else
- {
- $langs->load("errors");
- print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$val);
+ $valemail=trim($valemail);
+ //print $keyemail.' - '.$valemail.' - '.$reg[1].' ';
+ if (isValidEmail($valemail))
+ {
+ print ' <'.$valemail.'>';
+ }
+ else
+ {
+ $langs->load("errors");
+ print ' '.img_warning().' '.$langs->trans("ErrorBadEMail",$valemail);
+ }
}
print ' | ';
print '';
|