Ajout onglet stats
This commit is contained in:
parent
1b6a43cdf6
commit
c9740c42f8
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -21,97 +22,105 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/lib/company.lib.php
|
\file htdocs/lib/company.lib.php
|
||||||
\brief Ensemble de fonctions de base pour le module societe
|
\brief Ensemble de fonctions de base pour le module societe
|
||||||
\ingroup societe
|
\ingroup societe
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
|
|
||||||
Ensemble de fonctions de base de dolibarr sous forme d'include
|
Ensemble de fonctions de base de dolibarr sous forme d'include
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function societe_prepare_head($objsoc)
|
function societe_prepare_head($objsoc)
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$objsoc->id;
|
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$objsoc->id;
|
||||||
$head[$h][1] = $langs->trans("Company");
|
$head[$h][1] = $langs->trans("Company");
|
||||||
$head[$h][2] = 'company';
|
$head[$h][2] = 'company';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if ($objsoc->client==1)
|
if ($objsoc->client==1)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objsoc->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objsoc->id;
|
||||||
$head[$h][1] = $langs->trans("Customer");;
|
$head[$h][1] = $langs->trans("Customer");;
|
||||||
$head[$h][2] = 'customer';
|
$head[$h][2] = 'customer';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
if ($objsoc->client==2)
|
if ($objsoc->client==2)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$objsoc->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$objsoc->id;
|
||||||
$head[$h][1] = $langs->trans("Prospect");
|
$head[$h][1] = $langs->trans("Prospect");
|
||||||
$head[$h][2] = 'prospect';
|
$head[$h][2] = 'prospect';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
if ($objsoc->fournisseur)
|
if ($objsoc->fournisseur)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$objsoc->id;
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$objsoc->id;
|
||||||
$head[$h][1] = $langs->trans("Supplier");
|
$head[$h][1] = $langs->trans("Supplier");
|
||||||
$head[$h][2] = 'supplier';
|
$head[$h][2] = 'supplier';
|
||||||
$h++;
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($conf->facture->enabled || $conf->compta->enabled || $conf->comptaexpert->enabled)
|
||||||
|
{
|
||||||
|
$langs->load("compta");
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$objsoc->id;
|
||||||
|
$head[$h][1] = $langs->trans("Accountancy");
|
||||||
|
$head[$h][2] = 'compta';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->societe_id == 0)
|
||||||
|
{
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$objsoc->id;
|
||||||
|
$head[$h][1] = $langs->trans("Note");
|
||||||
|
$head[$h][2] = 'note';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->societe_id == 0)
|
||||||
|
{
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$objsoc->id;
|
||||||
|
$head[$h][1] = $langs->trans("Documents");
|
||||||
|
$head[$h][2] = 'document';
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($conf->notification->enabled && $user->societe_id == 0)
|
||||||
|
{
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$objsoc->id;
|
||||||
|
$head[$h][1] = $langs->trans("Notifications");
|
||||||
|
$head[$h][2] = 'notify';
|
||||||
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->facture->enabled || $conf->compta->enabled || $conf->comptaexpert->enabled)
|
if ($objsoc->fournisseur)
|
||||||
{
|
{
|
||||||
$langs->load("compta");
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche-stats.php?socid='.$objsoc->id;
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$objsoc->id;
|
$head[$h][1] = $langs->trans("Statistics");
|
||||||
$head[$h][1] = $langs->trans("Accountancy");
|
$head[$h][2] = 'supplierstat';
|
||||||
$head[$h][2] = 'compta';
|
$h++;
|
||||||
$h++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$objsoc->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$objsoc->id;
|
||||||
$head[$h][1] = $langs->trans("Note");
|
$head[$h][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->societe_id == 0)
|
if ($conf->bookmark->enabled && $user->rights->bookmark->creer)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$objsoc->id;
|
$head[$h][0] = DOL_URL_ROOT."/bookmarks/fiche.php?action=add&socid=".$objsoc->id."&urlsource=".$_SERVER["PHP_SELF"]."?socid=".$objsoc->id;
|
||||||
$head[$h][1] = $langs->trans("Documents");
|
$head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark');
|
||||||
$head[$h][2] = 'document';
|
$head[$h][2] = 'image';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->notification->enabled && $user->societe_id == 0)
|
return $head;
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$objsoc->id;
|
|
||||||
$head[$h][1] = $langs->trans("Notifications");
|
|
||||||
$head[$h][2] = 'notify';
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($user->societe_id == 0)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$objsoc->id;
|
|
||||||
$head[$h][1] = $langs->trans("Info");
|
|
||||||
$head[$h][2] = 'info';
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($conf->bookmark->enabled && $user->rights->bookmark->creer)
|
|
||||||
{
|
|
||||||
$head[$h][0] = DOL_URL_ROOT."/bookmarks/fiche.php?action=add&socid=".$objsoc->id."&urlsource=".$_SERVER["PHP_SELF"]."?socid=".$objsoc->id;
|
|
||||||
$head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark');
|
|
||||||
$head[$h][2] = 'image';
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user