Task 149 : Add number of notes and attached files into tab. Started with thirdparty
This commit is contained in:
parent
7b5386692c
commit
aa8e43cd1b
@ -87,8 +87,12 @@ function societe_prepare_head($object)
|
|||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
// Notes
|
// Notes
|
||||||
|
$nbNote = 0;
|
||||||
|
if(!empty($object->note_private)) $nbNote++;
|
||||||
|
if(!empty($object->note_public)) $nbNote++;
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Note");
|
$head[$h][1] = $langs->trans("Note");
|
||||||
|
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
@ -101,8 +105,10 @@ function societe_prepare_head($object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Attached files
|
// Attached files
|
||||||
|
$nbFiles = count(dol_dir_list($upload_dir = $conf->societe->multidir_output[$object->entity] . "/" . $object->id));
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Documents");
|
$head[$h][1] = $langs->trans("Documents");
|
||||||
|
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
|
||||||
$head[$h][2] = 'document';
|
$head[$h][2] = 'document';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user