New: Some pages can link to wiki help pages

This commit is contained in:
Laurent Destailleur 2009-03-09 19:10:23 +00:00
parent 6cffb4bc80
commit e74f258d18
2 changed files with 139 additions and 145 deletions

View File

@ -18,11 +18,11 @@
*/ */
/** /**
\file htdocs/fourn/facture/index.php * \file htdocs/fourn/facture/index.php
\ingroup fournisseur,facture * \ingroup fournisseur,facture
\brief Lsite des factures fournisseurs * \brief List of suppliers invoices
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -85,7 +85,7 @@ if ($_POST["mode"] == 'search')
$now=gmmktime(); $now=gmmktime();
llxHeader(); llxHeader($langs->trans("SuppliersInovices"),'','EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores');
$sql = "SELECT s.rowid as socid, s.nom, "; $sql = "SELECT s.rowid as socid, s.nom, ";
$sql.= " fac.rowid as ref, fac.rowid as facid, fac.facnumber, ".$db->pdate("fac.datef")." as datef, ".$db->pdate("fac.date_lim_reglement")." as date_echeance,"; $sql.= " fac.rowid as ref, fac.rowid as facid, fac.facnumber, ".$db->pdate("fac.datef")." as datef, ".$db->pdate("fac.date_lim_reglement")." as date_echeance,";

View File

@ -21,143 +21,137 @@
*/ */
/** /**
\file htdocs/fourn/facture/pre.inc.php \file htdocs/fourn/facture/pre.inc.php
\ingroup fournisseur,facture \ingroup fournisseur,facture
\brief Fichier gestionnaire du menu factures fournisseurs \brief Fichier gestionnaire du menu factures fournisseurs
*/ */
require("../../main.inc.php"); require("../../main.inc.php");
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php"; require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php";
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"; require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php";
function llxHeader($head = "", $title = "", $addons='') function llxHeader($head = '', $title = '', $help_url='')
{ {
global $user, $conf, $langs; global $user, $conf, $langs;
$langs->load("suppliers"); $langs->load("suppliers");
$langs->load("propal"); $langs->load("propal");
top_menu($head, $title); top_menu($head, $title);
$menu = new Menu(); $menu = new Menu();
if (is_array($addons)) if ($conf->fournisseur->enabled)
{
$menu->add($addons[0][0], $addons[0][1]);
}
if ($conf->fournisseur->enabled)
{
if ($user->rights->societe->lire)
{ {
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers")); if ($user->rights->societe->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
// Sécurité accés client
if ($user->societe_id == 0 && $user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
}
} }
// Sécurité accés client if ($conf->societe->enabled)
if ($user->societe_id == 0 && $user->rights->societe->creer)
{ {
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier")); if ($user->rights->societe->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
} }
}
if ($conf->societe->enabled)
{ $langs->load("bills");
if ($user->rights->societe->lire) if ($user->rights->fournisseur->facture->creer)
{ {
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts")); $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
} }
} if ($user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
$langs->load("bills"); $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/impayees.php",$langs->trans("Unpayed"));
if ($user->rights->fournisseur->facture->creer) $menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
}
if ($user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/impayees.php",$langs->trans("Unpayed"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
}
$langs->load("orders");
if ($user->rights->fournisseur->commande->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
}
$langs->load("products");
if ($conf->produit->enabled || $conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
}
$menu = new Menu();
if (is_array($addons))
{
$menu->add($addons[0][0], $addons[0][1]);
}
if ($conf->fournisseur->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
} }
// Sécurité accés client
if ($user->societe_id == 0 && $user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
}
}
if ($conf->societe->enabled) $langs->load("orders");
{ if ($user->rights->fournisseur->commande->lire)
if ($user->rights->societe->lire) {
{ $menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts")); }
$langs->load("products");
if ($conf->produit->enabled || $conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
} }
}
$langs->load("bills"); $menu = new Menu();
if ($user->rights->fournisseur->facture->lire)
{
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
}
if ($user->rights->fournisseur->facture->creer) if (is_array($addons))
{ {
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill")); $menu->add($addons[0][0], $addons[0][1]);
} }
if ($user->rights->fournisseur->facture->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
}
if ($user->rights->fournisseur->commande->lire) if ($conf->fournisseur->enabled)
{ {
$langs->load("orders"); if ($user->rights->societe->lire)
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders")); {
} $menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
}
// Sécurité accés client
if ($user->societe_id == 0 && $user->rights->societe->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("NewSupplier"));
}
}
if ($conf->societe->enabled)
{
if ($user->rights->societe->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
}
}
if ($conf->produit->enabled || $conf->service->enabled) $langs->load("bills");
{ if ($user->rights->fournisseur->facture->lire)
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products")); {
} $menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
}
left_menu($menu->liste);
if ($user->rights->fournisseur->facture->creer)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"));
}
if ($user->rights->fournisseur->facture->lire)
{
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
}
if ($user->rights->fournisseur->commande->lire)
{
$langs->load("orders");
$menu->add(DOL_URL_ROOT."/fourn/commande/",$langs->trans("Orders"));
}
if ($conf->produit->enabled || $conf->service->enabled)
{
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
}
left_menu($menu->liste, $help_url);
} }
?> ?>