diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 41a6d030e16..4143cd0246e 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -2391,14 +2391,11 @@ elseif (! empty($object->id))
}
// Create bill
- if (! empty($conf->facture->enabled))
+ if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled
{
- if (! empty($conf->fournisseur->enabled) && ($object->statut >= 2 && $object->statut != 7 && $object->billed != 1)) // statut 2 means approved, 7 means canceled
+ if ($user->rights->fournisseur->facture->creer)
{
- if ($user->rights->fournisseur->facture->creer)
- {
- print ''.$langs->trans("CreateBill").'';
- }
+ print ''.$langs->trans("CreateBill").'';
}
}