diff --git a/htdocs/langs/en_US/productbatch.lang b/htdocs/langs/en_US/productbatch.lang index a63442d4b74..a83d247acb4 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 d1b87bf0b14..a3582a2b463 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, 'bool', 0, '', $conf->entity); +} +if ($action == 'setmaskssn') { + dolibarr_set_const($db, "PRODUCTBATCH_SN_USE_PRODUCT_MASKS", $value, 'bool', 0, '', $conf->entity); } /* @@ -176,6 +182,38 @@ foreach ($dirmodels as $reldir) { } } closedir($handle); + print '