Fix missing badge

This commit is contained in:
Laurent Destailleur 2022-03-13 18:39:45 +01:00
parent ec4ba46582
commit 2367f0d030
2 changed files with 16 additions and 3 deletions

View File

@ -101,7 +101,7 @@ if ($id > 0 || !empty($ref)) {
$proj->fetch($object->fk_project);
$morehtmlref .= ' : '.$proj->getNomUrl(1);
if ($proj->title) {
$morehtmlref .= ' - '.$proj->title;
$morehtmlref .= ' - '.dol_escape_htmltag($proj->title);
}
} else {
$morehtmlref .= '';
@ -113,7 +113,7 @@ if ($id > 0 || !empty($ref)) {
// ------------------------------------------------------------
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
//$object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);

View File

@ -66,16 +66,29 @@ function tax_prepare_head(ChargeSociales $object)
$head[$h][2] = 'documents';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/compta/sociales/info.php?id='.$object->id;
$head[$h][1] = $langs->trans("Info");
$head[$h][2] = 'info';
$h++;
$nbNote = 0;
if (!empty($object->note_private)) {
$nbNote++;
}
if (!empty($object->note_public)) {
$nbNote++;
}
$head[$h][0] = DOL_URL_ROOT.'/compta/sociales/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
$head[$h][1] = $langs->trans('Notes');
if ($nbNote > 0) {
$head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : '');
}
$head[$h][2] = 'note';
$h++;
complete_head_from_modules($conf, $langs, $object, $head, $h, 'tax', 'remove');
return $head;