forked from Wavyzz/dolibarr
Fix: Debug module notification.
New: Can use email notification when validating proposal or orders.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user