From 37291131ef345d21e528a1aa5b95f25bdc9adba6 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 18 Dec 2006 13:56:20 +0000 Subject: [PATCH] Modif permission lue pour la suppression d'une commande --- htdocs/fourn/commande/fiche.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index bf49b340fa8..7f9a0221944 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -198,9 +198,9 @@ if ($_POST['action'] == 'updateligne' && $user->rights->fournisseur->commande->c if ($_GET['action'] == 'deleteline' && $user->rights->fournisseur->commande->creer) { - $commande = new CommandeFournisseur($db); + $commande = new CommandeFournisseur($db); $commande->fetch($_GET['id']); - $result = $commande->delete_line($_GET['lineid']); + $result = $commande->delete_line($_GET['lineid']); if ($_REQUEST['lang_id']) { $outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs"); @@ -260,16 +260,13 @@ if ($_POST['action'] == 'confirm_commande' && $_POST['confirm'] == 'yes' && $use } -if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->fournisseur->commande->supprimer) +if ($_POST['action'] == 'confirm_delete' && $_POST['confirm'] == 'yes' && $user->rights->fournisseur->commande->creer) { - if ($user->rights->commande->supprimer ) - { - $commande = new CommandeFournisseur($db); - $commande->id = $_GET['id']; - $commande->delete(); - Header('Location: index.php'); - exit; - } + $commande = new CommandeFournisseur($db); + $commande->id = $_GET['id']; + $commande->delete(); + Header('Location: index.php'); + exit; } if ($_POST["action"] == 'livraison' && $user->rights->fournisseur->commande->receptionner)