2
0
forked from Wavyzz/dolibarr

Fix: Conditionnement prsence menu Expedition sur activation du module Expedition

Trad: Encore de la traduction pour le module Commande.
This commit is contained in:
Laurent Destailleur
2004-08-02 02:00:18 +00:00
parent a5a13aa11c
commit 3d3e9a0faa
10 changed files with 94 additions and 41 deletions

View File

@@ -22,8 +22,11 @@
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("orders");
$user->getrights('commande'); $user->getrights('commande');
$user->getrights('expedition'); $user->getrights('expedition');
if (!$user->rights->commande->lire) if (!$user->rights->commande->lire)
accessforbidden(); accessforbidden();
@@ -176,7 +179,7 @@ if ($action == 'pdf')
commande_pdf_create($db, $_GET["id"]); commande_pdf_create($db, $_GET["id"]);
} }
llxHeader('','Fiche commande','Commande'); llxHeader('',$langs->trans("OrderCard"),"Commande");
@@ -404,7 +407,7 @@ else
$head[0][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; $head[0][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id;
$head[0][1] = "Commande : $commande->ref"; $head[0][1] = $langs->trans("Order").": $commande->ref";
$h = 1; $h = 1;
$a = 0; $a = 0;
@@ -483,11 +486,11 @@ else
} }
print "&nbsp;</td></tr>"; print "&nbsp;</td></tr>";
print '<tr><td>Montant</td>'; // Ligne de 3 colonnes
print '<tr><td>'.$langs->trans("AmountHT").'</td>';
print '<td align="right"><b>'.price($commande->total_ht).'</b></td>'; print '<td align="right"><b>'.price($commande->total_ht).'</b></td>';
print '<td>'.MAIN_MONNAIE.' HT</td>'; print '<td>'.MAIN_MONNAIE.'</td>';
print '<td rowspan="4" valign="top">Note :</td></tr>';
print '<td>Note</td></tr>';
print '<tr><td>Remise globale</td><td align="right">'; print '<tr><td>Remise globale</td><td align="right">';
@@ -502,7 +505,7 @@ else
} }
print '</td></tr>'; print '</td></tr>';
print '<tr><td>TVA</td><td align="right">'.price($commande->total_tva).'</td>'; print '<tr><td>'.$langs->trans("VAT").'</td><td align="right">'.price($commande->total_tva).'</td>';
print '<td>'.MAIN_MONNAIE.'</td></tr>'; print '<td>'.MAIN_MONNAIE.'</td></tr>';
print '<tr><td>'.$langs->trans("TotalTTC").'</td><td align="right">'.price($commande->total_ttc).'</td>'; print '<tr><td>'.$langs->trans("TotalTTC").'</td><td align="right">'.price($commande->total_ttc).'</td>';
print '<td>'.MAIN_MONNAIE.'</td></tr>'; print '<td>'.MAIN_MONNAIE.'</td></tr>';

View File

@@ -39,7 +39,7 @@ print '<form method="post" action="liste.php">';
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchOrder").'</td></tr>'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchOrder").'</td></tr>';
print "<tr $bc[1]><td>"; print "<tr $bc[1]><td>";
print 'Num. : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="flat"></td></tr>'; print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="flat"></td></tr>';
print "</table></form>\n"; print "</table></form>\n";

View File

