diff --git a/src/app/search/controllers/SearchController.php b/src/app/search/controllers/SearchController.php index 717611200213d30bd4458a502a7d1deeb979394e..319481d177d51ad0df82d8e1337e22e64e4b23be 100644 --- a/src/app/search/controllers/SearchController.php +++ b/src/app/search/controllers/SearchController.php @@ -875,12 +875,10 @@ class SearchController 'data' => $data ]); } elseif ($roleId == 'visa') { - $data[] = 'VISA_CIRCUIT'; - $data[] = 'false'; - $data[] = 'false'; + $data = array_merge($data, ['VISA_CIRCUIT', 'false', 'false', 'true']); $rolesMatch = ListInstanceModel::get([ 'select' => ['res_id'], - 'where' => ["({$where})", 'difflist_type = ?', 'signatory = ?', 'requested_signature = ?'], + 'where' => ["({$where})", 'difflist_type = ?', 'signatory = ?', '(requested_signature = ? or (requested_signature = ? and process_date is not null))'], 'data' => $data ]); } else {