From 4750e6be6218ae3cf772da394d84c6414cd744e4 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 5 Sep 2007 11:56:09 +0000 Subject: [PATCH] =?UTF-8?q?d=E9placement=20de=20l'onglet=20cat=E9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/company.lib.php | 141 ++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 73 deletions(-) diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php index ffe8a0e8319..bc8c21d5f72 100644 --- a/htdocs/lib/company.lib.php +++ b/htdocs/lib/company.lib.php @@ -42,94 +42,89 @@ function societe_prepare_head($objsoc) $head[$h][2] = 'company'; $h++; - //affichage onglet catégorie + 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++; + } + 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++; + } + 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++; + } + 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++; + } + //affichage onglet catégorie if ($conf->categorie->enabled) - { + { $head[$h][0] = DOL_URL_ROOT.'/categories/categorie.php?socid='.$objsoc->id; $head[$h][1] = $langs->trans('Categories'); $head[$h][2] = 'category'; $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++; - } - 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++; - } - 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++; - } - - 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++; - } - + { + $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++; - } + { + $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++; - } + { + $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 ($objsoc->fournisseur) - { - $head[$h][0] = DOL_URL_ROOT.'/fourn/fiche-stats.php?socid='.$objsoc->id; - $head[$h][1] = $langs->trans("Statistics"); - $head[$h][2] = 'supplierstat'; - $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.'/societe/info.php?socid='.$objsoc->id; - $head[$h][1] = $langs->trans("Info"); - $head[$h][2] = 'info'; - $h++; - } + { + $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++; - } + { + $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; }