Skip to content

Commit

Permalink
Debug v21
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 15, 2025
1 parent a68f2b5 commit 16b28e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
18 changes: 13 additions & 5 deletions htdocs/societe/class/societe.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2913,7 +2913,7 @@ public function getTooltipContentArray($params)
$datas['status'] = ' '.$this->getLibStatut(5);
}
if (isset($this->client) && isset($this->fournisseur)) {
$datas['type'] = '   ' . $this->getTypeUrl(1);
$datas['type'] = '   ' . $this->getTypeUrl(1, '', 0, 'span');
}
$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name));
if (!empty($this->name_alias) && empty($noaliasinname)) {
Expand Down Expand Up @@ -3075,7 +3075,8 @@ public function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $notooltip
} else {
$label = implode($this->getTooltipContentArray($params));
}

print "\n";
//var_dump($label);exit;
$linkstart = '';
$linkend = '';

Expand Down Expand Up @@ -3183,19 +3184,26 @@ public function getTypeUrl($withpicto = 0, $option = '', $notooltip = 0, $tag =
$s = '';
if (empty($option) || preg_match('/prospect/', $option)) {
if (($this->client == 2 || $this->client == 3) && !getDolGlobalString('SOCIETE_DISABLE_PROSPECTS')) {
$s .= '<'.$tag.' class="customer-back opacitymedium" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).'</'.$tag.'>';
$s .= '<'.$tag.' class="customer-back opacitymedium" title="'.dolPrintHTMLForAttribute($langs->trans("Prospect")).'"';
$s .= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'"' : '';
$s .= '>'.dol_substr($langs->trans("Prospect"), 0, 1).'</'.$tag.'>';
}
}
if (empty($option) || preg_match('/customer/', $option)) {
if (($this->client == 1 || $this->client == 3) && !getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) {
$s .= '<'.$tag.' class="customer-back" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Customer"), 0, 1).'</'.$tag.'>';
$s .= '<'.$tag.' class="customer-back" title="'.dolPrintHTMLForAttribute($langs->trans("Customer")).'"';
$s.= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'"' : '';
$s .= '>'.dol_substr($langs->trans("Customer"), 0, 1).'</'.$tag.'>';
}
}
if (empty($option) || preg_match('/supplier/', $option)) {
if ((isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $this->fournisseur) {
$s .= '<'.$tag.' class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).'</'.$tag.'>';
$s .= '<'.$tag.' class="vendor-back" title="'.dolPrintHTMLForAttribute($langs->trans("Supplier")).'"';
$s .= $tag == 'a' ? ' href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id.'"' : '';
$s .= '>'.dol_substr($langs->trans("Supplier"), 0, 1).'</'.$tag.'>';
}
}

return $s;
}

Expand Down
1 change: 1 addition & 0 deletions htdocs/societe/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,7 @@
$userstatic->job = $val['job'];
$userstatic->gender = $val['gender'];
$userstatic->statut = $val['statut'];
$userstatic->status = $val['statut'];
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
$j++;
if ($j < $nbofsalesrepresentative) {
Expand Down

0 comments on commit 16b28e4

Please sign in to comment.