diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 2a1f1dab8bc..ebe198613c2 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2135,13 +2135,17 @@ else // Reopen a standard paid invoice if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) { - if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice + if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice { print ''.$langs->trans('ReOpen').''; } else { - print ''.$langs->trans('ReOpen').''; + if ($user->rights->fournisseur->facture->creer) { + print ''.$langs->trans('ReOpen').''; + } elseif (!$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) { + print ''.$langs->trans('ReOpen').''; + } } }