From 1ab6cd4b59b542422131cc2e52ab7d5572d5c858 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Oct 2018 17:51:32 +0200 Subject: [PATCH] Update card.php --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index aeb145a7ea2..6f24d1f86fb 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3250,7 +3250,7 @@ if ($action == 'create') print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1); // We check if Origin document (id and type is known) has already at least one invoice attached to it $objectsrc->fetchObjectLinked($originid,$origin,'','facture'); - if(!empty($objectsrc->linkedObjects['facture']) && is_array($objectsrc->linkedObjects['facture'])) + if (is_array($objectsrc->linkedObjects['facture']) && count($objectsrc->linkedObjects['facture']) >= 1) { setEventMessages('WarningBillExist', null, 'warnings'); echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')';