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; }