From 3156f8cae0fe0f4939849310fb4f52e3b2cc61e2 Mon Sep 17 00:00:00 2001 From: lalaina rasamoelina Date: Tue, 27 Aug 2013 10:17:28 +0200 Subject: [PATCH 1/2] Fix: [ bug #1043 ] Bad interventions ref numbering --- .../boxes/box_graph_product_distribution.php | 24 +++++++++---------- htdocs/core/class/dolgraph.class.php | 18 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 2c63690e547..0cff88d41b4 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -95,10 +95,10 @@ class box_graph_product_distribution extends ModeleBoxes $nowarray=dol_getdate(dol_now(),true); $year=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']); - $nbofgraph=0; - if ($showinvoicenb) $nbofgraph++; - if ($showpropalnb) $nbofgraph++; - if ($showordernb) $nbofgraph++; + $nbofgraph=0; + if ($showinvoicenb) $nbofgraph++; + if ($showpropalnb) $nbofgraph++; + if ($showordernb) $nbofgraph++; $paramtitle=$langs->trans("Products").'/'.$langs->trans("Services"); if (empty($conf->produit->enabled)) $paramtitle=$langs->trans("Services"); @@ -322,18 +322,18 @@ class box_graph_product_distribution extends ModeleBoxes $stringtoshow.='
'; if ($showinvoicenb) $stringtoshow.=$px1->show(); else if ($showpropalnb) $stringtoshow.=$px2->show(); - $stringtoshow.='
'; + $stringtoshow.='
'; if ($showordernb) $stringtoshow.=$px3->show(); else if ($showpropalnb) $stringtoshow.=$px2->show(); - $stringtoshow.='
'; + $stringtoshow.=''; } - if ($nbofgraph == 3) + if ($nbofgraph == 3) { - $stringtoshow.='
'; - $stringtoshow.=$px1->show(); - $stringtoshow.='
'; - $stringtoshow.=$px2->show(); - $stringtoshow.='
'; + $stringtoshow.='
'; + $stringtoshow.=$px1->show(); + $stringtoshow.='
'; + $stringtoshow.=$px2->show(); + $stringtoshow.='
'; $stringtoshow.='
'; $stringtoshow.=$px3->show(); $stringtoshow.='
'; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index ac603837240..612c73a01bb 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -244,15 +244,15 @@ class DolGraph $this->data = $data; } - /** - * Set data - * - * @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...) - * @return void - */ - function SetDataColor($datacolor) - { - $this->datacolor = $datacolor; + /** + * Set data + * + * @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...) + * @return void + */ + function SetDataColor($datacolor) + { + $this->datacolor = $datacolor; } /** From fcd6985196bf7ca15b696af0b04e90c383076036 Mon Sep 17 00:00:00 2001 From: lalaina rasamoelina Date: Wed, 7 Aug 2013 10:17:18 +0200 Subject: [PATCH 2/2] T966-develop : Put the poste of the contact in the list In the list of contact when we send a mail,i added the post of person in () after the name htdocs/commande/fiche.php?id=481&action=presend&mode=init --- htdocs/societe/class/societe.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9127adc3a8f..c424f2bc2fa 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1581,8 +1581,7 @@ class Societe extends CommonObject $contact_property = array(); - - $sql = "SELECT rowid, email, statut, phone_mobile, lastname, firstname"; + $sql = "SELECT rowid, email, phone_mobile, lastname, poste, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = '".$this->id."'"; @@ -1604,6 +1603,12 @@ class Societe extends CommonObject { $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">"; + if(!empty($obj->poste)){ + $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))."(".$obj->poste.")"." <".$property.">"; + } + else + { + $contact_property[$obj->rowid] = trim(dolGetFirstLastname($obj->firstname,$obj->lastname))." <".$property.">"; } $i++; }