forked from Wavyzz/dolibarr
use a fonction to get multidir output
This commit is contained in:
@@ -2987,7 +2987,7 @@ if ($action == 'create' && $usercancreate) {
|
||||
// Presend form
|
||||
$modelmail = 'order_send';
|
||||
$defaulttopic = 'SendOrderRef';
|
||||
$diroutput = $conf->commande->multidir_output[$object->entity];
|
||||
$diroutput = getMultidirOutput($object);
|
||||
$trackid = 'ord'.$object->id;
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user