New: Some pages can link to wiki help pages
This commit is contained in:
parent
6cffb4bc80
commit
e74f258d18
@ -18,11 +18,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/fourn/facture/index.php
|
||||
\ingroup fournisseur,facture
|
||||
\brief Lsite des factures fournisseurs
|
||||
\version $Id$
|
||||
*/
|
||||
* \file htdocs/fourn/facture/index.php
|
||||
* \ingroup fournisseur,facture
|
||||
* \brief List of suppliers invoices
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
|
||||
@ -34,7 +34,7 @@ $langs->load("companies");
|
||||
$socid = $_GET["socid"];
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$_GET["action"] = '';
|
||||
$socid = $user->societe_id;
|
||||
@ -43,7 +43,7 @@ if ($user->societe_id > 0)
|
||||
$page=$_GET["page"];
|
||||
$sortorder = $_GET["sortorder"];
|
||||
$sortfield = $_GET["sortfield"];
|
||||
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
@ -64,7 +64,7 @@ if ($_POST["mode"] == 'search')
|
||||
$sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s ";
|
||||
$sql.= " WHERE s.nom like '%".addslashes(strtolower($socname))."%'";
|
||||
}
|
||||
|
||||
|
||||
if ( $db->query($sql) )
|
||||
{
|
||||
if ( $db->num_rows() == 1)
|
||||
@ -75,17 +75,17 @@ if ($_POST["mode"] == 'search')
|
||||
$db->free();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
|
||||
$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.= " 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,";
|
||||
@ -229,10 +229,10 @@ if ($resql)
|
||||
// \todo le montant deja pay<61> obj->am n'est pas d<>finie
|
||||
print $facturestatic->LibStatut($obj->paye,$obj->fk_statut,5,$objp->am);
|
||||
print '</td>';
|
||||
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
|
||||
if ($i == min($num,$limit))
|
||||
{
|
||||
// Print total
|
||||
@ -244,7 +244,7 @@ if ($resql)
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
$db->free($resql);
|
||||
|
||||
@ -21,143 +21,137 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/fourn/facture/pre.inc.php
|
||||
\ingroup fournisseur,facture
|
||||
\brief Fichier gestionnaire du menu factures fournisseurs
|
||||
*/
|
||||
\file htdocs/fourn/facture/pre.inc.php
|
||||
\ingroup fournisseur,facture
|
||||
\brief Fichier gestionnaire du menu factures fournisseurs
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
require_once DOL_DOCUMENT_ROOT."/fourn/fournisseur.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;
|
||||
|
||||
$langs->load("suppliers");
|
||||
$langs->load("propal");
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$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)
|
||||
{
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
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(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)
|
||||
{
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
|
||||
}
|
||||
|
||||
global $user, $conf, $langs;
|
||||
|
||||
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);
|
||||
$langs->load("suppliers");
|
||||
$langs->load("propal");
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
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(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)
|
||||
{
|
||||
if ($user->rights->societe->lire)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user