diff --git a/application/controllers/Logbookadvanced.php b/application/controllers/Logbookadvanced.php index 9fc9f54e..a43d3a17 100644 --- a/application/controllers/Logbookadvanced.php +++ b/application/controllers/Logbookadvanced.php @@ -105,6 +105,7 @@ class Logbookadvanced extends CI_Controller { 'band' => xss_clean($this->input->post('band')), 'qslSent' => xss_clean($this->input->post('qslSent')), 'qslReceived' => xss_clean($this->input->post('qslReceived')), + 'qslMethod' => xss_clean($this->input->post('qslMethod')), 'iota' => xss_clean($this->input->post('iota')), 'dxcc' => xss_clean($this->input->post('dxcc')), 'propmode' => xss_clean($this->input->post('propmode')), diff --git a/application/models/Logbookadvanced_model.php b/application/models/Logbookadvanced_model.php index d3f1eddf..b1a7bc92 100644 --- a/application/models/Logbookadvanced_model.php +++ b/application/models/Logbookadvanced_model.php @@ -62,7 +62,15 @@ class Logbookadvanced_model extends CI_Model { $conditions[] = $condition; $binding[] = $searchCriteria['qslReceived']; } - + if ($searchCriteria['qslMethod'] !== '') { + $condition = "COL_QSL_RCVD = ?"; + if ($searchCriteria['qslMethod'] == 'N') { + $condition = '('.$condition; + $condition .= " OR COL_QSL_RCVD IS NULL OR COL_QSL_RCVD = '')"; + } + $conditions[] = $condition; + $binding[] = $searchCriteria['qslReceived']; + } if ($searchCriteria['lotwSent'] !== '') { $condition = "COL_LOTW_QSL_SENT = ?"; if ($searchCriteria['lotwSent'] == 'N') {