In ODT document add currency symbol with extrafields of type "price"

This commit is contained in:
jfefe 2013-02-18 00:58:40 +01:00
parent 8ebb48cb5c
commit 71a2b4c8c0

View File

@ -171,11 +171,13 @@ abstract class CommonDocGenerator
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extrafields = new ExtraFields($this->db);
$extralabels = $extrafields->fetch_name_optionals_label('company',true);
//Get extrafield values
$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);
}
$array_thirdparty=array_merge($array_thirdparty,array('company_options_'.$key => $object->array_options['options_'.$key]));
}
}