@@ -23,6 +23,8 @@
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("orders");
$user->getrights('commande'); $user->getrights('commande');
if (!$user->rights->commande->lire) if (!$user->rights->commande->lire)
accessforbidden(); accessforbidden();
@@ -73,9 +75,9 @@ if ($_GET["year"] > 0)
$sql .= " AND date_format(c.date_commande, '%Y') = $year"; $sql .= " AND date_format(c.date_commande, '%Y') = $year";
} }
if (strlen($HTTP_POST_VARS["sf_ref"]) > 0) if (strlen($_POST["sf_ref"]) > 0)
{ {
$sql .= " AND c.ref like '%".$HTTP_POST_VARS["sf_ref"] . "%'"; $sql .= " AND c.ref like '%".$_POST["sf_ref"] . "%'";
} }
$sql .= " ORDER BY $sortfield $sortorder"; $sql .= " ORDER BY $sortfield $sortorder";
@@ -84,20 +86,21 @@ $sql .= $db->plimit($limit + 1,$offset);
if ( $db->query($sql) ) if ( $db->query($sql) )
{ {
$num = $db->num_rows(); $num = $db->num_rows();
print_barre_liste("Commandes", $_GET["page"], "liste.php","&amp;socidp=$socidp",$sortfield,$sortorder,'',$num); print_barre_liste($langs->trans("Orders"), $_GET["page"], "liste.php","&amp;socidp=$socidp",$sortfield,$sortorder,'',$num);
$i = 0; $i = 0;
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; print '<table class="noborder" width="100%" cellspacing="0" cellpadding="3">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre_new ("R<EFBFBD>f","liste.php","c.ref","","&amp;socidp=$socidp",'width="15%"',$sortfield); print_liste_field_titre_new ($langs->trans("Ref"),"liste.php","c.ref","","&amp;socidp=$socidp",'width="15%"',$sortfield);
print_liste_field_titre_new ("Soci<EFBFBD>t<EFBFBD>","liste.php","s.nom","","&amp;socidp=$socidp",'width="30%"',$sortfield); print_liste_field_titre_new ($langs->trans("Company"),"liste.php","s.nom","","&amp;socidp=$socidp",'width="30%"',$sortfield);
print_liste_field_titre_new ("Date","liste.php","c.date_commande","","&amp;socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield); print_liste_field_titre_new ($langs->trans("Date"),"liste.php","c.date_commande","","&amp;socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield);
print_liste_field_titre_new ("Statut","liste.php","c.fk_statut","","&amp;socidp=$socidp",'width="10%" align="center"',$sortfield); print_liste_field_titre_new ($langs->trans("Status"),"liste.php","c.fk_statut","","&amp;socidp=$socidp",'width="10%" align="center"',$sortfield);
print "</tr>\n"; print "</tr>\n";
$var=True; $var=True;
@@ -109,7 +112,7 @@ if ( $db->query($sql) )
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td><a href=\"fiche.php?id=$objp->rowid\">$objp->ref</a></td>\n"; print "<td><a href=\"fiche.php?id=$objp->rowid\">".img_file()." $objp->ref</a></td>\n";
print "<td><a href=\"../comm/fiche.php?socid=$objp->idp\">$objp->nom</a></td>\n"; print "<td><a href=\"../comm/fiche.php?socid=$objp->idp\">$objp->nom</a></td>\n";
$now = time(); $now = time();
@@ -148,7 +151,7 @@ if ( $db->query($sql) )
} }
else else
{ {
print $db->error(); print dolibarr_print_error($db);
} }
$db->close(); $db->close();

View File

