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