diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 8ac5866f080..4af72e9d4d7 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -22,8 +22,11 @@ */ require("./pre.inc.php"); +$langs->load("orders"); + $user->getrights('commande'); $user->getrights('expedition'); + if (!$user->rights->commande->lire) accessforbidden(); @@ -176,7 +179,7 @@ if ($action == 'pdf') 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][1] = "Commande : $commande->ref"; + $head[0][1] = $langs->trans("Order").": $commande->ref"; $h = 1; $a = 0; @@ -483,11 +486,11 @@ else } print " "; - print 'Montant'; + // Ligne de 3 colonnes + print ''.$langs->trans("AmountHT").''; print ''.price($commande->total_ht).''; - print ''.MAIN_MONNAIE.' HT'; - - print 'Note'; + print ''.MAIN_MONNAIE.''; + print 'Note :'; print 'Remise globale'; @@ -502,7 +505,7 @@ else } print ''; - print 'TVA'.price($commande->total_tva).''; + print ''.$langs->trans("VAT").''.price($commande->total_tva).''; print ''.MAIN_MONNAIE.''; print ''.$langs->trans("TotalTTC").''.price($commande->total_ttc).''; print ''.MAIN_MONNAIE.''; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 9a70cd72557..595ed17faef 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -39,7 +39,7 @@ print '
'; print ''; print ''; print "'; +print $langs->trans("Ref").' : '; print "
'.$langs->trans("SearchOrder").'
"; -print 'Num. :
\n"; diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 37c99d0d035..902182b3160 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -23,6 +23,8 @@ require("./pre.inc.php"); +$langs->load("orders"); + $user->getrights('commande'); if (!$user->rights->commande->lire) accessforbidden(); @@ -73,9 +75,9 @@ if ($_GET["year"] > 0) $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"; @@ -84,20 +86,21 @@ $sql .= $db->plimit($limit + 1,$offset); if ( $db->query($sql) ) { $num = $db->num_rows(); - print_barre_liste("Commandes", $_GET["page"], "liste.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); + print_barre_liste($langs->trans("Orders"), $_GET["page"], "liste.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); $i = 0; - print ''; + print '
'; print ''; - print_liste_field_titre_new ("Réf","liste.php","c.ref","","&socidp=$socidp",'width="15%"',$sortfield); + print_liste_field_titre_new ($langs->trans("Ref"),"liste.php","c.ref","","&socidp=$socidp",'width="15%"',$sortfield); - print_liste_field_titre_new ("Société","liste.php","s.nom","","&socidp=$socidp",'width="30%"',$sortfield); + print_liste_field_titre_new ($langs->trans("Company"),"liste.php","s.nom","","&socidp=$socidp",'width="30%"',$sortfield); - print_liste_field_titre_new ("Date","liste.php","c.date_commande","","&socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield); + print_liste_field_titre_new ($langs->trans("Date"),"liste.php","c.date_commande","","&socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield); - print_liste_field_titre_new ("Statut","liste.php","c.fk_statut","","&socidp=$socidp",'width="10%" align="center"',$sortfield); + print_liste_field_titre_new ($langs->trans("Status"),"liste.php","c.fk_statut","","&socidp=$socidp",'width="10%" align="center"',$sortfield); + print "\n"; $var=True; @@ -109,7 +112,7 @@ if ( $db->query($sql) ) $var=!$var; print ""; - print "\n"; + print "\n"; print "\n"; $now = time(); @@ -148,7 +151,7 @@ if ( $db->query($sql) ) } else { - print $db->error(); + print dolibarr_print_error($db); } $db->close(); diff --git a/htdocs/commande/pre.inc.php b/htdocs/commande/pre.inc.php index 5fee64ab20c..0de9a372c51 100644 --- a/htdocs/commande/pre.inc.php +++ b/htdocs/commande/pre.inc.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -22,9 +23,12 @@ require("../main.inc.php"); require("./commande.class.php"); +$langs->load("orders"); + + 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->add(DOL_URL_ROOT."/commande/", "Commandes"); - $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", "Liste"); + $menu->add(DOL_URL_ROOT."/commande/", $langs->trans("Orders")); + $menu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List")); - $menu->add(DOL_URL_ROOT."/expedition/", "Expeditions"); - - $menu->add(DOL_URL_ROOT."/commande/stats/", "Statistiques"); + if ($conf->expedition->enabled) { + $menu->add(DOL_URL_ROOT."/expedition/", "Expeditions"); + } + + $menu->add(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics")); left_menu($menu->liste, $help_url); } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index c919560dd8b..9bb44ca6d76 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -21,6 +21,7 @@ Show=Show Search=Search TestConnection=Test connection ChooseLangage=Please choose your language +Author=Author User=User Users=Users Group=Group @@ -57,10 +58,16 @@ Cut=Cut Copy=Copy Paste=Paste Default=Default -Amount=Montant +Amount=Amount +AmountHT=Amount HT +AmountTTC=Amount TTC Total=Total TotalHT=Total HT TotalTTC=Total TTC Delta=Delta Module=Module -Option=Option \ No newline at end of file +Option=Option +List=List +Statistics=Statistics +Status=Status +Ref=Ref \ No newline at end of file diff --git a/htdocs/langs/fr_BE/main.lang b/htdocs/langs/fr_BE/main.lang index dad8a7116a2..ab272b403d8 100644 --- a/htdocs/langs/fr_BE/main.lang +++ b/htdocs/langs/fr_BE/main.lang @@ -21,6 +21,7 @@ TestConnection=Tester la connexion Show=Voir Search=Rechercher ChooseLangage=Choisissez votre langue +Author=Auteur User=Utilisateur Users=Utilisateurs Group=Groupe @@ -46,3 +47,27 @@ Previous=Pr Next=Suivant ErrorForbidden=Accès non autorisé Cards=Fiches +Date=Date +Year=Anné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 \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index f469ebfa225..b8abe3fa5d6 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -21,6 +21,7 @@ TestConnection=Tester connexion Show=Voir Search=Rechercher ChooseLangage=Choisissez votre langue +Author=Auteur User=Utilisateur Users=Utilisateurs Group=Groupe @@ -58,9 +59,15 @@ 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 \ No newline at end of file +Option=Option +List=Liste +Statistics=Statistiques +Status=Statut +Ref=Réf \ No newline at end of file diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index 4e620a0143d..4fa9a610442 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -529,10 +529,10 @@ function dolibarr_print_error($db='',$msg='') print "Dolibarr a détecté une erreur technique.
\n"; print "Voici les informations qui pourront aider au diagnostique:

\n"; - print "Serveur:".$_SERVER["SERVER_SOFTWARE"]."
\n";; + print "Serveur: ".$_SERVER["SERVER_SOFTWARE"]."
\n";; print "URL sollicitée: ".$_SERVER["REQUEST_URI"]."
\n";; - print "".$langs->trans("Parameters").": ".$_SERVER["QUERY_STRING"]."
\n";; - print "URL d'origine: ".$_SERVER["HTTP_REFERER"]."
\n";; + print "QUERY_STRING: ".$_SERVER["QUERY_STRING"]."
\n";; + print "Referer: ".$_SERVER["HTTP_REFERER"]."
\n";; if ($db) { print "
\n"; diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index c90b98d98c7..e616bf71f3c 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -25,6 +25,8 @@ require("./pre.inc.php"); require("../propal.class.php"); require("../facture.class.php"); +$langs->load("products"); + $user->getrights('produit'); $user->getrights('propale'); $user->getrights('facture'); @@ -201,9 +203,6 @@ llxHeader("","","Fiche produit"); /* * Création du produit * - * - * - * */ if ($_GET["action"] == 'create') { @@ -259,7 +258,6 @@ if ($_GET["action"] == 'create') } else { - if ($_GET["id"]) { if ($_GET["action"] <> 're-edit') @@ -281,7 +279,7 @@ else print '
rowid\">$objp->refrowid\">".img_file()." $objp->refidp\">$objp->nom
'; print ''; print '"; + print ""; print ''; print '
'; - print ''; + print ''; print 'Réf :  '; print '
'; print 'Libellé :  '; @@ -303,7 +301,7 @@ else } $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); @@ -329,8 +327,9 @@ else } else { - $nblignefour=3; + $nblignefour=4; } + print ''; print 'Fournisseurs [Ajouter]'; @@ -349,7 +348,7 @@ else { $objp = $db->fetch_object($i); $var=!$var; - print "
'.$objp->nom.''; print ''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 046bbabb9f4..59af16ce17f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -21,6 +21,9 @@ * */ require("./pre.inc.php"); + +$langs->load("products"); + $user->getrights('produit'); 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][1] = 'Statistiques'; + 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 .= " FROM ".MAIN_DB_PREFIX."product_price as p"; $sql .= " WHERE fk_product = ".$product->id; @@ -97,8 +100,8 @@ if ($result) $i++; } $db->free(); - print "
"; + print "
"; } } else @@ -106,7 +109,7 @@ else print $db->error() . "
" .$sql; } - +print "\n"; $db->close();