diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index f467c0899dc..bbee47a8265 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -333,6 +333,13 @@ if ($action == 'presend') { if (!empty($origin) && !empty($origin_id)) { $element = $subelement = $origin; + + if ($element == 'order_supplier') { + $element = 'fourn'; + $subelement = 'fournisseur.commande'; + $origin = 'CommandeFournisseur'; + } + $regs = array(); if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { $element = $regs[1]; @@ -355,10 +362,6 @@ if ($action == 'presend') { if ($element == 'shipping') { $element = $subelement = 'expedition'; } - if ($element == 'order_supplier') { - $element = 'fourn'; - $subelement = 'fournisseur.commande'; - } if ($element == 'project') { $element = 'projet'; }