From 945eb9f0948d974a91a021039f1a067165cfa281 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 22 Feb 2016 12:52:01 +0100 Subject: [PATCH] NEW Add the event BILL_PAYED to list of supported events for module notification. --- htdocs/core/class/notify.class.php | 13 +++++++++++++ ...erface_50_modNotification_Notification.class.php | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 11c6294975d..98a06174595 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -234,6 +234,7 @@ class Notify $notifcode, array( 'BILL_VALIDATE', + 'BILL_PAYED', 'ORDER_VALIDATE', 'PROPAL_VALIDATE', 'FICHINTER_VALIDATE', @@ -296,6 +297,12 @@ class Notify $object_type = 'facture'; $mesg = $langs->transnoentitiesnoconv("EMailTextInvoiceValidated",$newref); break; + case 'BILL_PAYED': + $link='/compta/facture.php?facid='.$object->id; + $dir_output = $conf->facture->dir_output; + $object_type = 'facture'; + $mesg = $langs->transnoentitiesnoconv("EMailTextInvoicePayed",$newref); + break; case 'ORDER_VALIDATE': $link='/commande/card.php?id='.$object->id; $dir_output = $conf->commande->dir_output; @@ -443,6 +450,12 @@ class Notify $object_type = 'facture'; $mesg = $langs->transnoentitiesnoconv("EMailTextInvoiceValidated",$newref); break; + case 'BILL_PAYED': + $link='/compta/facture.php?facid='.$object->id; + $dir_output = $conf->facture->dir_output; + $object_type = 'facture'; + $mesg = $langs->transnoentitiesnoconv("EMailTextInvoicePayed",$newref); + break; case 'ORDER_VALIDATE': $link='/commande/card.php?id='.$object->id; $dir_output = $conf->commande->dir_output; diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 160387f5fde..70719006c5c 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -36,7 +36,8 @@ class InterfaceNotification extends DolibarrTriggers public $picto = 'email'; var $listofmanagedevents=array( - 'BILL_VALIDATE', + 'BILL_VALIDATE', + 'BILL_PAYED', 'ORDER_VALIDATE', 'PROPAL_VALIDATE', 'FICHINTER_VALIDATE', -- GitLab