use isModEnabled

This commit is contained in:
Frédéric FRANCE
2023-06-29 14:04:39 +02:00
parent f058a6fc46
commit e74d8fa54d
8 changed files with 17 additions and 17 deletions

View File

@@ -1024,7 +1024,7 @@ class Reception extends CommonObject
$this->db->begin();
// Stock control
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0) {
if (isModEnabled('stock') && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0) {
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
$langs->load("agenda");