diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index 3d8359ebc3a..79529898bb0 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -76,8 +76,24 @@ class modProductBatch extends DolibarrModules $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("productbatch"); + // Constants // Constants $this->const = array(); + $r = 0; + + $this->const[$r][0] = "PRODUCTBATCH_LOT_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "mod_lot_free"; + $this->const[$r][3] = 'Module to control product codes'; + $this->const[$r][4] = 0; + $r++; + + $this->const[$r][0] = "PRODUCTBATCH_SN_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "mod_sn_free"; + $this->const[$r][3] = 'Module to control product codes'; + $this->const[$r][4] = 0; + $r++; $this->tabs = array(); diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index 13b47e56afd..37b8e0bc975 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -69,9 +69,9 @@ if ($action == 'updateMaskLot') { setEventMessages($langs->trans("Error"), null, 'errors'); } } elseif ($action == 'setmodlot') { - dolibarr_set_const($db, "LOT_ADDON", $value, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity); } elseif ($action == 'setmodsn') { - dolibarr_set_const($db, "SN_ADDON", $value, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity); } /* @@ -89,7 +89,7 @@ print load_fiche_titre($langs->trans("ProductLotSetup"), $linkback, 'title_setup $head = product_lot_admin_prepare_head(); -dol_fiche_head($head, 'settings', $langs->trans("Batch"), -1, 'productbatch'); +dol_fiche_head($head, 'settings', $langs->trans("Batch"), -1, 'lot'); /* * Lot Numbering models @@ -140,7 +140,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print '