瀏覽代碼

fix include

Florian HENRY 3 年之前
父節點
當前提交
59b1feaf2e
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      htdocs/bom/class/bom.class.php
  2. 2 1
      htdocs/mrp/index.php

+ 1 - 0
htdocs/bom/class/bom.class.php

@@ -790,6 +790,7 @@ class BOM extends CommonObject
 			$label .= '<br><b>'.$langs->trans('Label').':</b> '.$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) {

+ 2 - 1
htdocs/mrp/index.php

@@ -155,7 +155,7 @@ print '</div><div class="fichetwothirdright">';
 
 $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;