diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 8951011775b..d0bd737f374 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -44,15 +44,15 @@ $result = restrictedArea($user, 'commande_fournisseur', $id,''); if ($_POST["action"] == 'updatenote' && $user->rights->fournisseur->commande->creer) { - $commande = new CommandeFournisseur($db); - $commande->fetch($_GET["id"]); + $commande = new CommandeFournisseur($db); + $commande->fetch($_GET["id"]); - $result = $commande->UpdateNote($user, $_POST["note"], $_POST["note_public"]); - if ($result >= 0) - { - Header("Location: note.php?id=".$_GET["id"]); - exit; - } + $result = $commande->UpdateNote($user, $_POST["note"], $_POST["note_public"]); + if ($result >= 0) + { + Header("Location: note.php?id=".$_GET["id"]); + exit; + } } @@ -76,103 +76,105 @@ $id = $_GET['id']; $ref= $_GET['ref']; if ($id > 0 || ! empty($ref)) { - $commande = new CommandeFournisseur($db); - $result=$commande->fetch($_GET["id"],$_GET['ref']); - if ($result >= 0) - { - $soc = new Societe($db); - $soc->fetch($commande->socid); + $commande = new CommandeFournisseur($db); + $result=$commande->fetch($_GET["id"],$_GET['ref']); + if ($result >= 0) + { + $soc = new Societe($db); + $soc->fetch($commande->socid); - $author = new User($db); - $author->fetch($commande->user_author_id); + $author = new User($db); + $author->fetch($commande->user_author_id); - $head = ordersupplier_prepare_head($commande); + $head = ordersupplier_prepare_head($commande); - $title=$langs->trans("SupplierOrder"); - dol_fiche_head($head, 'note', $title, 0, 'order'); + $title=$langs->trans("SupplierOrder"); + dol_fiche_head($head, 'note', $title, 0, 'order'); - /* - * Commande - */ - print '
"; + if ($user->rights->fournisseur->commande->creer) + { + print '