diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7496de72ec2..5d7e008e062 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2523,6 +2523,8 @@ class Form $outdurationvalue = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, 0, dol_strlen($objp->duration) - 1) : ''; $outdurationunit = $outtype == Product::TYPE_SERVICE ?substr($objp->duration, -1) : ''; + if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; + // Units $outvalUnits = ''; if (!empty($conf->global->PRODUCT_USE_UNITS)) {