From 71a2b4c8c0a4653ca4cceec3a8b945cdce48b36c Mon Sep 17 00:00:00 2001
From: jfefe <jfefe@aternatik.fr>
Date: Mon, 18 Feb 2013 00:58:40 +0100
Subject: [PATCH] In ODT document add currency symbol with extrafields of type
 "price"

---
 htdocs/core/class/commondocgenerator.class.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 3b815e962c0..aec9e74dcb8 100755
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -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]));
         	}
         }
-- 
GitLab