From 4015e1607f49f4db183fa2d527d2db688746c494 Mon Sep 17 00:00:00 2001 From: altairis-noe Date: Tue, 6 Apr 2021 17:34:50 +0200 Subject: [PATCH 1/7] add masks to product_lot --- htdocs/product/admin/product_lot.php | 94 ++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index d1b87bf0b14..79e64940d8f 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -72,6 +72,12 @@ if ($action == 'updateMaskLot') { dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity); } elseif ($action == 'setmodsn') { dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity); +} +if ($action == 'setmaskslot') { + dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'chaine', 0, '', $conf->entity); +} +if ($action == 'setmaskssn') { + dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'chaine', 0, '', $conf->entity); } /* @@ -176,6 +182,50 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); + print 'lot_product'."\n"; + print $langs->trans('CustomMasks'); + print ''; + + // Show example of numbering model + print ''; + $tmp = 'NoExample'; + if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; + elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $langs->trans($tmp); + print ''."\n"; + + print ''; + if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS == 'true') { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + + // Info + $htmltooltip = ''; + $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
'; + $nextval = $module->getNextValue($mysoc, $batch); + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip .= ''.$langs->trans("NextValue").': '; + if ($nextval) { + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + $nextval = $langs->trans($nextval); + $htmltooltip .= $nextval.'
'; + } else { + $htmltooltip .= $langs->trans($module->error).'
'; + } + } + + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + + print "\n"; } } } @@ -268,6 +318,50 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); + print 'sn_product'."\n"; + print $langs->trans('CustomMasks'); + print ''; + + // Show example of numbering model + print ''; + $tmp = 'NoExample'; + if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; + elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $langs->trans($tmp); + print ''."\n"; + + print ''; + if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS == 'true') { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + + // Info + $htmltooltip = ''; + $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
'; + $nextval = $module->getNextValue($mysoc, $batch); + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip .= ''.$langs->trans("NextValue").': '; + if ($nextval) { + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + $nextval = $langs->trans($nextval); + $htmltooltip .= $nextval.'
'; + } else { + $htmltooltip .= $langs->trans($module->error).'
'; + } + } + + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + + print "\n"; } } } From fc76e06058e6e3fbf62889f79cfddf5a0d120ac5 Mon Sep 17 00:00:00 2001 From: altairis-noe Date: Wed, 7 Apr 2021 10:23:33 +0200 Subject: [PATCH 2/7] Better tooltip, better name, translation --- htdocs/langs/en_US/productbatch.lang | 5 ++++- htdocs/langs/fr_FR/productbatch.lang | 5 ++++- htdocs/product/admin/product_lot.php | 32 ++++------------------------ 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index 9e299baf8f3..289b113b10a 100644 --- a/htdocs/langs/en_US/productbatch.lang +++ b/htdocs/langs/en_US/productbatch.lang @@ -27,4 +27,7 @@ StockDetailPerBatch=Stock detail per lot SerialNumberAlreadyInUse=Serial number %s is already used for product %s TooManyQtyForSerialNumber=You can only have one product %s for serial number %S BatchLotNumberingModules=Options for automatic generation of batch products managed by lots -BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers \ No newline at end of file +BatchSerialNumberingModules=Options for automatic generation of batch products managed by serial numbers +CustomMasks=Adds an option to define mask in the product card +LotProductTooltip=Adds an option in the product card to define a dedicated batch number mask +SNProductTooltip=Adds an option in the product card to define a dedicated serial number mask \ No newline at end of file diff --git a/htdocs/langs/fr_FR/productbatch.lang b/htdocs/langs/fr_FR/productbatch.lang index eed5a063318..cd38ac89278 100644 --- a/htdocs/langs/fr_FR/productbatch.lang +++ b/htdocs/langs/fr_FR/productbatch.lang @@ -27,4 +27,7 @@ StockDetailPerBatch=Stock détaillé par lot SerialNumberAlreadyInUse=Le numéro de série %s est déjà utilisé pour le produit %s TooManyQtyForSerialNumber=Vous ne pouvez avoir qu'un produit %s avec le numéro de série %s BatchLotNumberingModules=Modèle de génération et contrôle des numéros de lot -BatchSerialNumberingModules=Modèle de génération et contrôle des numéros de série \ No newline at end of file +BatchSerialNumberingModules=Modèle de génération et contrôle des numéros de série +CustomMasks=Ajoute une option pour définir le masque dans la fiche produit +LotProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de lot +SNProductTooltip=Crée un champ dans la fiche produit pour définir un modèle spécifique de numéro de série \ No newline at end of file diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index 79e64940d8f..47d1e6b780f 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -182,7 +182,7 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); - print 'lot_product'."\n"; + print 'Option'."\n"; print $langs->trans('CustomMasks'); print ''; @@ -207,19 +207,7 @@ foreach ($dirmodels as $reldir) { print ''; // Info - $htmltooltip = ''; - $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
'; - $nextval = $module->getNextValue($mysoc, $batch); - if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval - $htmltooltip .= ''.$langs->trans("NextValue").': '; - if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') - $nextval = $langs->trans($nextval); - $htmltooltip .= $nextval.'
'; - } else { - $htmltooltip .= $langs->trans($module->error).'
'; - } - } + $htmltooltip = $langs->trans("LotProductTooltip"); print ''; print $form->textwithpicto('', $htmltooltip, 1, 0); @@ -318,7 +306,7 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); - print 'sn_product'."\n"; + print 'Option'."\n"; print $langs->trans('CustomMasks'); print ''; @@ -343,19 +331,7 @@ foreach ($dirmodels as $reldir) { print ''; // Info - $htmltooltip = ''; - $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
'; - $nextval = $module->getNextValue($mysoc, $batch); - if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval - $htmltooltip .= ''.$langs->trans("NextValue").': '; - if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') - $nextval = $langs->trans($nextval); - $htmltooltip .= $nextval.'
'; - } else { - $htmltooltip .= $langs->trans($module->error).'
'; - } - } + $htmltooltip = $langs->trans("SNProductTooltip"); print ''; print $form->textwithpicto('', $htmltooltip, 1, 0); From 4ffc6531fec69877b77ea8e4376927e7554862ad Mon Sep 17 00:00:00 2001 From: altairis-noe Date: Wed, 7 Apr 2021 16:09:27 +0200 Subject: [PATCH 3/7] masks options are boolean --- htdocs/product/admin/product_lot.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index 47d1e6b780f..a3582a2b463 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -74,10 +74,10 @@ if ($action == 'updateMaskLot') { dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity); } if ($action == 'setmaskslot') { - dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); } if ($action == 'setmaskssn') { - dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); } /* @@ -195,12 +195,12 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS == 'true') { - print ''; + if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) { + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } @@ -319,12 +319,12 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS == 'true') { - print ''; + if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } From 14e5e63612c4643de36d80c189228b21608a0500 Mon Sep 17 00:00:00 2001 From: altairis-noe Date: Wed, 7 Apr 2021 16:44:51 +0200 Subject: [PATCH 4/7] one space too much --- htdocs/product/admin/product_lot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index a3582a2b463..2ae8ef9810e 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -72,7 +72,7 @@ if ($action == 'updateMaskLot') { dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity); } elseif ($action == 'setmodsn') { dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity); -} +} if ($action == 'setmaskslot') { dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); } From b7280f652414fb41a3d35880c30f0db489ff4389 Mon Sep 17 00:00:00 2001 From: altairis-noe Date: Thu, 8 Apr 2021 15:15:58 +0200 Subject: [PATCH 5/7] product masks are relevant only if we are in advanced mode --- htdocs/product/admin/product_lot.php | 120 ++++++++++++++------------- 1 file changed, 62 insertions(+), 58 deletions(-) diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index 2ae8ef9810e..874f4b9e8a9 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -182,38 +182,40 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); - print 'Option'."\n"; - print $langs->trans('CustomMasks'); - print ''; + if ($conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') { + print 'Option'."\n"; + print $langs->trans('CustomMasks'); + print ''; - // Show example of numbering model - print ''; - $tmp = 'NoExample'; - if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $langs->trans($tmp); - print ''."\n"; + // Show example of numbering model + print ''; + $tmp = 'NoExample'; + if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; + elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $langs->trans($tmp); + print ''."\n"; - print ''; - if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - } else { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; + print ''; + if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + + // Info + $htmltooltip = $langs->trans("LotProductTooltip"); + + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + + print "\n"; } - print ''; - - // Info - $htmltooltip = $langs->trans("LotProductTooltip"); - - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; - - print "\n"; } } } @@ -306,38 +308,40 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); - print 'Option'."\n"; - print $langs->trans('CustomMasks'); - print ''; + if ($conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced') { + print 'Option'."\n"; + print $langs->trans('CustomMasks'); + print ''; - // Show example of numbering model - print ''; - $tmp = 'NoExample'; - if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $langs->trans($tmp); - print ''."\n"; + // Show example of numbering model + print ''; + $tmp = 'NoExample'; + if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; + elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $langs->trans($tmp); + print ''."\n"; - print ''; - if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - } else { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; + print ''; + if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + print ''; + + // Info + $htmltooltip = $langs->trans("SNProductTooltip"); + + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; + + print "\n"; } - print ''; - - // Info - $htmltooltip = $langs->trans("SNProductTooltip"); - - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; - - print "\n"; } } } From a61c1f8807ba588a82764fdd9641827e7c5b11ca Mon Sep 17 00:00:00 2001 From: altairis-noe Date: Mon, 12 Apr 2021 14:01:36 +0200 Subject: [PATCH 6/7] checkboxes for custom masks --- .../product_batch/mod_lot_advanced.php | 10 +++ .../modules/product_batch/mod_sn_advanced.php | 10 +++ htdocs/product/admin/product_lot.php | 80 ++----------------- 3 files changed, 28 insertions(+), 72 deletions(-) diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index d8629b92dd6..c49a2963e3c 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -84,6 +84,16 @@ class mod_lot_advanced extends ModeleNumRefBatch $texte .= '  '; + // Option to enable custom masks per product + $texte .= ''; + if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { + $texte .= ''.img_picto($langs->trans("Enabled"), 'on').''; + } else { + $texte .= ''.img_picto($langs->trans("Disabled"), 'off').''; + } + $texte .= ' '.$langs->trans('CustomMasks')."\n"; + $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index 89d70a8239d..74f36a55fe6 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -84,6 +84,16 @@ class mod_sn_advanced extends ModeleNumRefBatch $texte .= '  '; + // Option to enable custom masks per product + $texte .= ''; + if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { + $texte .= ''.img_picto($langs->trans("Enabled"), 'on').''; + } else { + $texte .= ''.img_picto($langs->trans("Disabled"), 'off').''; + } + $texte .= ' '.$langs->trans('CustomMasks')."\n"; + $texte .= ''; + $texte .= ''; $texte .= ''; diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index 874f4b9e8a9..8cafa97e077 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -72,12 +72,16 @@ if ($action == 'updateMaskLot') { dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", $value, 'chaine', 0, '', $conf->entity); } elseif ($action == 'setmodsn') { dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", $value, 'chaine', 0, '', $conf->entity); -} -if ($action == 'setmaskslot') { +} elseif ($action == 'setmaskslot') { dolibarr_set_const($db, "PRODUCTBATCH_LOT_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); -} -if ($action == 'setmaskssn') { + if ($value == '1' && $conf->global->PRODUCTBATCH_LOT_ADDONS !== 'mod_lot_advanced') { + dolibarr_set_const($db, "PRODUCTBATCH_LOT_ADDON", 'mod_lot_advanced', 'chaine', 0, '', $conf->entity); + } +} elseif ($action == 'setmaskssn') { dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); + if ($value == '1' && $conf->global->PRODUCTBATCH_SN_ADDONS !== 'mod_sn_advanced') { + dolibarr_set_const($db, "PRODUCTBATCH_SN_ADDON", 'mod_sn_advanced', 'chaine', 0, '', $conf->entity); + } } /* @@ -182,40 +186,6 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); - if ($conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') { - print 'Option'."\n"; - print $langs->trans('CustomMasks'); - print ''; - - // Show example of numbering model - print ''; - $tmp = 'NoExample'; - if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $langs->trans($tmp); - print ''."\n"; - - print ''; - if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - } else { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; - } - print ''; - - // Info - $htmltooltip = $langs->trans("LotProductTooltip"); - - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; - - print "\n"; - } } } } @@ -308,40 +278,6 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); - if ($conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced') { - print 'Option'."\n"; - print $langs->trans('CustomMasks'); - print ''; - - // Show example of numbering model - print ''; - $tmp = 'NoExample'; - if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $langs->trans($tmp); - print ''."\n"; - - print ''; - if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - } else { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; - } - print ''; - - // Info - $htmltooltip = $langs->trans("SNProductTooltip"); - - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; - - print "\n"; - } } } } From ab39cfdf09012ceb87fa77784b9c892e89f8c94c Mon Sep 17 00:00:00 2001 From: altairis-noe Date: Mon, 12 Apr 2021 14:32:05 +0200 Subject: [PATCH 7/7] oops, better if we test the right const --- htdocs/core/modules/product_batch/mod_lot_advanced.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index c49a2963e3c..c580d8915c9 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -86,7 +86,7 @@ class mod_lot_advanced extends ModeleNumRefBatch // Option to enable custom masks per product $texte .= ''; - if ($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) { + if ($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) { $texte .= ''.img_picto($langs->trans("Enabled"), 'on').''; } else { $texte .= ''.img_picto($langs->trans("Disabled"), 'off').'';