From 1696656082837a14cebc42fcf85a0782a5bd5b75 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 14 Oct 2020 13:03:21 +0200 Subject: [PATCH 1/2] Added total for the DXCC award. --- application/models/Dxcc.php | 12 +++++++++++- application/views/awards/dxcc/index.php | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/application/models/Dxcc.php b/application/models/Dxcc.php index 217b578d..c63927af 100644 --- a/application/models/Dxcc.php +++ b/application/models/Dxcc.php @@ -480,6 +480,12 @@ class DXCC extends CI_Model { $dxccSummary['confirmed'][$band] = $confirmed[0]->count; } + $workedTotal = $this->getSummaryByBand('All', $station_id); + $confirmedTotal = $this->getSummaryByBandConfirmed('All', $station_id); + + $dxccSummary['worked']['Total'] = $workedTotal[0]->count; + $dxccSummary['confirmed']['Total'] = $confirmedTotal[0]->count; + return $dxccSummary; } @@ -489,12 +495,14 @@ class DXCC extends CI_Model { $sql .= " where station_id = " . $station_id; + if ($band == 'SAT') { $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else if ($band == 'All') { + $sql .= " and thcv.col_prop_mode !='SAT'"; } else { $sql .= " and thcv.col_prop_mode !='SAT'"; $sql .= " and thcv.col_band ='" . $band . "'"; - } $query = $this->db->query($sql); @@ -509,6 +517,8 @@ class DXCC extends CI_Model { if ($band == 'SAT') { $sql .= " and thcv.col_prop_mode ='" . $band . "'"; + } else if ($band == 'All') { + $sql .= " and thcv.col_prop_mode !='SAT'"; } else { $sql .= " and thcv.col_prop_mode !='SAT'"; $sql .= " and thcv.col_band ='" . $band . "'"; diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index 15f4e37c..cad49bee 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -145,7 +145,7 @@ foreach($bands as $band) { echo '' . $band . ''; } - echo ''; + echo 'Total'; echo ' From bea973b34d01220ccfa85e07a21e27bf895550fd Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 15 Oct 2020 09:52:54 +0200 Subject: [PATCH 2/2] Removed an extra tag that shouldn't be there in the table. --- application/views/awards/dxcc/index.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/application/views/awards/dxcc/index.php b/application/views/awards/dxcc/index.php index cad49bee..944032fb 100644 --- a/application/views/awards/dxcc/index.php +++ b/application/views/awards/dxcc/index.php @@ -145,9 +145,8 @@ foreach($bands as $band) { echo '' . $band . ''; } - echo 'Total'; - - echo ' + echo 'Total +