From de6cb5f4ee145bbf91a4f3284e29e2430563282f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Aug 2023 21:58:28 +0200 Subject: [PATCH] Fix warnings --- htdocs/bom/class/bom.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 02207be5265..f6a5620c51c 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -72,6 +72,10 @@ class BOM extends CommonObject */ public $picto = 'bom'; + /** + * @var Product Object product of the BOM + */ + public $product; const STATUS_DRAFT = 0; const STATUS_VALIDATED = 1; @@ -909,7 +913,7 @@ class BOM extends CommonObject */ public function validate($user, $notrigger = 0) { - global $conf, $langs; + global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1354,7 +1358,7 @@ class BOM extends CommonObject { $this->initAsSpecimenCommon(); $this->ref = 'BOM-123'; - $this->date = $this->date_creation; + $this->date_creation = dol_now() - 20000; }