Trad: Traduction du module expedition

This commit is contained in:
Laurent Destailleur 2005-04-04 19:38:17 +00:00
parent 1552e0ed27
commit 721e1086ba
6 changed files with 64 additions and 41 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2005 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
@ -21,25 +21,28 @@
* *
*/ */
/*! \file htdocs/expedition/index.php /**
\file htdocs/expedition/index.php
\ingroup expedition \ingroup expedition
\brief Page accueil du module expedition \brief Page accueil du module expedition
\version $Revision$ \version $Revision$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("sendings");
llxHeader('','Expéditions','ch-expedition.html',$form_search); llxHeader('','Expéditions','ch-expedition.html',$form_search);
print_titre("Expeditions"); print_titre($langs->trans("Sendings"));
print '<table border="0" width="100%" cellspacing="0" cellpadding="4">'; print '<table border="0" width="100%">';
print '<tr><td valign="top" width="30%">'; print '<tr><td valign="top" width="30%">';
print '<form method="post" action="liste.php">'; print '<form method="post" action="liste.php">';
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchASending").'</td></tr>'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("SearchASending").'</td></tr>';
print "<tr $bc[1]><td>"; print "<tr $bc[1]><td>";
print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print $langs->trans("Ref").' : <input type="text" name="sf_ref"> <input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
@ -60,7 +63,7 @@ if ( $db->query($sql) )
$num = $db->num_rows(); $num = $db->num_rows();
if ($num) if ($num)
{ {
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="3">Expeditions à valider</td></tr>'; print '<td colspan="3">Expeditions à valider</td></tr>';
$i = 0; $i = 0;
@ -97,7 +100,7 @@ if ( $db->query($sql) )
$langs->load("orders"); $langs->load("orders");
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersToProcess").'</td></tr>'; print '<td colspan="2">'.$langs->trans("OrdersToProcess").'</td></tr>';
$var = True; $var = True;
@ -139,7 +142,7 @@ if ( $db->query($sql) )
if ($num) if ($num)
{ {
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("OrdersInProcess").'</td></tr>'; print '<td colspan="2">'.$langs->trans("OrdersInProcess").'</td></tr>';
$var = True; $var = True;
@ -175,9 +178,9 @@ if ( $db->query($sql) )
if ($num) if ($num)
{ {
$i = 0; $i = 0;
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="3">5 dernières expéditions</td></tr>'; print '<td colspan="3">'.$langs->trans("LastSendings",$max).'</td></tr>';
$var = True; $var = True;
while ($i < $num) while ($i < $num)
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2005 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
@ -21,17 +21,21 @@
* *
*/ */
/*! \file htdocs/expedition/liste.php /**
\file htdocs/expedition/liste.php
\ingroup expedition \ingroup expedition
\brief Page de la liste des propositions commerciales \brief Page de la liste des propositions commerciales
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("sendings");
$user->getrights('expedition'); $user->getrights('expedition');
if (!$user->rights->expedition->lire) if (!$user->rights->expedition->lire)
accessforbidden(); accessforbidden();
/* /*
* Sécurité accés client * Sécurité accés client
*/ */
@ -41,20 +45,16 @@ if ($user->societe_id > 0)
$socidp = $user->societe_id; $socidp = $user->societe_id;
} }
/******************************************************************************/ /******************************************************************************/
/* Fin des Actions */ /* Fin des Actions */
/******************************************************************************/ /******************************************************************************/
llxHeader('','Liste des expéditions','ch-expedition.html'); llxHeader('','Liste des expéditions','ch-expedition.html');
if ($_GET["sortfield"] == "") if (! $sortfield) $sortfield="e.rowid";
{ if (! $sortorder) $sortorder="DESC";
$sortfield="e.rowid";
}
if ($_GET["sortorder"] == "")
{
$sortorder="DESC";
}
$limit = $conf->liste_limit; $limit = $conf->liste_limit;
$offset = $limit * $_GET["page"] ; $offset = $limit * $_GET["page"] ;
@ -80,10 +80,12 @@ $expedition = new Expedition($db);
$sql .= " ORDER BY $sortfield $sortorder"; $sql .= " ORDER BY $sortfield $sortorder";
$sql .= $db->plimit($limit + 1,$offset); $sql .= $db->plimit($limit + 1,$offset);
if ( $db->query($sql) ) $resql=$db->query($sql);
if ($resql)
{ {
$num = $db->num_rows(); $num = $db->num_rows($resql);
print_barre_liste("Expeditions", $_GET["page"], "liste.php","&amp;socidp=$socidp",$sortfield,$sortorder,'',$num);
print_barre_liste($langs->trans("Sendings"), $_GET["page"], "liste.php","&amp;socidp=$socidp",$sortfield,$sortorder,'',$num);
$i = 0; $i = 0;
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -97,7 +99,7 @@ if ( $db->query($sql) )
while ($i < min($num,$limit)) while ($i < min($num,$limit))
{ {
$objp = $db->fetch_object(); $objp = $db->fetch_object($resql);
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
@ -132,13 +134,15 @@ if ( $db->query($sql) )
} }
print "</table>"; print "</table>";
$db->free(); $db->free($resql);
} }
else else
{ {
print $db->error(); dolibarr_print_error($db);
} }
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
llxFooter('$Date$ - $Revision$');
?> ?>

