From b6882af1b681539c4382a1e699134849c764c0be Mon Sep 17 00:00:00 2001 From: Alfredo Altamirano Date: Thu, 3 Oct 2019 20:21:13 -0500 Subject: [PATCH] Add hidden options to send by email for all status --- htdocs/comm/propal/card.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/fourn/commande/card.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 39c80269d8f..48837950d33 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2496,7 +2496,7 @@ $formquestion = array_merge($formquestion, array( } // Send - if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED) { + if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print '
' . $langs->trans('SendMail') . '
'; } else diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index ff4606655a5..8df27f0e09f 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2542,7 +2542,7 @@ if ($action == 'create' && $usercancreate) $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); if (empty($reshook)) { // Send - if ($object->statut > Commande::STATUS_DRAFT) { + if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print '
' . $langs->trans('SendMail') . '
'; } else diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 15c8c3439ce..4bd99e6db01 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2411,7 +2411,7 @@ elseif (! empty($object->id)) } // Send - if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED, 3, 4, 5))) + if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED, 3, 4, 5)) || !empty($conf->global->SUPPLIER_ORDER_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($user->rights->fournisseur->commande->commander) {