Merge pull request #1203 from PaulPoulain/966-develop
T966-develop : Put the poste of the contact in the list
This commit is contained in:
commit
1392f4e623
@ -95,10 +95,10 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
$nowarray=dol_getdate(dol_now(),true);
|
$nowarray=dol_getdate(dol_now(),true);
|
||||||
$year=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']);
|
$year=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']);
|
||||||
|
|
||||||
$nbofgraph=0;
|
$nbofgraph=0;
|
||||||
if ($showinvoicenb) $nbofgraph++;
|
if ($showinvoicenb) $nbofgraph++;
|
||||||
if ($showpropalnb) $nbofgraph++;
|
if ($showpropalnb) $nbofgraph++;
|
||||||
if ($showordernb) $nbofgraph++;
|
if ($showordernb) $nbofgraph++;
|
||||||
|
|
||||||
$paramtitle=$langs->trans("Products").'/'.$langs->trans("Services");
|
$paramtitle=$langs->trans("Products").'/'.$langs->trans("Services");
|
||||||
if (empty($conf->produit->enabled)) $paramtitle=$langs->trans("Services");
|
if (empty($conf->produit->enabled)) $paramtitle=$langs->trans("Services");
|
||||||
@ -322,18 +322,18 @@ class box_graph_product_distribution extends ModeleBoxes
|
|||||||
$stringtoshow.='<div class="fichecenter"><div class="containercenter"><div class="fichehalfleft">';
|
$stringtoshow.='<div class="fichecenter"><div class="containercenter"><div class="fichehalfleft">';
|
||||||
if ($showinvoicenb) $stringtoshow.=$px1->show();
|
if ($showinvoicenb) $stringtoshow.=$px1->show();
|
||||||
else if ($showpropalnb) $stringtoshow.=$px2->show();
|
else if ($showpropalnb) $stringtoshow.=$px2->show();
|
||||||
$stringtoshow.='</div><div class="fichehalfright">';
|
$stringtoshow.='</div><div class="fichehalfright">';
|
||||||
if ($showordernb) $stringtoshow.=$px3->show();
|
if ($showordernb) $stringtoshow.=$px3->show();
|
||||||
else if ($showpropalnb) $stringtoshow.=$px2->show();
|
else if ($showpropalnb) $stringtoshow.=$px2->show();
|
||||||
$stringtoshow.='</div></div></div>';
|
$stringtoshow.='</div></div></div>';
|
||||||
}
|
}
|
||||||
if ($nbofgraph == 3)
|
if ($nbofgraph == 3)
|
||||||
{
|
{
|
||||||
$stringtoshow.='<div class="fichecenter"><div class="containercenter"><div class="fichehalfleft">';
|
$stringtoshow.='<div class="fichecenter"><div class="containercenter"><div class="fichehalfleft">';
|
||||||
$stringtoshow.=$px1->show();
|
$stringtoshow.=$px1->show();
|
||||||
$stringtoshow.='</div><div class="fichehalfright">';
|
$stringtoshow.='</div><div class="fichehalfright">';
|
||||||
$stringtoshow.=$px2->show();
|
$stringtoshow.=$px2->show();
|
||||||
$stringtoshow.='</div></div></div>';
|
$stringtoshow.='</div></div></div>';
|
||||||
$stringtoshow.='<div class="fichecenter"><div class="containercenter">';
|
$stringtoshow.='<div class="fichecenter"><div class="containercenter">';
|
||||||
$stringtoshow.=$px3->show();
|
$stringtoshow.=$px3->show();
|
||||||
$stringtoshow.='</div></div>';
|
$stringtoshow.='</div></div>';
|
||||||
|
|||||||
@ -244,15 +244,15 @@ class DolGraph
|
|||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set data
|
* Set data
|
||||||
*
|
*
|
||||||
* @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...)
|
* @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function SetDataColor($datacolor)
|
function SetDataColor($datacolor)
|
||||||
{
|
{
|
||||||
$this->datacolor = $datacolor;
|
$this->datacolor = $datacolor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1581,8 +1581,7 @@ class Societe extends CommonObject
|
|||||||
$contact_property = array();
|
$contact_property = array();
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "SELECT rowid, email, phone_mobile, lastname, poste, firstname";
|
||||||
$sql = "SELECT rowid, email, statut, phone_mobile, lastname, firstname";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople";
|
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople";
|
||||||
$sql.= " WHERE fk_soc = '".$this->id."'";
|
$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.">";
|
$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++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user