Skip to content

Commit

Permalink
Fix : display correct value in ODT for extrafields
Browse files Browse the repository at this point in the history
  • Loading branch information
jfefe committed Feb 18, 2013
1 parent 71a2b4c commit 110713f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion htdocs/core/class/commondocgenerator.class.php
Expand Up @@ -171,16 +171,21 @@ function get_substitutionarray_thirdparty($object,$outputlangs)
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields = new ExtraFields($this->db);
$extralabels = $extrafields->fetch_name_optionals_label('company',true);
$object->fetch_optionals($object->id,$extralabels);

foreach($extrafields->attribute_label as $key=>$label)
{
if($extrafields->attribute_type[$key] == 'price')
{
$object->array_options['options_'.$key] = price($object->array_options['options_'.$key]).' '.$outputlangs->getCurrencySymbol($conf->currency);
}
else if($extrafields->attribute_type[$key] == 'select')
{
$object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]];
}
$array_thirdparty=array_merge($array_thirdparty,array('company_options_'.$key => $object->array_options['options_'.$key]));
}
}
}
return $array_thirdparty;
}

Expand Down

0 comments on commit 110713f

Please sign in to comment.