Skip to content
Snippets Groups Projects
Commit 3db231ce authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #2232 from defrance69/patch-43

Update commondocgenerator.class.php
parents 34fe8753 e07bb07b
No related branches found
No related tags found
No related merge requests found
......@@ -404,7 +404,7 @@ abstract class CommonDocGenerator
{
global $conf;
return array(
$resarray= array(
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
'line_product_ref'=>$line->product_ref,
'line_product_label'=>$line->product_label,
......@@ -425,6 +425,18 @@ abstract class CommonDocGenerator
'line_date_end'=>$line->date_end,
'line_date_end_rfc'=>dol_print_date($line->date_end,'rfc')
);
// Retrieve extrafields
$extrafieldkey=$line->element;
$array_key="line";
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields = new ExtraFields($this->db);
$extralabels = $extrafields->fetch_name_optionals_label($extrafieldkey,true);
$line->fetch_optionals($line->rowid,$extralabels);
$resarray = $this->fill_substitutionarray_with_extrafields($line,$resarray,$extrafields,$array_key=$array_key,$outputlangs);
return $resarray;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment