';
print '';
print '';
diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php
index 345ec5b38e3..92555da891a 100644
--- a/htdocs/core/class/notify.class.php
+++ b/htdocs/core/class/notify.class.php
@@ -80,8 +80,8 @@ class Notify
'SHIPPING_VALIDATE',
'EXPENSE_REPORT_VALIDATE',
'EXPENSE_REPORT_APPROVE',
- 'HOLIDAY_VALIDATE',
- 'HOLIDAY_APPROVE',
+ 'HOLIDAY_VALIDATE',
+ 'HOLIDAY_APPROVE',
'ACTION_CREATE'
);
@@ -108,10 +108,28 @@ class Notify
*/
public function confirmMessage($action, $socid, $object)
{
- global $langs;
+ global $conf, $langs;
$langs->load("mails");
$listofnotiftodo = $this->getNotificationsArray($action, $socid, $object, 0);
+ if (!empty($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE)){
+ if ($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 1 || $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 3){
+ foreach($listofnotiftodo as $val){
+ if ($val['type'] == 'touser'){
+ unset($listofnotiftodo[$val['email']]);
+ $listofnotiftodo = array_merge($listofnotiftodo);
+ }
+ }
+ }
+ if ($conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 2 || $conf->global->NOTIFICATION_EMAIL_DISABLE_CONFIRM_MESSAGE == 3){
+ foreach($listofnotiftodo as $val){
+ if ($val['type'] == 'tofixedemail'){
+ unset($listofnotiftodo[$val['email']]);
+ $listofnotiftodo = array_merge($listofnotiftodo);
+ }
+ }
+ }
+ }
$texte = '';
$nb = -1;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 5d78f312917..73d2a5ca558 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1673,6 +1673,7 @@ MailingDelay=Seconds to wait after sending next message
NotificationSetup=Email Notification module setup
NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module
FixedEmailTarget=Recipient
+NotificationDisableConfirmMessage=Notification disable in confirm message
##### Sendings #####
SendingsSetup=Shipping module setup
SendingsReceiptModel=Sending receipt model
diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang
index 5ae6c7727b3..91f173850ff 100644
--- a/htdocs/langs/en_US/other.lang
+++ b/htdocs/langs/en_US/other.lang
@@ -35,6 +35,9 @@ OnlyOneFieldForXAxisIsPossible=Only 1 field is currently possible as X-Axis. Onl
AtLeastOneMeasureIsRequired=At least 1 field for measure is required
AtLeastOneXAxisIsRequired=At least 1 field for X-Axis is required
LatestBlogPosts=Latest Blog Posts
+notiftouser=To users
+notiftofixedemail=To fixed mail
+notiftouserandtofixedemail=To user and fixed mail
Notify_ORDER_VALIDATE=Sales order validated
Notify_ORDER_SENTBYMAIL=Sales order sent by mail
Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index ef48fc0a82d..02e0b27af5d 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -1662,6 +1662,7 @@ MailingDelay=Temps d'attente, en seconde, avant d'envoyer le prochain message
NotificationSetup=Configuration du module Notification par email
NotificationEMailFrom=Adresse émettrice (From) des emails envoyés lors des notifications
FixedEmailTarget=Email fixe cible destinataires
+NotificationDisableConfirmMessage=Notifications desactivé dans les messages de confirmation
##### Sendings #####
SendingsSetup=Configuration du module Expédition/Livraison
SendingsReceiptModel=Modèles de bordereau d'expédition
diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang
index a8078129464..4e228ed50bd 100644
--- a/htdocs/langs/fr_FR/other.lang
+++ b/htdocs/langs/fr_FR/other.lang
@@ -35,6 +35,9 @@ OnlyOneFieldForXAxisIsPossible=1 seul champ est actuellement possible en tant qu
AtLeastOneMeasureIsRequired=Au moins 1 champ de mesure est requis
AtLeastOneXAxisIsRequired=Au moins 1 champ pour l'axe X est requis
LatestBlogPosts=Derniers articles du Blog
+notiftouser=Aux utilisateurs
+notiftofixedemail=Vers les courriers fixe
+notiftouserandtofixedemail=Aux utilisateurs et les courriers fixe
Notify_ORDER_VALIDATE=Validation commande client
Notify_ORDER_SENTBYMAIL=Envoi commande client par email
Notify_ORDER_SUPPLIER_SENTBYMAIL=Envoi commande fournisseur par email