From 59b1feaf2eae9424d52510bfcd88c094866757f4 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Jan 2022 08:27:49 +0100 Subject: [PATCH] fix include --- htdocs/bom/class/bom.class.php | 1 + htdocs/mrp/index.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index ecec1a56709..2dcaa0c0c6b 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -790,6 +790,7 @@ class BOM extends CommonObject $label .= '
'.$langs->trans('Label').': '.$this->label; } if (!empty($this->fk_product)) { + dol_include_once('/product/class/product.class.php'); $product = new Product($db); $resultFetch = $product->fetch($this->fk_product); if ($resultFetch < 0) { diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index c4480f76ed0..d9ee0e39cc6 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -155,7 +155,7 @@ print '
'; $max = 5; -$sql = "SELECT a.rowid, a.status, a.ref, a.tms as datem, a.status"; +$sql = "SELECT a.rowid, a.status, a.ref, a.tms as datem, a.status, a.fk_product"; $sql .= " FROM ".MAIN_DB_PREFIX."bom_bom as a"; $sql .= " WHERE a.entity IN (".getEntity('bom').")"; $sql .= $db->order("a.tms", "DESC"); @@ -176,6 +176,7 @@ if ($resql) { $staticbom->id = $obj->rowid; $staticbom->ref = $obj->ref; + $staticbom->fk_product = $obj->fk_product; $staticbom->date_modification = $obj->datem; $staticbom->status = $obj->status;