Merge pull request #22940 from FHenry/dev_add_OrderNotificationTriggers

NEW: Add Customer Order delivered (ORDER_CLOSE) in module Notification
This commit is contained in:
Laurent Destailleur 2023-04-01 12:15:07 +02:00 committed by GitHub
commit 370683b3a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View File

@ -69,6 +69,7 @@ class Notify
'BILL_PAYED',
'ORDER_CREATE',
'ORDER_VALIDATE',
'ORDER_CLOSE',
'PROPAL_VALIDATE',
'PROPAL_CLOSE_SIGNED',
'PROPAL_CLOSE_REFUSED',
@ -503,6 +504,13 @@ class Notify
$labeltouse = $conf->global->ORDER_VALIDATE_TEMPLATE;
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderValidated", $link);
break;
case 'ORDER_CLOSE':
$link = '<a href="'.$urlwithroot.'/commande/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->commande->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'commande');
$object_type = 'order';
$labeltouse = $conf->global->ORDER_CLOSE_TEMPLATE;
$mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderClose", $link);
break;
case 'PROPAL_VALIDATE':
$link = '<a href="'.$urlwithroot.'/comm/propal/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');
@ -783,6 +791,12 @@ class Notify
$object_type = 'order';
$mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated", $link);
break;
case 'ORDER_CLOSE':
$link = '<a href="'.$urlwithroot.'/commande/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->commande->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'commande');
$object_type = 'order';
$mesg = $langs->transnoentitiesnoconv("EMailTextOrderClose", $link);
break;
case 'PROPAL_VALIDATE':
$link = '<a href="'.$urlwithroot.'/comm/propal/card.php?id='.$object->id.'&entity='.$object->entity.'">'.$newref.'</a>';
$dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal');

View File

@ -41,6 +41,7 @@ notiftofixedemail=To fixed mail
notiftouserandtofixedemail=To user and fixed mail
Notify_ORDER_VALIDATE=Sales order validated
Notify_ORDER_SENTBYMAIL=Sales order sent by mail
Notify_ORDER_CLOSE=Sales order delivered
Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email
Notify_ORDER_SUPPLIER_VALIDATE=Purchase order recorded
Notify_ORDER_SUPPLIER_APPROVE=Purchase order approved
@ -205,6 +206,7 @@ EMailTextProposalClosedSignedWeb=Proposal %s has been closed signed on portal pa
EMailTextProposalClosedRefused=Proposal %s has been closed refused.
EMailTextProposalClosedRefusedWeb=Proposal %s has been closed refuse on portal page.
EMailTextOrderValidated=Order %s has been validated.
EMailTextOrderClose=Order %s has been delivered.
EMailTextOrderApproved=Order %s has been approved.
EMailTextOrderValidatedBy=Order %s has been recorded by %s.
EMailTextOrderApprovedBy=Order %s has been approved by %s.

View File

@ -40,6 +40,7 @@ notiftofixedemail=aux e-mails définis
notiftouserandtofixedemail=Aux utilisateurs et e-mails définis
Notify_ORDER_VALIDATE=Validation commande client
Notify_ORDER_SENTBYMAIL=Envoi commande client par email
Notify_ORDER_CLOSE=Commande client livrée
Notify_ORDER_SUPPLIER_SENTBYMAIL=Envoi commande fournisseur par email
Notify_ORDER_SUPPLIER_VALIDATE=Commande fournisseur enregistrée
Notify_ORDER_SUPPLIER_APPROVE=Commande fournisseur approuvée
@ -217,6 +218,7 @@ EMailTextProposalClosedSignedWeb=La proposition %s a été clôturée signée vi
EMailTextProposalClosedRefused=La proposition %s a été fermée refusée.
EMailTextProposalClosedRefusedWeb=La proposition %s a été fermée et refusée sur la page du portail.
EMailTextOrderValidated=La commande %s a été validée.
EMailTextOrderClose=La commande %s a été livrée.
EMailTextOrderApproved=La commande %s a été approuvée.
EMailTextOrderValidatedBy=La commande %s a été enregistrée par %s
EMailTextOrderApprovedBy=La commande %s a été approuvée par %s.