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);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
$filepdf = $conf->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
$filepdf = $conf->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
||||||
if (! file_exists($filepdf)) $filepdf='';
|
if (! file_exists($filepdf)) $filepdf='';
|
||||||
|
$filepdf=''; // We can't add PDF as it is not generated yet.
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextInvoiceValidated",$object->ref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextInvoiceValidated",$object->ref);
|
||||||
|
|
||||||
@@ -122,6 +123,7 @@ class InterfaceNotification
|
|||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
$filepdf = $conf->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
$filepdf = $conf->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
||||||
if (! file_exists($filepdf)) $filepdf='';
|
if (! file_exists($filepdf)) $filepdf='';
|
||||||
|
$filepdf=''; // We can't add PDF as it is not generated yet.
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated",$object->ref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated",$object->ref);
|
||||||
|
|
||||||
@@ -135,8 +137,9 @@ class InterfaceNotification
|
|||||||
|
|
||||||
$action_notify = 'NOTIFY_VAL_PROPAL';
|
$action_notify = 'NOTIFY_VAL_PROPAL';
|
||||||
$ref = dol_sanitizeFileName($object->ref);
|
$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='';
|
if (! file_exists($filepdf)) $filepdf='';
|
||||||
|
$filepdf=''; // We can't add PDF as it is not generated yet.
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$object->ref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$object->ref);
|
||||||
|
|
||||||
@@ -152,8 +155,9 @@ class InterfaceNotification
|
|||||||
$ref = dol_sanitizeFileName($object->ref);
|
$ref = dol_sanitizeFileName($object->ref);
|
||||||
$filepdf = $conf->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
$filepdf = $conf->facture->dir_output . '/' . $ref . '/' . $ref . '.pdf';
|
||||||
if (! file_exists($filepdf)) $filepdf='';
|
if (! file_exists($filepdf)) $filepdf='';
|
||||||
|
$filepdf=''; // We can't add PDF as it is not generated yet.
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextIntervnetionValidated",$object->ref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionValidated",$object->ref);
|
||||||
|
|
||||||
$notify = new Notify($this->db);
|
$notify = new Notify($this->db);
|
||||||
$notify->send($action_notify, $object->socid, $mesg, 'ficheinter', $object->id, $filepdf);
|
$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
|
NumberOfUnitsCustomerOrders=Number of units on customer orders on last 12 month
|
||||||
NumberOfUnitsCustomerInvoices=Number of units on customer invoices 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
|
NumberOfUnitsSupplierInvoices=Number of units on supplier invoices on last 12 month
|
||||||
EMailTextInterventionValidated=Intervention %s validated
|
EMailTextInterventionValidated=The intervention %s has been validated.
|
||||||
EMailTextInvoiceValidated=Invoice %s validated
|
EMailTextInvoiceValidated=The invoice %s has been validated.
|
||||||
EMailTextOrderApproved=Order %s approved
|
EMailTextProposalValidated=The proposal %s has been validated.
|
||||||
EMailTextOrderApprovedBy=Order %s approved by %s
|
EMailTextOrderValidated=The order %s has been validated.
|
||||||
EMailTextOrderRefused=Order %s refused
|
EMailTextOrderApproved=The order %s has been approved.
|
||||||
EMailTextOrderRefusedBy=Order %s refused by %s
|
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
|
ImportedWithSet=Importation data set
|
||||||
DolibarrNotification=Automatic notification
|
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
|
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
|
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
|
NumberOfUnitsSupplierInvoices=Nombre d'unités sur les factures fournisseurs des 12 derniers mois
|
||||||
EMailTextInterventionValidated=Fiche intervention %s validée
|
EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée.
|
||||||
EMailTextInvoiceValidated=Facture %s validée
|
EMailTextInvoiceValidated=La facture %s vous concernant a été validée.
|
||||||
EMailTextOrderApproved=Commande %s approuvée
|
EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée.
|
||||||
EMailTextOrderApprovedBy=Commande %s approuvée par %s
|
EMailTextOrderValidated=La commande %s vous concernant a été validée.
|
||||||
EMailTextOrderRefused=Commande %s réfusée
|
EMailTextOrderApproved=La commande %s a été approuvée.
|
||||||
EMailTextOrderRefusedBy=Commande %s réfusée par %s
|
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)
|
ImportedWithSet=Lot d'importation (Import key)
|
||||||
DolibarrNotification=Notification automatique
|
DolibarrNotification=Notification automatique
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class Notify
|
|||||||
|
|
||||||
$langs->load("other");
|
$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 = "SELECT s.nom, c.email, c.rowid, c.name, c.firstname,";
|
||||||
$sql.= " a.rowid as adid, a.titre, a.code, n.rowid";
|
$sql.= " a.rowid as adid, a.titre, a.code, n.rowid";
|
||||||
@@ -154,7 +154,8 @@ class Notify
|
|||||||
|
|
||||||
if (strlen($sendto))
|
if (strlen($sendto))
|
||||||
{
|
{
|
||||||
$subject = $langs->transnoentitiesnoconv("DolibarrNotification");
|
$application=(defined('MAIN_APPLICATION_TITLE')?MAIN_APPLICATION_TITLE:'Dolibarr');
|
||||||
|
$subject = '['.$application.'] '.$langs->transnoentitiesnoconv("DolibarrNotification");
|
||||||
$message = $texte;
|
$message = $texte;
|
||||||
$filename = explode("/",$file);
|
$filename = explode("/",$file);
|
||||||
$msgishtml=0;
|
$msgishtml=0;
|
||||||
|
|||||||
Reference in New Issue
Block a user