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

Fix: Substition of extra field was ko for order.

parent fb789b81
No related branches found
No related tags found
No related merge requests found
...@@ -516,7 +516,7 @@ class ExtraFields ...@@ -516,7 +516,7 @@ class ExtraFields
/** /**
* Load array this->attribute_label * Load array this->attribute_label
* *
* @param string $elementtype Type of element * @param string $elementtype Type of element ('adherent', 'commande', societe', 'facture', 'propal', 'product', ...)
* @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED
* @return array Array of attributes for all extra fields * @return array Array of attributes for all extra fields
*/ */
......
...@@ -140,6 +140,16 @@ class doc_generic_order_odt extends ModelePDFCommandes ...@@ -140,6 +140,16 @@ class doc_generic_order_odt extends ModelePDFCommandes
$resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva; $resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva;
} }
// Retrieve extrafields
if(is_array($object->array_options) && count($object->array_options))
{
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields = new ExtraFields($this->db);
$extralabels = $extrafields->fetch_name_optionals_label('commande',true);
$object->fetch_optionals($object->id,$extralabels);
$resarray = $this->fill_substitutionarray_with_extrafields($object,$resarray,$extrafields,$array_key='object',$outputlangs);
}
return $resarray; return $resarray;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment