From 2d4052e98495078d0dc1b68e80fd2f756ffbd7fc Mon Sep 17 00:00:00 2001 From: bohwaz Date: Fri, 17 Dec 2021 12:38:25 +0100 Subject: [PATCH] =?UTF-8?q?Correctif:=20isDeletable=20renvoyait=20TRUE=20s?= =?UTF-8?q?i=20le=20client=20n'=C3=A9tait=20*PAS*=20supprimable,=20inversi?= =?UTF-8?q?on=20du=20sens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Client.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Client.php b/lib/Client.php index 1bd92b6..1881c82 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -117,15 +117,15 @@ class Client return $db->update('plugin_facturation_clients', $data, $db->where('id', (int)$id)); } - public function isDeletable($id) + public function isDeletable($id): bool { $f = new Facture; - return $f->hasDocs(0, $id); + return !$f->hasDocs(0, $id); } public function delete($id) { - if($this->isDeletable($id)) + if(!$this->isDeletable($id)) { return false; }