diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php
index 00e84b618ed..39938800c9d 100644
--- a/htdocs/fichinter/index.php
+++ b/htdocs/fichinter/index.php
@@ -21,7 +21,8 @@
*
*/
-/** \file htdocs/ficheinter.php
+/**
+ \file htdocs/ficheinter.php
\brief Fichier fiche intervention
\ingroup ficheinter
\version $Revision$
@@ -30,13 +31,15 @@
require("./pre.inc.php");
require("../contact.class.php");
+$langs->load("interventions");
+
if ($user->societe_id > 0)
{
$socid = $user->societe_id ;
}
-llxHeader();
+llxHeader();
$sortorder=$_GET["sortorder"]?$_GET["sortorder"]:$_POST["sortorder"];
$sortfield=$_GET["sortfield"]?$_GET["sortfield"]:$_POST["sortfield"];
@@ -50,6 +53,8 @@ $offset = $limit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
+
+
$sql = "SELECT s.nom,s.idp, f.ref,".$db->pdate("f.datei")." as dp, f.rowid as fichid, f.fk_statut, f.duree";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f ";
$sql .= " WHERE f.fk_soc = s.idp ";
@@ -62,10 +67,11 @@ if ($socid > 0)
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1 ,$offset);
-if ( $db->query($sql) )
+$result=$db->query($sql);
+if ($result)
{
- $num = $db->num_rows();
- print_barre_liste("Liste des fiches d'intervention", $page, "index.php","&socid=$socid",$sortfield,$sortorder,'',$num);
+ $num = $db->num_rows($result);
+ print_barre_liste($langs->trans("ListOfInterventions"), $page, "index.php","&socid=$socid",$sortfield,$sortorder,'',$num);
$i = 0;
print '
";
- $db->free();
+ $db->free($result);
}
else
{
diff --git a/htdocs/includes/menus/barre_left/eldy.php b/htdocs/includes/menus/barre_left/eldy.php
index 28d34b7c4f9..108f94e1a00 100644
--- a/htdocs/includes/menus/barre_left/eldy.php
+++ b/htdocs/includes/menus/barre_left/eldy.php
@@ -201,7 +201,8 @@ class MenuLeft {
if ($conf->fichinter->enabled )
{
- $newmenu->add(DOL_URL_ROOT."/fichinter/index.php?leftmenu=ficheinter", "Fiches d'intervention");
+ $langs->load("interventions");
+ $newmenu->add(DOL_URL_ROOT."/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"));
}
}
@@ -233,40 +234,41 @@ class MenuLeft {
if ($conf->facture->enabled)
{
- $langs->load("bills");
- $newmenu->add(DOL_URL_ROOT."/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),1);
-
- if ($user->societe_id == 0)
- {
- if ($leftmenu=="suppliers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),2);
- }
-
- if ($leftmenu=="suppliers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"),2);
+ $langs->load("bills");
+ $newmenu->add(DOL_URL_ROOT."/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"),1,$user->rights->facture->lire);
+ if ($user->societe_id == 0)
+ {
+ if ($leftmenu=="suppliers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("NewBill"),2,$user->rights->facture->creer);
+ }
+ if ($leftmenu=="suppliers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"),2,$user->rights->facture->lire);
}
// Clients
if ($conf->societe->enabled) {
- $newmenu->add(DOL_URL_ROOT."/compta/clients.php?leftmenu=customers", $langs->trans("Customers"));
- if ($user->rights->societe->creer)
+ $newmenu->add(DOL_URL_ROOT."/compta/clients.php?leftmenu=customers", $langs->trans("Customers"),0,$user->rights->societe->lire);
+ if ($user->societe_id == 0)
{
- $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"));
+ $newmenu->add_submenu(DOL_URL_ROOT."/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"),1,$user->rights->societe->creer);
}
- $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=c", $langs->trans("Contacts"));
+ $newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=customers&type=c", $langs->trans("Contacts"),1,$user->rights->societe->lire);
}
if ($conf->facture->enabled)
{
- $langs->load("customers_bills");
- $newmenu->add(DOL_URL_ROOT."/compta/facture.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),1);
- if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"),2);
- if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer",$langs->trans("NewBill"),2);
- if (! defined(FACTURE_DISABLE_RECUR) || ! FACTURE_DISABLE_RECUR)
- {
- if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php","Récurrentes",2);
- }
- if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php",$langs->trans("Payments"),2);
- if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/", $langs->trans("Statistics"),2);
+ $langs->load("customers_bills");
+ $newmenu->add(DOL_URL_ROOT."/compta/facture.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),1,$user->rights->facture->lire);
+ if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
+ if ($user->societe_id == 0)
+ {
+ if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer",$langs->trans("NewBill"),2,$user->rights->facture->creer);
+ }
+ if (! defined(FACTURE_DISABLE_RECUR) || ! FACTURE_DISABLE_RECUR)
+ {
+ if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php","Récurrentes",2,$user->rights->facture->lire);
+ }
+ if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php",$langs->trans("Payments"),2,$user->rights->facture->lire);
+ if ($leftmenu=="customers_bills") $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/", $langs->trans("Statistics"),2,$user->rights->facture->lire);
}
// Dons