@@ -1,5 +1,6 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -22,9 +23,12 @@
require("../main.inc.php"); require("../main.inc.php");
require("./commande.class.php"); require("./commande.class.php");
$langs->load("orders");
function llxHeader($head = "", $title="", $help_url='') function llxHeader($head = "", $title="", $help_url='')
{ {
global $user, $conf; global $user, $conf, $langs;
/* /*
* *
@@ -34,12 +38,14 @@ function llxHeader($head = "", $title="", $help_url='')
$menu = new Menu(); $menu = new Menu();
$menu->add(DOL_URL_ROOT."/commande/", "Commandes"); $menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders"));
$menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", "Liste"); $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List"));
$menu->add(DOL_URL_ROOT."/expedition/", "Expeditions"); if ($conf->expedition->enabled) {
$menu->add(DOL_URL_ROOT."/expedition/", "Expeditions");
$menu->add(DOL_URL_ROOT."/commande/stats/", "Statistiques"); }
$menu->add(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics"));
left_menu($menu->liste, $help_url); left_menu($menu->liste, $help_url);
} }

View File

@@ -21,6 +21,7 @@ Show=Show
Search=Search Search=Search
TestConnection=Test connection TestConnection=Test connection
ChooseLangage=Please choose your language ChooseLangage=Please choose your language
Author=Author
User=User User=User
Users=Users Users=Users
Group=Group Group=Group
@@ -57,10 +58,16 @@ Cut=Cut
Copy=Copy Copy=Copy
Paste=Paste Paste=Paste
Default=Default Default=Default
Amount=Montant Amount=Amount
AmountHT=Amount HT
AmountTTC=Amount TTC
Total=Total Total=Total
TotalHT=Total HT TotalHT=Total HT
TotalTTC=Total TTC TotalTTC=Total TTC
Delta=Delta Delta=Delta
Module=Module Module=Module
Option=Option Option=Option
List=List
Statistics=Statistics
Status=Status
Ref=Ref

View File

@@ -21,6 +21,7 @@ TestConnection=Tester la connexion
Show=Voir Show=Voir
Search=Rechercher Search=Rechercher
ChooseLangage=Choisissez votre langue ChooseLangage=Choisissez votre langue
Author=Auteur
User=Utilisateur User=Utilisateur
Users=Utilisateurs Users=Utilisateurs
Group=Groupe Group=Groupe
@@ -46,3 +47,27 @@ Previous=Pr
Next=Suivant Next=Suivant
ErrorForbidden=Acc<63>s non autoris<69> ErrorForbidden=Acc<63>s non autoris<69>
Cards=Fiches Cards=Fiches
Date=Date
Year=Ann<6E>e
Month=Mois
Day=Jour
Hour=Heure
Minute=Minute
Second=Seconde
Cut=Couper
Copy=Copier
Paste=Coller
Default=Defaut
Amount=Amount
AmountHT=Montant HT
AmountTTC=Montant TTC
Total=Total
TotalHT=Total HT
TotalTTC=Total TTC
Delta=Ecart
Module=Module
Option=Option
List=Liste
Statistics=Statistiques
Status=Statut
Ref=R<>f

View File

@@ -21,6 +21,7 @@ TestConnection=Tester connexion
Show=Voir Show=Voir
Search=Rechercher Search=Rechercher
ChooseLangage=Choisissez votre langue ChooseLangage=Choisissez votre langue
Author=Auteur
User=Utilisateur User=Utilisateur
Users=Utilisateurs Users=Utilisateurs
Group=Groupe Group=Groupe
@@ -58,9 +59,15 @@ Copy=Copier
Paste=Coller Paste=Coller
Default=Defaut Default=Defaut
Amount=Amount Amount=Amount
AmountHT=Montant HT
AmountTTC=Montant TTC
Total=Total Total=Total
TotalHT=Total HT TotalHT=Total HT
TotalTTC=Total TTC TotalTTC=Total TTC
Delta=Ecart Delta=Ecart
Module=Module Module=Module
Option=Option Option=Option
List=Liste
Statistics=Statistiques
Status=Statut
Ref=R<>f

View File

@@ -529,10 +529,10 @@ function dolibarr_print_error($db='',$msg='')
print "Dolibarr a d<>tect<63> une erreur technique.<br>\n"; print "Dolibarr a d<>tect<63> une erreur technique.<br>\n";
print "Voici les informations qui pourront aider au diagnostique:<br><br>\n"; print "Voici les informations qui pourront aider au diagnostique:<br><br>\n";
print "<b>Serveur:</b>".$_SERVER["SERVER_SOFTWARE"]."<br>\n";; print "<b>Serveur:</b> ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";;
print "<b>URL sollicit<69>e:</b> ".$_SERVER["REQUEST_URI"]."<br>\n";; print "<b>URL sollicit<69>e:</b> ".$_SERVER["REQUEST_URI"]."<br>\n";;
print "<b>".$langs->trans("Parameters").":</b> ".$_SERVER["QUERY_STRING"]."<br>\n";; print "<b>QUERY_STRING:</b> ".$_SERVER["QUERY_STRING"]."<br>\n";;
print "<b>URL d'origine:</b> ".$_SERVER["HTTP_REFERER"]."<br>\n";; print "<b>Referer:</b> ".$_SERVER["HTTP_REFERER"]."<br>\n";;
if ($db) { if ($db) {
print "<br>\n"; print "<br>\n";

View File

@@ -25,6 +25,8 @@ require("./pre.inc.php");
require("../propal.class.php"); require("../propal.class.php");
require("../facture.class.php"); require("../facture.class.php");
$langs->load("products");
$user->getrights('produit'); $user->getrights('produit');
$user->getrights('propale'); $user->getrights('propale');
$user->getrights('facture'); $user->getrights('facture');
@@ -201,9 +203,6 @@ llxHeader("","","Fiche produit");
/* /*
* Cr<43>ation du produit * Cr<43>ation du produit
* *
*
*
*
*/ */
if ($_GET["action"] == 'create') if ($_GET["action"] == 'create')
{ {
@@ -259,7 +258,6 @@ if ($_GET["action"] == 'create')
} }
else else
{ {
if ($_GET["id"]) if ($_GET["id"])
{ {
if ($_GET["action"] <> 're-edit') if ($_GET["action"] <> 're-edit')
@@ -281,7 +279,7 @@ else
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">'; print '<table border="0" width="100%" cellspacing="0" cellpadding="4">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<form action="liste.php" method="post"><td>'; print '<form action="liste.php" method="post"><td>';
print '<input type="hidden" name="type" value="'.$product->type.'">'; print '<input type="hidden" name="type" value="'.$product->type.'">';
print 'R<>f : <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="flat" type="submit" value="go">'; print 'R<>f : <input class="flat" type="text" size="10" name="sref">&nbsp;<input class="flat" type="submit" value="go">';
print '</td></form><form action="liste.php" method="post"><td>'; print '</td></form><form action="liste.php" method="post"><td>';
print 'Libell<6C> : <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="go">'; print 'Libell<6C> : <input class="flat" type="text" size="20" name="snom">&nbsp;<input class="flat" type="submit" value="go">';
@@ -303,7 +301,7 @@ else
} }
$head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; $head[$h][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
$head[$h][1] = 'Statistiques'; $head[$h][1] = $langs->trans('Statistics');
dolibarr_fiche_head($head, 0, 'Fiche '.$types[$product->type].' : '.$product->ref); dolibarr_fiche_head($head, 0, 'Fiche '.$types[$product->type].' : '.$product->ref);
@@ -329,8 +327,9 @@ else
} }
else else
{ {
$nblignefour=3; $nblignefour=4;
} }
print '<td valign="top" rowspan="'.$nblignefour.'">'; print '<td valign="top" rowspan="'.$nblignefour.'">';
print 'Fournisseurs [<a href="fiche.php?id='.$product->id.'&amp;action=ajout_fourn">Ajouter</a>]'; print 'Fournisseurs [<a href="fiche.php?id='.$product->id.'&amp;action=ajout_fourn">Ajouter</a>]';
@@ -349,7 +348,7 @@ else
{ {
$objp = $db->fetch_object($i); $objp = $db->fetch_object($i);
$var=!$var; $var=!$var;
print "<TR $bc[$var]>"; print "<tr $bc[$var]>";
print '<td><a href="../fourn/fiche.php?socid='.$objp->idp.'">'.$objp->nom.'</a></td>'; print '<td><a href="../fourn/fiche.php?socid='.$objp->idp.'">'.$objp->nom.'</a></td>';
print '<td align="right">'; print '<td align="right">';
print '<a href="fiche.php?id='.$product->id.'&amp;action=remove_fourn&amp;id_fourn='.$objp->idp.'">'; print '<a href="fiche.php?id='.$product->id.'&amp;action=remove_fourn&amp;id_fourn='.$objp->idp.'">';

View File

@@ -21,6 +21,9 @@
* *
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("products");
$user->getrights('produit'); $user->getrights('produit');
if (!$user->rights->produit->lire) if (!$user->rights->produit->lire)
@@ -61,10 +64,10 @@ $head[1][1] = 'Prix';
$head[2][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id; $head[2][0] = DOL_URL_ROOT."/product/stats/fiche.php?id=".$product->id;
$head[2][1] = 'Statistiques'; $head[2][1] = 'Statistiques';
dolibarr_fiche_head($head, 1, 'Fiche '.$types[$product->type].' : '.$product->ref); dolibarr_fiche_head($head, 1, 'Fiche '.$types[$product->type].' : '.$product->ref);
$sql = "SELECT p.rowid, p.price, ".$db->pdate("p.date_price")." as dp"; $sql = "SELECT p.rowid, p.price, ".$db->pdate("p.date_price")." as dp";
$sql .= " FROM ".MAIN_DB_PREFIX."product_price as p"; $sql .= " FROM ".MAIN_DB_PREFIX."product_price as p";
$sql .= " WHERE fk_product = ".$product->id; $sql .= " WHERE fk_product = ".$product->id;
@@ -97,8 +100,8 @@ if ($result)
$i++; $i++;
} }
$db->free(); $db->free();
print "</table>"; print "</table>";
print "<br>";
} }
} }
else else
@@ -106,7 +109,7 @@ else
print $db->error() . "<br>" .$sql; print $db->error() . "<br>" .$sql;
} }
print "</div>\n";
$db->close(); $db->close();