Update bom.class.php
This commit is contained in:
parent
f5c04c81a9
commit
c334c3cd58
@ -789,14 +789,12 @@ class BOM extends CommonObject
|
|||||||
if (isset($this->label)) {
|
if (isset($this->label)) {
|
||||||
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
|
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
|
||||||
}
|
}
|
||||||
if (!empty($this->fk_product)) {
|
if (!empty($this->fk_product) && $this->fk_product > 0) {
|
||||||
dol_include_once('/product/class/product.class.php');
|
include_once DOL_DOCUMENT_ROO.'/product/class/product.class.php';
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$resultFetch = $product->fetch($this->fk_product);
|
$resultFetch = $product->fetch($this->fk_product);
|
||||||
if ($resultFetch < 0) {
|
if ($resultFetch > 0) {
|
||||||
setEventMessages($product->error, $product->errors, 'errors');
|
$label .= "<br><b>".$langs->trans("Product").'</b>: '.$product->label;
|
||||||
} else {
|
|
||||||
$label .= "<br><b>".$langs->trans("Product").'</b>: '.$product->getNomUrl(0, '', 0, -1, 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user