Fix tooltip

This commit is contained in:
Laurent Destailleur 2021-12-18 15:34:12 +01:00
parent 48c879a91d
commit 9db9c5eecd

View File

@ -200,11 +200,11 @@ if (!empty($conf->projet->enabled)) {
llxHeader('', $langs->trans("SocialContributions")); llxHeader('', $langs->trans("SocialContributions"));
$sql = "SELECT cs.rowid, cs.fk_type as type, cs.fk_user,"; $sql = "SELECT cs.rowid, cs.fk_type as type, cs.fk_user,";
$sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode,"; $sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode, cs.fk_account,";
if (!empty($conf->projet->enabled)) { if (!empty($conf->projet->enabled)) {
$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,"; $sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
} }
$sql .= " c.libelle as type_label, cs.fk_account,"; $sql .= " c.libelle as type_label, c.accountancy_code as type_accountancy_code,";
$sql .= " ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,"; $sql .= " ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,";
$sql .= " SUM(pc.amount) as alreadypayed, pay.code as payment_code"; $sql .= " SUM(pc.amount) as alreadypayed, pay.code as payment_code";
$sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
@ -260,7 +260,7 @@ if ($search_date_limit_end) {
if ($search_typeid > 0) { if ($search_typeid > 0) {
$sql .= " AND cs.fk_type = ".((int) $search_typeid); $sql .= " AND cs.fk_type = ".((int) $search_typeid);
} }
$sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle, cs.fk_account, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, pay.code, u.lastname"; $sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, cs.fk_account, c.libelle, c.accountancy_code, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, pay.code, u.lastname";
if (!empty($conf->projet->enabled)) { if (!empty($conf->projet->enabled)) {
$sql .= ", p.rowid, p.ref, p.title"; $sql .= ", p.rowid, p.ref, p.title";
} }
@ -561,6 +561,7 @@ while ($i < min($num, $limit)) {
$chargesociale_static->ref = $obj->rowid; $chargesociale_static->ref = $obj->rowid;
$chargesociale_static->label = $obj->label; $chargesociale_static->label = $obj->label;
$chargesociale_static->type_label = $obj->type_label; $chargesociale_static->type_label = $obj->type_label;
if (!empty($conf->projet->enabled)) { if (!empty($conf->projet->enabled)) {
$projectstatic->id = $obj->project_id; $projectstatic->id = $obj->project_id;
$projectstatic->ref = $obj->project_ref; $projectstatic->ref = $obj->project_ref;
@ -595,7 +596,12 @@ while ($i < min($num, $limit)) {
// Type // Type
if (!empty($arrayfields['cs.fk_type']['checked'])) { if (!empty($arrayfields['cs.fk_type']['checked'])) {
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($obj->type_label).'">'.dol_escape_htmltag($obj->type_label).'</td>'; $typelabeltoshow = $obj->type_label;
$typelabelpopup = $obj->type_label;
if (!empty($conf->accounting->enabled)) {
$typelabelpopup .= ' - '.$langs->trans("AccountancyCode").': '.$obj->type_accountancy_code;
}
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($typelabelpopup).'">'.dol_escape_htmltag($typelabeltoshow).'</td>';
if (!$i) { if (!$i) {
$totalarray['nbfield']++; $totalarray['nbfield']++;
} }