Look and feel v17

This commit is contained in:
Laurent Destailleur 2022-09-15 03:08:33 +02:00
parent 0cd0314369
commit 91bdaae898
13 changed files with 114 additions and 60 deletions

View File

@ -1742,7 +1742,7 @@ if ($action == 'create') {
//$warehouse_id = $soc->warehouse_id;
} else {
print '<td class="valuefieldcreate">';
print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx');
// reload page to retrieve customer informations
if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) {
print '<script type="text/javascript">

View File

@ -204,7 +204,7 @@ if (empty($user->socid)) {
$checkedtypetiers = 0;
$arrayfields = array(
'p.ref'=>array('label'=>"Ref", 'checked'=>1),
'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1),
'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>-1),
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(!isModEnabled('project') ? 0 : 1)),
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1)),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
@ -249,6 +249,28 @@ $arrayfields = array(
'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
);
// List of fields to search into when doing a "search in all"
/*$fieldstosearchall = array();
foreach ($object->fields as $key => $val) {
if (!empty($val['searchall'])) {
$fieldstosearchall['t.'.$key] = $val['label'];
}
}*/
// Definition of array of fields for columns
/*$arrayfields = array();
foreach ($object->fields as $key => $val) {
// If $val['visible']==0, then we never show the field
if (!empty($val['visible'])) {
$visible = (int) dol_eval($val['visible'], 1);
$arrayfields['t.'.$key] = array(
'label'=>$val['label'],
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=> isset($val['help']) ? $val['help'] : ''
);
}
}*/
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@ -529,7 +551,7 @@ $sql = 'SELECT';
if ($sall || $search_product_category > 0 || $search_user > 0) {
$sql = 'SELECT DISTINCT';
}
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax , s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax , s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, ';
$sql .= " typent.code as typent_code,";
$sql .= " ava.rowid as availability,";
$sql .= " country.code as country_code,";
@ -1520,6 +1542,7 @@ if ($resql) {
'sortorder' => $sortorder,
'totalarray' => &$totalarray,
);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['p.datec']['checked'])) {
@ -1562,8 +1585,11 @@ if ($resql) {
$total_ht = 0;
$total_margin = 0;
$last_num = min($num, $limit);
while ($i < $last_num) {
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
$objectstatic->id = $obj->rowid;
@ -1578,6 +1604,7 @@ if ($resql) {
$companystatic->name = $obj->name;
$companystatic->name_alias = $obj->alias;
$companystatic->client = $obj->client;
$companystatic->fournisseur = $obj->fournisseur;
$companystatic->code_client = $obj->code_client;
$companystatic->email = $obj->email;
$companystatic->phone = $obj->phone;
@ -1671,7 +1698,7 @@ if ($resql) {
if (!empty($arrayfields['p.ref_client']['checked'])) {
// Customer ref
print '<td class="nowrap tdoverflowmax200">';
print $obj->ref_client;
print dol_escape_htmltag($obj->ref_client);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
@ -1694,7 +1721,7 @@ if ($resql) {
// Project label
print '<td class="nowrap">';
if ($obj->project_id > 0) {
print $projectstatic->title;
print dol_escape_htmltag($projectstatic->title);
}
print '</td>';
if (!$i) {
@ -1704,7 +1731,7 @@ if ($resql) {
// Thirdparty
if (!empty($arrayfields['s.nom']['checked'])) {
print '<td class="tdoverflowmax200">';
print '<td class="tdoverflowmax150">';
print $companystatic->getNomUrl(1, 'customer');
print '</td>';
if (!$i) {
@ -1988,7 +2015,7 @@ if ($resql) {
// Author
if (!empty($arrayfields['u.login']['checked'])) {
print '<td class="tdoverflowmax200">';
print '<td class="tdoverflowmax150">';
if ($userstatic->id) {
print $userstatic->getNomUrl(-1);
}
@ -2080,7 +2107,7 @@ if ($resql) {
if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate';
}
if ($i >= $last_num - 1) {
if ($i >= $imaxinloop - 1) {
if (!empty($total_ht)) {
$totalarray['val']['total_mark_rate'] = price2num($total_margin * 100 / $total_ht, 'MT');
} else {

View File

@ -1751,7 +1751,7 @@ if ($action == 'create' && $usercancreate) {
print '</td>';
} else {
print '<td>';
print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
print img_picto('', 'company').$form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
// reload page to retrieve customer informations
if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) {
print '<script type="text/javascript">

View File

@ -792,7 +792,7 @@ $sql = 'SELECT';
if ($sall || $search_product_category > 0 || $search_user > 0) {
$sql = 'SELECT DISTINCT';
}
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client,';
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
$sql .= " country.code as country_code,";
@ -1862,8 +1862,10 @@ if ($resql) {
$total_ht = 0;
$total_margin = 0;
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$imaxinloop = ($limit ? min($num, $limit) : $num);
$last_num = min($num, $limit);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
@ -1877,6 +1879,7 @@ if ($resql) {
$companystatic->name = $obj->name;
$companystatic->name_alias = $obj->alias;
$companystatic->client = $obj->client;
$companystatic->fournisseur = $obj->fournisseur;
$companystatic->code_client = $obj->code_client;
$companystatic->email = $obj->email;
$companystatic->phone = $obj->phone;
@ -1893,7 +1896,6 @@ if ($resql) {
$generic_commande->statut = $obj->fk_statut;
$generic_commande->billed = $obj->billed;
$generic_commande->date = $db->jdate($obj->date_commande);
$generic_commande->date_livraison = $db->jdate($obj->date_delivery); // deprecated
$generic_commande->delivery_date = $db->jdate($obj->date_delivery);
$generic_commande->ref_client = $obj->ref_client;
$generic_commande->total_ht = $obj->total_ht;
@ -1978,7 +1980,7 @@ if ($resql) {
// Third party
if (!empty($arrayfields['s.nom']['checked'])) {
print '<td class="tdoverflowmax200">';
print '<td class="tdoverflowmax150">';
print $getNomUrl_cache[$obj->socid];
// If module invoices enabled and user with invoice creation permissions
@ -2314,7 +2316,7 @@ if ($resql) {
if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate';
}
if ($i >= $last_num - 1) {
if ($i >= $imaxinloop - 1) {
if (!empty($total_ht)) {
$totalarray['val']['total_mark_rate'] = price2num($total_margin * 100 / $total_ht, 'MT');
} else {

View File

@ -3192,7 +3192,7 @@ if ($action == 'create') {
} else {
print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td>';
print '<td colspan="2">';
print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
// Option to reload page to retrieve customer informations.
if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) {
print '<script type="text/javascript">
@ -4410,9 +4410,7 @@ if ($action == 'create') {
// Type
print '<tr><td class="titlefield fieldname_type">'.$langs->trans('Type').'</td><td class="valuefield fieldname_type">';
print '<span class="badgeneutral">';
print $object->getLibType();
print '</span>';
print $object->getLibType(2);
if ($object->module_source) {
print ' <span class="opacitymediumbycolor paddingleft">('.$langs->trans("POS").' '.ucfirst($object->module_source).' - '.$langs->trans("Terminal").' '.$object->pos_source.')</span>';
}

View File

@ -1821,21 +1821,10 @@ class Facture extends CommonInvoice
if ($user->rights->facture->lire) {
$label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->trans("Invoice").'</u>';
if ($this->type == self::TYPE_REPLACEMENT) {
$label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("ReplacementInvoice").'</u>';
}
if ($this->type == self::TYPE_CREDIT_NOTE) {
$label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("CreditNote").'</u>';
}
if ($this->type == self::TYPE_DEPOSIT) {
$label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("Deposit").'</u>';
}
if ($this->type == self::TYPE_SITUATION) {
$label = img_picto('', $picto).' <u class="paddingrightonly">'.$langs->transnoentitiesnoconv("InvoiceSituation").'</u>';
}
if (isset($this->statut) && isset($this->alreadypaid)) {
$label .= ' '.$this->getLibStatut(5, $this->alreadypaid);
}
$label .= ' &nbsp; '.$this->getLibType(1);
if (!empty($this->ref)) {
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
}

View File

@ -1273,15 +1273,15 @@ if ($resql) {
print '<td class="liste_titre maxwidthonsmartphone">';
$listtype = array(
Facture::TYPE_STANDARD=>$langs->trans("InvoiceStandard"),
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"),
Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"),
Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"),
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
);
if (!empty($conf->global->INVOICE_USE_SITUATION)) {
$listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation");
}
//$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order.
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100');
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
print '</td>';
}
// Date invoice
@ -1734,8 +1734,11 @@ if ($resql) {
$total_ht = 0;
$total_margin = 0;
$last_num = min($num, $limit);
while ($i < $last_num) {
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
$datelimit = $db->jdate($obj->datelimite);
@ -1752,7 +1755,8 @@ if ($resql) {
$facturestatic->multicurrency_total_ht = $obj->multicurrency_total_ht;
$facturestatic->multicurrency_total_tva = $obj->multicurrency_total_vat;
$facturestatic->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
$facturestatic->statut = $obj->fk_statut;
$facturestatic->statut = $obj->fk_statut; // deprecated
$facturestatic->status = $obj->fk_statut;
$facturestatic->close_code = $obj->close_code;
$facturestatic->total_ttc = $obj->total_ttc;
$facturestatic->paye = $obj->paye;
@ -1764,6 +1768,7 @@ if ($resql) {
$facturestatic->note_public = $obj->note_public;
$facturestatic->note_private = $obj->note_private;
if (!empty($conf->global->INVOICE_USE_SITUATION) && !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
$facturestatic->retained_warranty = $obj->retained_warranty;
$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
@ -1899,7 +1904,7 @@ if ($resql) {
// Type
if (!empty($arrayfields['f.type']['checked'])) {
print '<td class="nowraponall tdoverflowmax100" title="'.$facturestatic->getLibType().'">';
print $facturestatic->getLibType();
print $facturestatic->getLibType(2);
print "</td>";
if (!$i) {
$totalarray['nbfield']++;
@ -2340,7 +2345,7 @@ if ($resql) {
if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate';
}
if ($i >= $last_num - 1) {
if ($i >= $imaxinloop - 1) {
if (!empty($total_ht)) {
$totalarray['val']['total_mark_rate'] = price2num($total_margin * 100 / $total_ht, 'MT');
} else {

View File

@ -131,8 +131,8 @@ abstract class CommonInvoice extends CommonObject
* Return amount of payments already done. This must include ONLY the record into the payment table.
* Payments dones using discounts, credit notes, etc are not included.
*
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return float Amount of payment already done, <0 and set ->error if KO
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return float|int Amount of payment already done, <0 and set ->error if KO
*/
public function getSommePaiement($multicurrency = 0)
{
@ -148,17 +148,23 @@ abstract class CommonInvoice extends CommonObject
$sql .= " WHERE ".$field." = ".((int) $this->id);
dol_syslog(get_class($this)."::getSommePaiement", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$obj = $this->db->fetch_object($resql);
$this->db->free($resql);
if ($multicurrency) {
$this->sumpayed_multicurrency = $obj->multicurrency_amount;
return $obj->multicurrency_amount;
if ($obj) {
if ($multicurrency) {
$this->sumpayed_multicurrency = $obj->multicurrency_amount;
return (float) $obj->multicurrency_amount;
} else {
$this->sumpayed = $obj->amount;
return (float) $obj->amount;
}
} else {
$this->sumpayed = $obj->amount;
return $obj->amount;
return 0;
}
} else {
$this->error = $this->db->lasterror();
@ -513,25 +519,43 @@ abstract class CommonInvoice extends CommonObject
/**
* Return label of type of invoice
*
* @return string Label of type of invoice
* @param int $withbadge 1=Add span for badge css, 2=Add span and show short label
* @return string Label of type of invoice
*/
public function getLibType()
public function getLibType($withbadge = 0)
{
global $langs;
$labellong = "Unknown";
if ($this->type == CommonInvoice::TYPE_STANDARD) {
return $langs->trans("InvoiceStandard");
$labellong = "InvoiceStandard";
$labelshort = "InvoiceStandardShort";
} elseif ($this->type == CommonInvoice::TYPE_REPLACEMENT) {
return $langs->trans("InvoiceReplacement");
$labellong = "InvoiceReplacement";
$labelshort = "InvoiceReplacementShort";
} elseif ($this->type == CommonInvoice::TYPE_CREDIT_NOTE) {
return $langs->trans("InvoiceAvoir");
$labellong = "InvoiceAvoir";
$labelshort = "CreditNote";
} elseif ($this->type == CommonInvoice::TYPE_DEPOSIT) {
return $langs->trans("InvoiceDeposit");
$labellong = "InvoiceDeposit";
$labelshort = "Deposit";
} elseif ($this->type == CommonInvoice::TYPE_PROFORMA) {
return $langs->trans("InvoiceProForma"); // Not used.
$labellong = "InvoiceProForma"; // Not used.
$labelshort = "ProForma";
} elseif ($this->type == CommonInvoice::TYPE_SITUATION) {
return $langs->trans("InvoiceSituation");
$labellong = "InvoiceSituation";
$labelshort = "Situation";
}
return $langs->trans("Unknown");
$out = '';
if ($withbadge) {
$out .= '<span class="badgeneutral" title="'.dol_escape_htmltag($langs->trans($labellong)).'">';
}
$out .= $langs->trans($withbadge == 2 ? $labelshort : $labellong);
if ($withbadge) {
$out .= '</span>';
}
return $out;
}
/**

View File

@ -1698,7 +1698,7 @@ if ($action == 'create') {
print $societe->getNomUrl(1, 'supplier');
print '<input type="hidden" name="socid" value="'.$societe->id.'">';
} else {
print img_picto('', 'company').$form->select_company((empty($socid) ? '' : $socid), 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
print img_picto('', 'company').$form->select_company((empty($socid) ? '' : $socid), 'socid', 's.fournisseur=1', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 maxwidth500 widthcentpercentminusxx');
// reload page to retrieve customer informations
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) {
print '<script>

View File

@ -755,7 +755,7 @@ $sql = 'SELECT';
if ($sall || $search_product_category > 0) {
$sql = 'SELECT DISTINCT';
}
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,';
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.email,';
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,cf.date_valid, cf.date_approve,";
@ -1627,7 +1627,7 @@ if ($resql) {
}
// Ref Supplier
if (!empty($arrayfields['cf.ref_supplier']['checked'])) {
print '<td>'.$obj->ref_supplier.'</td>'."\n";
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->ref_supplier).'">'.dol_escape_htmltag($obj->ref_supplier).'</td>'."\n";
if (!$i) {
$totalarray['nbfield']++;
}
@ -1671,6 +1671,8 @@ if ($resql) {
$thirdpartytmp->name = $obj->name;
$thirdpartytmp->email = $obj->email;
$thirdpartytmp->name_alias = $obj->alias;
$thirdpartytmp->client = $obj->client;
$thirdpartytmp->fournisseur = $obj->fournisseur;
print $thirdpartytmp->getNomUrl(1, 'supplier', 0, 0, -1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1);
print '</td>'."\n";
if (!$i) {

View File

@ -2053,7 +2053,7 @@ if ($action == 'create') {
print $societe->getNomUrl(1, 'supplier');
print '<input type="hidden" name="socid" value="'.$societe->id.'">';
} else {
print img_picto('', 'company').$form->select_company(!empty($societe->id) ? $societe->id : 0, 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
print img_picto('', 'company').$form->select_company(!empty($societe->id) ? $societe->id : 0, 'socid', 's.fournisseur=1', 'SelectThirdParty', 1, 0, null, 0, 'minwidth175 widthcentpercentminusxx maxwidth500');
// reload page to retrieve supplier informations
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) {
print '<script type="text/javascript">

View File

@ -17,6 +17,7 @@ DisabledBecauseNotErasable=Disabled because cannot be erased
InvoiceStandard=Standard invoice
InvoiceStandardAsk=Standard invoice
InvoiceStandardDesc=This kind of invoice is the common invoice.
InvoiceStandardShort=Standard
InvoiceDeposit=Down payment invoice
InvoiceDepositAsk=Down payment invoice
InvoiceDepositDesc=This kind of invoice is done when a down payment has been received.
@ -24,6 +25,7 @@ InvoiceProForma=Proforma invoice
InvoiceProFormaAsk=Proforma invoice
InvoiceProFormaDesc=<b>Proforma invoice</b> is an image of a true invoice but has no accountancy value.
InvoiceReplacement=Replacement invoice
InvoiceReplacementShort=Replacement
InvoiceReplacementAsk=Replacement invoice for invoice
InvoiceReplacementDesc=<b>Replacement invoice</b> is used to completely replace an invoice with no payment already received.<br><br>Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'.
InvoiceAvoir=Credit note

View File

@ -2658,11 +2658,16 @@ class Societe extends CommonObject
if (isset($this->status)) {
$label .= ' '.$this->getLibStatut(5);
}
if (isset($this->client) && isset($this->fournisseur)) {
$label .= ' &nbsp; ';
$label .= $this->getTypeUrl(1);
}
$label .= '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag($this->name);
if (!empty($this->name_alias)) {
$label .= ' ('.dol_escape_htmltag($this->name_alias).')';
}
if ($this->email) {
$label .= '<br>'.img_picto('', 'email', 'class="pictofixedwidth"').$this->email;
}