added handle to trigger FICHINTER_ADD_CONTACT in notify module
This commit is contained in:
parent
543f5cef63
commit
d35f728fad
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.org>
|
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* Copyright (C) 2015 Bahfir Abbes <contact@dolibarrpar.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -169,6 +170,7 @@ if ($conf->societe->enabled)
|
|||||||
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
|
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
|
||||||
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
|
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
|
||||||
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
||||||
|
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td>'.$elementLabel.'</td>';
|
print '<td>'.$elementLabel.'</td>';
|
||||||
@ -213,6 +215,7 @@ foreach($listofnotifiedevents as $notifiedevent)
|
|||||||
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
|
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
|
||||||
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
|
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
|
||||||
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
||||||
|
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td>'.$elementLabel.'</td>';
|
print '<td>'.$elementLabel.'</td>';
|
||||||
|
|||||||
@ -238,6 +238,7 @@ class Notify
|
|||||||
'ORDER_VALIDATE',
|
'ORDER_VALIDATE',
|
||||||
'PROPAL_VALIDATE',
|
'PROPAL_VALIDATE',
|
||||||
'FICHINTER_VALIDATE',
|
'FICHINTER_VALIDATE',
|
||||||
|
'FICHINTER_ADD_CONTACT',
|
||||||
'ORDER_SUPPLIER_VALIDATE',
|
'ORDER_SUPPLIER_VALIDATE',
|
||||||
'ORDER_SUPPLIER_APPROVE',
|
'ORDER_SUPPLIER_APPROVE',
|
||||||
'ORDER_SUPPLIER_REFUSE',
|
'ORDER_SUPPLIER_REFUSE',
|
||||||
@ -315,6 +316,12 @@ class Notify
|
|||||||
$object_type = 'propal';
|
$object_type = 'propal';
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref);
|
||||||
break;
|
break;
|
||||||
|
case 'FICHINTER_ADD_CONTACT':
|
||||||
|
$link='/fichinter/card.php?id='.$object->id;
|
||||||
|
$dir_output = $conf->facture->dir_output;
|
||||||
|
$object_type = 'ficheinter';
|
||||||
|
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$object->ref);
|
||||||
|
break;
|
||||||
case 'FICHINTER_VALIDATE':
|
case 'FICHINTER_VALIDATE':
|
||||||
$link='/fichinter/card.php?id='.$object->id;
|
$link='/fichinter/card.php?id='.$object->id;
|
||||||
$dir_output = $conf->facture->dir_output;
|
$dir_output = $conf->facture->dir_output;
|
||||||
@ -427,7 +434,7 @@ class Notify
|
|||||||
if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue;
|
if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue;
|
||||||
|
|
||||||
$threshold = (float) $reg[1];
|
$threshold = (float) $reg[1];
|
||||||
if ($object->total_ht <= $threshold)
|
if (!empty($object->total_ht) && $object->total_ht <= $threshold)
|
||||||
{
|
{
|
||||||
dol_syslog("A notification is requested for notifcode = ".$notifcode." but amount = ".$object->total_ht." so lower than threshold = ".$threshold.". We discard this notification");
|
dol_syslog("A notification is requested for notifcode = ".$notifcode." but amount = ".$object->total_ht." so lower than threshold = ".$threshold.". We discard this notification");
|
||||||
continue;
|
continue;
|
||||||
@ -468,6 +475,12 @@ class Notify
|
|||||||
$object_type = 'propal';
|
$object_type = 'propal';
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref);
|
||||||
break;
|
break;
|
||||||
|
case 'FICHINTER_ADD_CONTACT':
|
||||||
|
$link='/fichinter/card.php?id='.$object->id;
|
||||||
|
$dir_output = $conf->facture->dir_output;
|
||||||
|
$object_type = 'ficheinter';
|
||||||
|
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$newref);
|
||||||
|
break;
|
||||||
case 'FICHINTER_VALIDATE':
|
case 'FICHINTER_VALIDATE':
|
||||||
$link='/fichinter/card.php?id='.$object->id;
|
$link='/fichinter/card.php?id='.$object->id;
|
||||||
$dir_output = $conf->facture->dir_output;
|
$dir_output = $conf->facture->dir_output;
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class InterfaceNotification extends DolibarrTriggers
|
|||||||
'ORDER_VALIDATE',
|
'ORDER_VALIDATE',
|
||||||
'PROPAL_VALIDATE',
|
'PROPAL_VALIDATE',
|
||||||
'FICHINTER_VALIDATE',
|
'FICHINTER_VALIDATE',
|
||||||
|
'FICHINTER_ADD_CONTACT',
|
||||||
'ORDER_SUPPLIER_VALIDATE',
|
'ORDER_SUPPLIER_VALIDATE',
|
||||||
'ORDER_SUPPLIER_APPROVE',
|
'ORDER_SUPPLIER_APPROVE',
|
||||||
'ORDER_SUPPLIER_REFUSE',
|
'ORDER_SUPPLIER_REFUSE',
|
||||||
|
|||||||
@ -8,6 +8,7 @@ BirthdayDate=Birthday
|
|||||||
DateToBirth=Date of birth
|
DateToBirth=Date of birth
|
||||||
BirthdayAlertOn= birthday alert active
|
BirthdayAlertOn= birthday alert active
|
||||||
BirthdayAlertOff= birthday alert inactive
|
BirthdayAlertOff= birthday alert inactive
|
||||||
|
Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention
|
||||||
Notify_FICHINTER_VALIDATE=Intervention validated
|
Notify_FICHINTER_VALIDATE=Intervention validated
|
||||||
Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail
|
Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail
|
||||||
Notify_ORDER_VALIDATE=Customer order validated
|
Notify_ORDER_VALIDATE=Customer order validated
|
||||||
@ -164,6 +165,7 @@ 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
|
||||||
NumberOfUnitsSupplierOrders=Number of units on supplier orders on last 12 month
|
NumberOfUnitsSupplierOrders=Number of units on supplier orders 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
|
||||||
|
EMailTextInterventionAddedContact=A newintervention %s has been assigned to you.
|
||||||
EMailTextInterventionValidated=The intervention %s has been validated.
|
EMailTextInterventionValidated=The intervention %s has been validated.
|
||||||
EMailTextInvoiceValidated=The invoice %s has been validated.
|
EMailTextInvoiceValidated=The invoice %s has been validated.
|
||||||
EMailTextProposalValidated=The proposal %s has been validated.
|
EMailTextProposalValidated=The proposal %s has been validated.
|
||||||
|
|||||||
@ -8,6 +8,7 @@ BirthdayDate=Date anniversaire
|
|||||||
DateToBirth=Date de naissance
|
DateToBirth=Date de naissance
|
||||||
BirthdayAlertOn= alerte anniversaire active
|
BirthdayAlertOn= alerte anniversaire active
|
||||||
BirthdayAlertOff= alerte anniversaire inactive
|
BirthdayAlertOff= alerte anniversaire inactive
|
||||||
|
Notify_FICHINTER_ADD_CONTACT=Ajout contact à Intervention
|
||||||
Notify_FICHINTER_VALIDATE=Validation fiche intervention
|
Notify_FICHINTER_VALIDATE=Validation fiche intervention
|
||||||
Notify_FICHINTER_SENTBYMAIL=Envoi fiche d'intervention par email
|
Notify_FICHINTER_SENTBYMAIL=Envoi fiche d'intervention par email
|
||||||
Notify_ORDER_VALIDATE=Validation commande client
|
Notify_ORDER_VALIDATE=Validation commande client
|
||||||
@ -164,6 +165,7 @@ NumberOfUnitsCustomerOrders=Nombre d'unités sur les commandes clients des 12 de
|
|||||||
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
|
||||||
NumberOfUnitsSupplierOrders=Nombre d'unités sur les commandes fournisseur des 12 derniers mois
|
NumberOfUnitsSupplierOrders=Nombre d'unités sur les commandes fournisseur 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
|
||||||
|
EMailTextInterventionAddedContact=Une nouvelle intervention %s vous a été assignée.
|
||||||
EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée.
|
EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée.
|
||||||
EMailTextInvoiceValidated=La facture %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.
|
EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user