From 53ca1546d0356d38c5a3e04d16c25fe9913515b0 Mon Sep 17 00:00:00 2001 From: fhenry Date: Fri, 26 Apr 2013 16:58:04 +0200 Subject: [PATCH] Fetch optionnal into fetch of propal --- htdocs/comm/propal/class/propal.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 40a6fb9e142..414f007b26b 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1098,6 +1098,16 @@ class Propal extends CommonObject { $this->brouillon = 1; } + + // Retreive all extrafield for invoice + // fetch optionals attributes and labels + if(!class_exists('Extrafields')) + require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + if (count($extralabels)>0) { + $this->fetch_optionals($this->id,$extralabels); + } $this->db->free($resql);