Fix: Pb register_globals = off

Trad: Traduction expeditions
This commit is contained in:
Laurent Destailleur 2005-04-12 18:21:30 +00:00
parent 59c5166ec5
commit 3062927481
2 changed files with 33 additions and 33 deletions

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) 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
@ -20,7 +21,8 @@
* *
*/ */
/*! \file htdocs/expedition/commande.php /**
\file htdocs/expedition/commande.php
\ingroup expedition \ingroup expedition
\version $Revision$ \version $Revision$
*/ */
@ -85,7 +87,7 @@ if ($_GET["id"] > 0)
*/ */
if ($_GET["action"] == 'cloture') if ($_GET["action"] == 'cloture')
{ {
$html->form_confirm("commande.php?id=$id","Cloturer la commande","Etes-vous sûr de cloturer cette commande ?","confirm_cloture"); $html->form_confirm("commande.php?id=".$_GET["id"],"Cloturer la commande","Etes-vous sûr de cloturer cette commande ?","confirm_cloture");
} }
/* /*
* *
@ -94,8 +96,8 @@ if ($_GET["id"] > 0)
print '<form method="post" action="fiche.php">'; print '<form method="post" action="fiche.php">';
print '<input type="hidden" name="action" value="create">'; print '<input type="hidden" name="action" value="create">';
print '<input type="hidden" name="commande_id" value="'.$commande->id.'">'; print '<input type="hidden" name="commande_id" value="'.$commande->id.'">';
print '<table class="border" cellspacing="0" cellpadding="2" width="100%">'; print '<table class="border" width="100%">';
print '<tr><td width="20%">Client</td>'; print '<tr><td width="20%">'.$langs->trans("Customer").'</td>';
print "<td colspan=\"2\">"; print "<td colspan=\"2\">";
print '<b><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></b></td>'; print '<b><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$soc->id.'">'.$soc->nom.'</a></b></td>';
@ -103,7 +105,7 @@ if ($_GET["id"] > 0)
print $commande->statuts[$commande->statut]; print $commande->statuts[$commande->statut];
print "</td></tr>"; print "</td></tr>";
print "<tr><td>Date</td>"; print '<tr><td>'.$langs->trans("Date").'</td>';
print "<td colspan=\"2\">".strftime("%A %d %B %Y",$commande->date)."</td>\n"; print "<td colspan=\"2\">".strftime("%A %d %B %Y",$commande->date)."</td>\n";
print '<td width="50%">Source : ' . $commande->sources[$commande->source] ; print '<td width="50%">Source : ' . $commande->sources[$commande->source] ;
@ -207,7 +209,7 @@ if ($_GET["id"] > 0)
} }
else else
{ {
print $db->error(); dolibarr_print_error($db);
} }
/* /*
@ -217,8 +219,9 @@ if ($_GET["id"] > 0)
if ($reste_a_livrer_total > 0) if ($reste_a_livrer_total > 0)
{ {
$entrepot = new Entrepot($db); $entrepot = new Entrepot($db);
$langs->load("stocks");
print '<tr><td width="20%">Entrepôt</td>'; print '<tr><td width="20%">'.$langs->trans("Warehouse").'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
$html->select_array("entrepot_id",$entrepot->list_array()); $html->select_array("entrepot_id",$entrepot->list_array());
print '</td></tr>'; print '</td></tr>';

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 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
@ -20,7 +21,8 @@
* *
*/ */
/*! \file htdocs/expedition/fiche.php /**
\file htdocs/expedition/fiche.php
\ingroup expedition \ingroup expedition
\brief Fiche descriptive d'une expedition \brief Fiche descriptive d'une expedition
\version $Revision$ \version $Revision$
@ -82,14 +84,14 @@ if ($_POST["action"] == 'add')
*/ */
if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == yes && $user->rights->expedition->valider) if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == 'yes' && $user->rights->expedition->valider)
{ {
$expedition = new Expedition($db); $expedition = new Expedition($db);
$expedition->fetch($_GET["id"]); $expedition->fetch($_GET["id"]);
$result = $expedition->valid($user); $result = $expedition->valid($user);
} }
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes) if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
{ {
if ($user->rights->expedition->supprimer ) if ($user->rights->expedition->supprimer )
{ {
@ -291,7 +293,7 @@ else
$soc = new Societe($db); $soc = new Societe($db);
$soc->fetch($commande->soc_id); $soc->fetch($commande->soc_id);
print_titre("Expedition : ".$expedition->ref); print_titre($langs->trans("Sending").": ".$expedition->ref);
/* /*
* Confirmation de la suppression * Confirmation de la suppression
@ -354,7 +356,7 @@ else
* Lignes * Lignes
* *
*/ */
echo '<br><table border="0" width="100%" cellspacing="0" cellpadding="3">'; echo '<br><table class="noborder" width="100%">';
$sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande, ed.qty as qty_livre"; $sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande, ed.qty as qty_livre";
$sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed"; $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed";
@ -386,7 +388,7 @@ else
} }
else else
{ {
print "<td>".stripslashes(nl2br($objp->description))."</TD>\n"; print "<td>".stripslashes(nl2br($objp->description))."</td>\n";
} }
print '<td align="center">'.$objp->qty_commande.'</td>'; print '<td align="center">'.$objp->qty_commande.'</td>';
print '<td align="center">'.$objp->qty_livre.'</td>'; print '<td align="center">'.$objp->qty_livre.'</td>';
@ -400,8 +402,7 @@ else
} }
else else
{ {
print "$sql"; dolibarr_print_error($db);
print $db->error();
} }
@ -411,25 +412,21 @@ else
*/ */
if ($user->societe_id == 0) if ($user->societe_id == 0)
{ {
print '<p><div class="tabsAction">'; print '<div class="tabsAction">';
if ($expedition->brouillon && $user->rights->expedition->supprimer) if ($expedition->statut == 0 && $user->rights->expedition->valider)
{ {
print '<a class="tabAction" href="fiche.php?id='.$expedition->id.'&amp;action=delete">Supprimer</a>'; print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&amp;action=valid">'.$langs->trans("Validate").'</a>';
} }
if ($expedition->brouillon && $user->rights->expedition->supprimer)
if ($expedition->statut == 0) {
{ print '<a class="butActionDelete" href="fiche.php?id='.$expedition->id.'&amp;action=delete">'.$langs->trans("Delete").'</a>';
if ($user->rights->expedition->valider) }
{
print '<a class="tabAction" href="fiche.php?id='.$expedition->id.'&amp;action=valid">Valider</a>';
} print "</div>";
}
print "</div>";
} }
print "<p>\n";
/* /*
* Déjà livré * Déjà livré