diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index c7eb5bf5c27..57124e15868 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -106,4 +106,5 @@ NoNotificationsWillBeSent=No email notifications are planned for this event and ANotificationsWillBeSent=1 notification will be sent by email SomeNotificationsWillBeSent=%s notifications will be sent by email AddNewNotification=Activate a new email notification request -ListOfActiveNotifications=List all active email notification requests \ No newline at end of file +ListOfActiveNotifications=List all active email notification requests +ListOfNotificationsDone=List all email notifications sent \ No newline at end of file diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index c3c0591c009..d3d755f5bab 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -106,4 +106,5 @@ NoNotificationsWillBeSent=Aucune notification par email n'est prévue pour cet ANotificationsWillBeSent=1 notification va être envoyée par email SomeNotificationsWillBeSent=%s notifications vont être envoyées par email AddNewNotification=Activer une nouvelle demande de notification email -ListOfActiveNotifications=Liste des demandes de notifications emails actives \ No newline at end of file +ListOfActiveNotifications=Liste des demandes de notifications emails actives +ListOfNotificationsDone=Liste des notifications emails envoyées \ No newline at end of file diff --git a/htdocs/notify.class.php b/htdocs/notify.class.php index 84ec110a696..6dfdb1b43ee 100644 --- a/htdocs/notify.class.php +++ b/htdocs/notify.class.php @@ -130,7 +130,7 @@ class Notify dol_syslog("Notify::send action=$action, socid=$socid, texte=$texte, objet_type=$objet_type, objet_id=$objet_id, file=$file"); - $sql = "SELECT s.nom, c.email, c.rowid, c.name, c.firstname,"; + $sql = "SELECT s.nom, c.email, c.rowid as cid, c.name, c.firstname,"; $sql.= " a.rowid as adid, a.titre, a.code, n.rowid"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c, ".MAIN_DB_PREFIX."action_def as a, ".MAIN_DB_PREFIX."notify_def as n, ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE n.fk_contact = c.rowid AND a.rowid = n.fk_action"; @@ -177,7 +177,7 @@ class Notify $sendto = htmlentities($sendto); $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify (daten, fk_action, fk_contact, objet_type, objet_id, email)"; - $sql.= " VALUES (".$this->db->idate(mktime()).", ".$actiondefid." ,".$obj->rowid." , '".$objet_type."', ".$objet_id.", '".addslashes($obj->email)."')"; + $sql.= " VALUES (".$this->db->idate(mktime()).", ".$actiondefid." ,".$obj->cid." , '".$objet_type."', ".$objet_id.", '".addslashes($obj->email)."')"; dol_syslog("Notify::send sql=".$sql); if (! $this->db->query($sql) ) { diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index aa57ff6cf96..e1efdd38521 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -191,7 +191,7 @@ if ( $soc->fetch($soc->id) ) print '
| '.$contactstatic->getNomUrl(1); + print $obj->email?' <'.$obj->email.'>':$langs->trans("NoMail"); + print ' | '; + print ''.$obj->titre.' | '; + print''.dol_print_date($db->jdate($obj->daten)).' | '; + print '