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.
This commit is contained in:
Frans Bosman 2020-12-07 14:33:44 +01:00 committed by GitHub
parent d1c66059cd
commit 7ad70c7c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");