From 1af82d5dead4784bc4397d153f014916db4b74f4 Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 15 Oct 2020 12:27:45 +0200 Subject: [PATCH] Added total to CQ award summary --- application/models/Cq.php | 10 ++++++++++ application/views/awards/cq/index.php | 4 +--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/application/models/Cq.php b/application/models/Cq.php index d5d47d38..1acea86c 100644 --- a/application/models/Cq.php +++ b/application/models/Cq.php @@ -227,6 +227,12 @@ class CQ extends CI_Model{ $cqSummary['confirmed'][$band] = $confirmed[0]->count; } + $workedTotal = $this->getSummaryByBand('All', $station_id); + $confirmedTotal = $this->getSummaryByBandConfirmed('All', $station_id); + + $cqSummary['worked']['Total'] = $workedTotal[0]->count; + $cqSummary['confirmed']['Total'] = $confirmedTotal[0]->count; + return $cqSummary; } @@ -237,6 +243,8 @@ class CQ 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 . "'"; @@ -254,6 +262,8 @@ class CQ 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/cq/index.php b/application/views/awards/cq/index.php index 24de609a..04d356df 100644 --- a/application/views/awards/cq/index.php +++ b/application/views/awards/cq/index.php @@ -175,9 +175,7 @@ foreach($bands as $band) { echo '' . $band . ''; } - echo ''; - - echo ' + echo 'Total