Merge pull request #8185 from BitKFu/develop
NEW Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
This commit is contained in:
commit
f3ffc7ce8a
@ -527,7 +527,16 @@ abstract class CommonDocGenerator
|
|||||||
$line->fetch_optionals($line->rowid,$extralabels);
|
$line->fetch_optionals($line->rowid,$extralabels);
|
||||||
|
|
||||||
$resarray = $this->fill_substitutionarray_with_extrafields($line,$resarray,$extrafields,$array_key=$array_key,$outputlangs);
|
$resarray = $this->fill_substitutionarray_with_extrafields($line,$resarray,$extrafields,$array_key=$array_key,$outputlangs);
|
||||||
|
|
||||||
|
// Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
|
||||||
|
if (isset($line->product_ref))
|
||||||
|
{
|
||||||
|
$product = new Product($this->db);
|
||||||
|
$result = $product->fetch(null, $line->product_ref);
|
||||||
|
foreach($product->array_options as $key=>$label)
|
||||||
|
$resarray["line_".$key] = $label;
|
||||||
|
}
|
||||||
|
|
||||||
return $resarray;
|
return $resarray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user