1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 15:13:29 +01:00

fixes for switch

This commit is contained in:
David Bomba 2024-09-22 18:17:24 +10:00
parent 76dcc61a5e
commit 595cccc97d

View File

@ -100,8 +100,9 @@ class SearchController extends Controller
switch($result['_index']) { switch($result['_index']) {
case 'clients': case 'clients':
if($result['_source']['is_deleted']) if($result['_source']['is_deleted']) //do not return deleted results
continue; break;
$this->clients[] = [ $this->clients[] = [
'name' => $result['_source']['name'], 'name' => $result['_source']['name'],
@ -113,9 +114,9 @@ class SearchController extends Controller
break; break;
case 'invoices': case 'invoices':
if ($result['_source']['is_deleted']) { if ($result['_source']['is_deleted']) //do not return deleted invoices
continue; break;
}
$this->invoices[] = [ $this->invoices[] = [
'name' => $result['_source']['name'], 'name' => $result['_source']['name'],
@ -126,7 +127,7 @@ class SearchController extends Controller
break; break;
case 'client_contacts': case 'client_contacts':
if($result['_source']['__soft_deleted']) if($result['_source']['__soft_deleted']) // do not return deleted contacts
continue; continue;
$this->client_contacts[] = [ $this->client_contacts[] = [