Skip to content
Snippets Groups Projects
Commit e07bb07b authored by Charles Benke's avatar Charles Benke
Browse files

Update commondocgenerator.class.php

add extrafield on odt lines
parent 34a1ea4b
Branches
Tags
No related merge requests found
...@@ -404,7 +404,7 @@ abstract class CommonDocGenerator ...@@ -404,7 +404,7 @@ abstract class CommonDocGenerator
{ {
global $conf; global $conf;
return array( $resarray= array(
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs), 'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
'line_product_ref'=>$line->product_ref, 'line_product_ref'=>$line->product_ref,
'line_product_label'=>$line->product_label, 'line_product_label'=>$line->product_label,
...@@ -425,6 +425,18 @@ abstract class CommonDocGenerator ...@@ -425,6 +425,18 @@ abstract class CommonDocGenerator
'line_date_end'=>$line->date_end, 'line_date_end'=>$line->date_end,
'line_date_end_rfc'=>dol_print_date($line->date_end,'rfc') '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.
Please register or to comment