/[dolibarr]/dolibarr/htdocs/fourn/pre.inc.php
ViewVC logotype

Diff of /dolibarr/htdocs/fourn/pre.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by eldy, Mon Jul 11 00:49:17 2005 UTC revision 1.21 by hregis, Sat Jul 23 14:48:59 2005 UTC
# Line 50  function llxHeader($head = "", $title="" Line 50  function llxHeader($head = "", $title=""
50        $menu->add($addons[0][0], $addons[0][1]);        $menu->add($addons[0][0], $addons[0][1]);
51      }      }
52    
53    if ($conf->fournisseur->enabled)    if ($conf->fournisseur->enabled && $user->rights->societe->lire)
54      {      {
55        $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));        $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
56                
57        // Sécurité accés client        // Sécurité accés client
58        if ($user->societe_id == 0)        if ($user->societe_id == 0 && $user->rights->societe->creer)
59          {          {
60            $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));            $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
61          }          }
62      }      }
63        
64    if ($conf->societe->enabled)    if ($conf->societe->enabled && $user->rights->societe->lire)
65      {      {
66        $menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));        $menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
67      }      }
68        
69    
70    $langs->load("bills");    $langs->load("bills");
71    $menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));    if ($user->societe_id == 0 && $user->rights->fournisseur->facture->lire)
72          {
73    if ($user->societe_id == 0)        $menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
74        }
75      if ($user->societe_id == 0 && $user->rights->fournisseur->facture->creer)
76      {      {
77        $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));        $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
78      }      }
79        if ($user->rights->fournisseur->facture->lire)
80    $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));      {
81              $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
82        }
83    $langs->load("orders");    $langs->load("orders");
84    $menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));    if ($user->rights->fournisseur->commande->lire)
85          {
86          $menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
87        }
88    if ($conf->produit->enabled || $conf->service->enabled)    if ($conf->produit->enabled || $conf->service->enabled)
89    {    {
90      $menu->add(DOL_URL_ROOT."/fourn/product/", $langs->trans("Products"));          if ($user->rights->produit->lire)
91            {
92            $menu->add(DOL_URL_ROOT."/fourn/product/", $langs->trans("Products"));
93        }
94    }    }
95        
96    left_menu($menu->liste);    left_menu($menu->liste);

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26