Update commondocgenerator.class.php

This commit is contained in:
Laurent Destailleur 2021-11-11 15:02:51 +01:00 committed by GitHub
parent 7c5810dee6
commit c6ecf87a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -559,14 +559,6 @@ abstract class CommonDocGenerator
$resarray = $this->fill_substitutionarray_with_extrafields($object, $resarray, $extrafields, $array_key, $outputlangs);
}
// Load product data optional fields to the line -> enables to use "line_options_{extrafield}"
if (isset($line->fk_product) && $line->fk_product > 0) {
$tmpproduct = new Product($this->db);
$result = $tmpproduct->fetch($line->fk_product);
foreach ($tmpproduct->array_options as $key=>$label)
$resarray["line_".$key] = $label;
}
return $resarray;
}