diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 7ba49f39a94..836d24e8e20 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1257,9 +1257,13 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->fournisseur->commande->approuver) { print ''.$langs->trans("ApproveOrder").''; - print ''.$langs->trans("RefuseOrder").''; } + else + { + print ''.$langs->trans("ApproveOrder").''; + print ''.$langs->trans("RefuseOrder").''; + } } // Send @@ -1276,15 +1280,6 @@ if ($id > 0 || ! empty($ref)) } } - // Cancel - if ($commande->statut == 2) - { - if ($user->rights->fournisseur->commande->commander) - { - print ''.$langs->trans("CancelOrder").''; - } - } - // Reopen if ($commande->statut == 5 || $commande->statut == 6 || $commande->statut == 7 || $commande->statut == 9) { @@ -1295,7 +1290,7 @@ if ($id > 0 || ! empty($ref)) } // Create bill - if ($conf->fournisseur->enabled && $commande->statut > 0) + if ($conf->fournisseur->enabled && $commande->statut >= 2) // 2 means accepted { if ($user->rights->fournisseur->facture->creer) { @@ -1308,6 +1303,15 @@ if ($id > 0 || ! empty($ref)) //} } + // Cancel + if ($commande->statut == 2) + { + if ($user->rights->fournisseur->commande->commander) + { + print ''.$langs->trans("CancelOrder").''; + } + } + // Delete if ($user->rights->fournisseur->commande->supprimer) {