Ajout onglet stats
This commit is contained in:
parent
1b6a43cdf6
commit
c9740c42f8
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -21,97 +22,105 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/lib/company.lib.php
|
||||
\brief Ensemble de fonctions de base pour le module societe
|
||||
\ingroup societe
|
||||
\version $Revision$
|
||||
|
||||
Ensemble de fonctions de base de dolibarr sous forme d'include
|
||||
\file htdocs/lib/company.lib.php
|
||||
\brief Ensemble de fonctions de base pour le module societe
|
||||
\ingroup societe
|
||||
\version $Revision$
|
||||
|
||||
Ensemble de fonctions de base de dolibarr sous forme d'include
|
||||
*/
|
||||
|
||||
function societe_prepare_head($objsoc)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Company");
|
||||
$head[$h][2] = 'company';
|
||||
$h++;
|
||||
|
||||
if ($objsoc->client==1)
|
||||
global $langs, $conf, $user;
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Company");
|
||||
$head[$h][2] = 'company';
|
||||
$h++;
|
||||
|
||||
if ($objsoc->client==1)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Customer");;
|
||||
$head[$h][2] = 'customer';
|
||||
$h++;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Customer");;
|
||||
$head[$h][2] = 'customer';
|
||||
$h++;
|
||||
}
|
||||
if ($objsoc->client==2)
|
||||
if ($objsoc->client==2)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Prospect");
|
||||
$head[$h][2] = 'prospect';
|
||||
$h++;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Prospect");
|
||||
$head[$h][2] = 'prospect';
|
||||
$h++;
|
||||
}
|
||||
if ($objsoc->fournisseur)
|
||||
if ($objsoc->fournisseur)
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Supplier");
|
||||
$head[$h][2] = 'supplier';
|
||||
$h++;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Supplier");
|
||||
$head[$h][2] = 'supplier';
|
||||
$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.'/compta/fiche.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Accountancy");
|
||||
$head[$h][2] = 'compta';
|
||||
$h++;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche-stats.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Statistics");
|
||||
$head[$h][2] = 'supplierstat';
|
||||
$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.'/societe/info.php?socid='.$objsoc->id;
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$head[$h][2] = 'info';
|
||||
$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][1] = $langs->trans("Documents");
|
||||
$head[$h][2] = 'document';
|
||||
$h++;
|
||||
$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++;
|
||||
}
|
||||
|
||||
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 ($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;
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user