diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 67acd23b633..e1a05258ea5 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -2388,14 +2388,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").'';
}
}