diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index d2f9b482c63..3deb0711e00 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3095,8 +3095,8 @@ if ($action == 'create') { print ' '.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).''; } if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) { - $facusing = new FactureFournisseur($db); if ($object->fk_facture_source > 0) { + $facusing = new FactureFournisseur($db); $facusing->fetch($object->fk_facture_source); print ' '.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).''; } else {