diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php index c1f94a820f3..04e7a427052 100644 --- a/htdocs/fourn/facture/card-rec.php +++ b/htdocs/fourn/facture/card-rec.php @@ -105,8 +105,8 @@ $pageprev = $page - 1; $pagenext = $page + 1; $object = new FactureFournisseurRec($db); -if (($id > 0 || $title) && $action != 'create' && $action != 'add') { - $ret = $object->fetch($id, $title); +if (($id > 0 || $ref) && $action != 'create' && $action != 'add') { + $ret = $object->fetch($id, $ref); if (! $ret) { setEventMessages($langs->trans("ErrorRecordNotFound"), null, 'errors'); }