diff --git a/htdocs/includes/triggers/interface_modNotification_Notification.class.php b/htdocs/includes/triggers/interface_modNotification_Notification.class.php index 11e4e871303..b4aba62b25b 100644 --- a/htdocs/includes/triggers/interface_modNotification_Notification.class.php +++ b/htdocs/includes/triggers/interface_modNotification_Notification.class.php @@ -107,6 +107,7 @@ class InterfaceNotification $ref = dol_sanitizeFileName($object->ref); $filepdf = $conf->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf'; if (! file_exists($filepdf)) $filepdf=''; + $filepdf=''; // We can't add PDF as it is not generated yet. $langs->load("other"); $mesg = $langs->transnoentitiesnoconv("EMailTextInvoiceValidated",$object->ref); @@ -122,6 +123,7 @@ class InterfaceNotification $ref = dol_sanitizeFileName($object->ref); $filepdf = $conf->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf'; if (! file_exists($filepdf)) $filepdf=''; + $filepdf=''; // We can't add PDF as it is not generated yet. $langs->load("other"); $mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated",$object->ref); @@ -135,8 +137,9 @@ class InterfaceNotification $action_notify = 'NOTIFY_VAL_PROPAL'; $ref = dol_sanitizeFileName($object->ref); - $filepdf = $conf->propal->dir_output . '/' . $ref . '/' . $ref . '.pdf'; + $filepdf = $conf->propale->dir_output . '/' . $ref . '/' . $ref . '.pdf'; if (! file_exists($filepdf)) $filepdf=''; + $filepdf=''; // We can't add PDF as it is not generated yet. $langs->load("other"); $mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$object->ref); @@ -152,8 +155,9 @@ class InterfaceNotification $ref = dol_sanitizeFileName($object->ref); $filepdf = $conf->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf'; if (! file_exists($filepdf)) $filepdf=''; + $filepdf=''; // We can't add PDF as it is not generated yet. $langs->load("other"); - $mesg = $langs->transnoentitiesnoconv("EMailTextIntervnetionValidated",$object->ref); + $mesg = $langs->transnoentitiesnoconv("EMailTextInterventionValidated",$object->ref); $notify = new Notify($this->db); $notify->send($action_notify, $object->socid, $mesg, 'ficheinter', $object->id, $filepdf); diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index b0342d5f2ee..2e6799631e4 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -105,12 +105,14 @@ NumberOfUnitsProposals=Number of units on proposals on last 12 month NumberOfUnitsCustomerOrders=Number of units on customer orders on last 12 month NumberOfUnitsCustomerInvoices=Number of units on customer invoices on last 12 month NumberOfUnitsSupplierInvoices=Number of units on supplier invoices on last 12 month -EMailTextInterventionValidated=Intervention %s validated -EMailTextInvoiceValidated=Invoice %s validated -EMailTextOrderApproved=Order %s approved -EMailTextOrderApprovedBy=Order %s approved by %s -EMailTextOrderRefused=Order %s refused -EMailTextOrderRefusedBy=Order %s refused by %s +EMailTextInterventionValidated=The intervention %s has been validated. +EMailTextInvoiceValidated=The invoice %s has been validated. +EMailTextProposalValidated=The proposal %s has been validated. +EMailTextOrderValidated=The order %s has been validated. +EMailTextOrderApproved=The order %s has been approved. +EMailTextOrderApprovedBy=The order %s has been approved by %s. +EMailTextOrderRefused=The order %s has been refused. +EMailTextOrderRefusedBy=The order %s has been refused by %s. ImportedWithSet=Importation data set DolibarrNotification=Automatic notification diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index a3aafc95967..f281a9c7e68 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -105,12 +105,14 @@ NumberOfUnitsProposals=Nombre d'unités sur les propal des 12 derniers mois NumberOfUnitsCustomerOrders=Nombre d'unités sur les commandes clients des 12 derniers mois NumberOfUnitsCustomerInvoices=Nombre d'unités sur les factures clients des 12 derniers mois NumberOfUnitsSupplierInvoices=Nombre d'unités sur les factures fournisseurs des 12 derniers mois -EMailTextInterventionValidated=Fiche intervention %s validée -EMailTextInvoiceValidated=Facture %s validée -EMailTextOrderApproved=Commande %s approuvée -EMailTextOrderApprovedBy=Commande %s approuvée par %s -EMailTextOrderRefused=Commande %s réfusée -EMailTextOrderRefusedBy=Commande %s réfusée par %s +EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée. +EMailTextInvoiceValidated=La facture %s vous concernant a été validée. +EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée. +EMailTextOrderValidated=La commande %s vous concernant a été validée. +EMailTextOrderApproved=La commande %s a été approuvée. +EMailTextOrderApprovedBy=La commande %s a été approuvée par %s. +EMailTextOrderRefused=La commande %s a été réfusée. +EMailTextOrderRefusedBy=La commande %s a été réfusée par %s. ImportedWithSet=Lot d'importation (Import key) DolibarrNotification=Notification automatique diff --git a/htdocs/notify.class.php b/htdocs/notify.class.php index 6426ef12c20..84ec110a696 100644 --- a/htdocs/notify.class.php +++ b/htdocs/notify.class.php @@ -128,7 +128,7 @@ class Notify $langs->load("other"); - dol_syslog("Notify::send $action, $socid, $texte, $objet_type, $objet_id, $file"); + 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.= " a.rowid as adid, a.titre, a.code, n.rowid"; @@ -154,7 +154,8 @@ class Notify if (strlen($sendto)) { - $subject = $langs->transnoentitiesnoconv("DolibarrNotification"); + $application=(defined('MAIN_APPLICATION_TITLE')?MAIN_APPLICATION_TITLE:'Dolibarr'); + $subject = '['.$application.'] '.$langs->transnoentitiesnoconv("DolibarrNotification"); $message = $texte; $filename = explode("/",$file); $msgishtml=0;