2
0
forked from Wavyzz/dolibarr

use a fonction to get multidir output

This commit is contained in:
Frédéric FRANCE
2023-03-08 21:16:37 +01:00
parent 09a5f09e2a
commit 24f77465cc
2 changed files with 13 additions and 1 deletions

View File

@@ -2987,7 +2987,7 @@ if ($action == 'create' && $usercancreate) {
// Presend form // Presend form
$modelmail = 'order_send'; $modelmail = 'order_send';
$defaulttopic = 'SendOrderRef'; $defaulttopic = 'SendOrderRef';
$diroutput = $conf->commande->multidir_output[$object->entity]; $diroutput = getMultidirOutput($object);
$trackid = 'ord'.$object->id; $trackid = 'ord'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';

View File

@@ -71,6 +71,18 @@ if (!function_exists('utf8_decode')) {
} }
} }
/**
* Return multidir output for an Dolibarr object
*
* @param CommonObject $object Dolibarr common object
* @return string
*/
function getMultiDirOutput($object) : string
{
global $conf;
$module = $object->element;
return $conf->$module->multidir_output[$object->entity];
}
/** /**
* Return dolibarr global constant string value * Return dolibarr global constant string value