From 7ad70c7c218410575065b6fff36acfe9604ead0e Mon Sep 17 00:00:00 2001 From: Frans Bosman Date: Mon, 7 Dec 2020 14:33:44 +0100 Subject: [PATCH] Update product.class.php Added Hidden Option STOCK_DEFAULT_BATCH, in order to replace the default '000000' batchnumber for the existing stock when batchnumbers are enabled for a product. --- htdocs/product/class/product.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ac931da8702..9abd1d82da5 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -934,6 +934,7 @@ class Product extends CommonObject if ($this->hasbatch() && !$this->oldcopy->hasbatch()) { //$valueforundefinedlot = 'Undefined'; // In previous version, 39 and lower $valueforundefinedlot = '000000'; + if ($conf->global->STOCK_DEFAULT_BATCH) $valueforundefinedlot = $conf->global->STOCK_DEFAULT_BATCH; dol_syslog("Flag batch of product id=".$this->id." is set to ON, so we will create missing records into product_batch");