View File

@ -31,12 +31,16 @@
require("./pre.inc.php"); require("./pre.inc.php");
require("../expedition.class.php"); require("../expedition.class.php");
$langs->load("sendings");
llxHeader(); llxHeader();
print_fiche_titre('Statistiques expéditions', $mesg); print_fiche_titre($langs->trans("StatisticsOfSendings"), $mesg);
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td align="center">'.$langs->trans("Year").'</td><td width="40%" align="center">Nb d\'expédition</td></tr>'; print '<tr><td align="center">'.$langs->trans("Year").'</td>';
print '<td width="40%" align="center">'.$langs->trans("NbOfSendings").'</td></tr>';
$sql = "SELECT count(*), date_format(date_expedition,'%Y') as dm FROM ".MAIN_DB_PREFIX."expedition WHERE fk_statut > 0 GROUP BY dm DESC "; $sql = "SELECT count(*), date_format(date_expedition,'%Y') as dm FROM ".MAIN_DB_PREFIX."expedition WHERE fk_statut > 0 GROUP BY dm DESC ";
if ($db->query($sql)) if ($db->query($sql))
@ -59,5 +63,5 @@ print '</table><br><i>Statistiques effectu
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter('$Date$ - $Revision$');
?> ?>

View File

@ -195,11 +195,14 @@ class MenuLeft {
$langs->load("orders"); $langs->load("orders");
$newmenu->add(DOL_URL_ROOT."/commande/index.php?leftmenu=orders", $langs->trans("Orders"), 0 ,$user->rights->commande->lire); $newmenu->add(DOL_URL_ROOT."/commande/index.php?leftmenu=orders", $langs->trans("Orders"), 0 ,$user->rights->commande->lire);
if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/societe.php?leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer);
if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/liste.php", $langs->trans("List"), 1 ,$user->rights->commande->lire); if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/liste.php?leftmenu=orders", $langs->trans("List"), 1 ,$user->rights->commande->lire);
if ($conf->expedition->enabled) { if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1 ,$user->rights->commande->lire);
if ($leftmenu=="orders") $newmenu->add(DOL_URL_ROOT."/expedition/", $langs->trans("Sendings")); }
}
if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/stats/", $langs->trans("Statistics"), 1 ,$user->rights->commande->lire); if ($conf->expedition->enabled) {
$newmenu->add(DOL_URL_ROOT."/expedition/index.php?leftmenu=sendings", $langs->trans("Sendings"), 0, $user->rights->expedition->lire);
if ($leftmenu=="sendings") $newmenu->add_submenu(DOL_URL_ROOT."/expedition/liste.php?leftmenu=sendings", $langs->trans("List"), 1 ,$user->rights->expedition->lire);
if ($leftmenu=="sendings") $newmenu->add_submenu(DOL_URL_ROOT."/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1 ,$user->rights->expedition->lire);
} }
if ($conf->fichinter->enabled ) if ($conf->fichinter->enabled )

View File

@ -4,3 +4,8 @@ Sendings=Sendings
ListOfSendings=List of sendings ListOfSendings=List of sendings
SendingMethod=Sending method SendingMethod=Sending method
SendingReceipt=Sending receipt SendingReceipt=Sending receipt
LastSendings=Last %s sendings
SearchASending=Search a sending
StatisticsOfSendings=Statistics of sendings
NbOfSendings=Number of sendings

View File

@ -1,6 +1,10 @@
# Dolibarr language file - fr_FR - sendings # Dolibarr language file - fr_FR - sendings
Sending=Envoi Sending=Expédition
Sendings=Envois Sendings=Expéditions
ListOfSendings=Liste des envois ListOfSendings=Liste des expéditions
SendingMethod=Méthode de livraison SendingMethod=Méthode d'expédition
SendingReceipt=Bordereau de livraison SendingReceipt=Bordereau de livraison
LastSendings=Les %s dernieres expéditions
SearchASending=Rechercher expédition
StatisticsOfSendings=Statistiques des expéditions
NbOfSendings=Nombre d'expéditions