From 3062927481518740edf7cc3cb0d5979c38e2abca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Apr 2005 18:21:30 +0000 Subject: [PATCH] Fix: Pb register_globals = off Trad: Traduction expeditions --- htdocs/expedition/commande.php | 17 +++++++----- htdocs/expedition/fiche.php | 49 ++++++++++++++++------------------ 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 3c43635cf2d..e0b2f725f4c 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,7 +21,8 @@ * */ -/*! \file htdocs/expedition/commande.php +/** + \file htdocs/expedition/commande.php \ingroup expedition \version $Revision$ */ @@ -85,7 +87,7 @@ if ($_GET["id"] > 0) */ 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 '
'; print ''; print ''; - print ''; - print ''; + print '
Client
'; + print ''; print "'; @@ -103,7 +105,7 @@ if ($_GET["id"] > 0) print $commande->statuts[$commande->statut]; print ""; - print ""; + print ''; print "\n"; print ''; + print ''; print ''; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 8322e739662..ae73691a5d5 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1,5 +1,6 @@ + * Copyright (C) 2005 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 @@ -20,7 +21,8 @@ * */ -/*! \file htdocs/expedition/fiche.php +/** + \file htdocs/expedition/fiche.php \ingroup expedition \brief Fiche descriptive d'une expedition \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->fetch($_GET["id"]); $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 ) { @@ -291,7 +293,7 @@ else $soc = new Societe($db); $soc->fetch($commande->soc_id); - print_titre("Expedition : ".$expedition->ref); + print_titre($langs->trans("Sending").": ".$expedition->ref); /* * Confirmation de la suppression @@ -354,7 +356,7 @@ else * Lignes * */ - echo '
'.$langs->trans("Customer").'"; print ''.$soc->nom.'
Date
'.$langs->trans("Date").'".strftime("%A %d %B %Y",$commande->date)."Source : ' . $commande->sources[$commande->source] ; @@ -207,7 +209,7 @@ if ($_GET["id"] > 0) } else { - print $db->error(); + dolibarr_print_error($db); } /* @@ -217,8 +219,9 @@ if ($_GET["id"] > 0) if ($reste_a_livrer_total > 0) { $entrepot = new Entrepot($db); + $langs->load("stocks"); - print '
Entrepôt
'.$langs->trans("Warehouse").''; $html->select_array("entrepot_id",$entrepot->list_array()); print '
'; + echo '
'; $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"; @@ -386,7 +388,7 @@ else } else { - print "\n"; + print "\n"; } print ''; print ''; @@ -400,8 +402,7 @@ else } else { - print "$sql"; - print $db->error(); + dolibarr_print_error($db); } @@ -411,25 +412,21 @@ else */ if ($user->societe_id == 0) { - print '

'; - - if ($expedition->brouillon && $user->rights->expedition->supprimer) - { - print 'Supprimer'; - } - - - if ($expedition->statut == 0) - { - if ($user->rights->expedition->valider) - { - print 'Valider'; - } - - } - print "
"; + print '
'; + + if ($expedition->statut == 0 && $user->rights->expedition->valider) + { + print ''.$langs->trans("Validate").''; + } + + if ($expedition->brouillon && $user->rights->expedition->supprimer) + { + print ''.$langs->trans("Delete").''; + } + + + print "
"; } - print "

\n"; /* * Déjà livré

".stripslashes(nl2br($objp->description))."".stripslashes(nl2br($objp->description))."'.$objp->qty_commande.''.$objp->qty_livre.'