From d59391aaf2d74ee7ebf0a08e498bb8f54a208b47 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 23 Nov 2022 13:08:09 +0100 Subject: [PATCH 1/2] NEW: Add Customer Order delivered (ORDER_CLOSE) in module Notification --- htdocs/core/class/notify.class.php | 1 + htdocs/langs/en_US/other.lang | 1 + htdocs/langs/fr_FR/other.lang | 1 + 3 files changed, 3 insertions(+) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 2a6fdf8def7..d9f5b610877 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -69,6 +69,7 @@ class Notify 'BILL_PAYED', 'ORDER_CREATE', 'ORDER_VALIDATE', + 'ORDER_CLOSE', 'PROPAL_VALIDATE', 'PROPAL_CLOSE_SIGNED', 'FICHINTER_VALIDATE', diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index d5701ba2224..899cd74a79d 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -40,6 +40,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 diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 6c714be2c4d..dc5bae1efa9 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -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 From 0b4d8775b484014972ffaae732439c4ffb70fcd7 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 23 Nov 2022 14:00:24 +0100 Subject: [PATCH 2/2] add good text --- htdocs/core/class/notify.class.php | 13 +++++++++++++ htdocs/langs/en_US/other.lang | 1 + htdocs/langs/fr_FR/other.lang | 1 + 3 files changed, 15 insertions(+) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index d9f5b610877..ad0cd6a50a9 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -496,6 +496,13 @@ class Notify $labeltouse = $conf->global->ORDER_VALIDATE_TEMPLATE; $mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderValidated", $link); break; + case 'ORDER_CLOSE': + $link = ''.$newref.''; + $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 = ''.$newref.''; $dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal'); @@ -740,6 +747,12 @@ class Notify $object_type = 'order'; $mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated", $link); break; + case 'ORDER_CLOSE': + $link = ''.$newref.''; + $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 = ''.$newref.''; $dir_output = $conf->propal->multidir_output[$object->entity]."/".get_exdir(0, 0, 0, 1, $object, 'propal'); diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 899cd74a79d..008333b8c0b 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -213,6 +213,7 @@ EMailTextInvoicePayed=Invoice %s has been paid. EMailTextProposalValidated=Proposal %s has been validated. EMailTextProposalClosedSigned=Proposal %s has been closed signed. 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. diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index dc5bae1efa9..e16102d4c5b 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -212,6 +212,7 @@ EMailTextInvoicePayed=La facture %s a été payée. EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée. EMailTextProposalClosedSigned=La proposition %s a été clôturée signée. 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.