From dbdbbdebf3bd1f0aef1f009a51ec6f93ac3a77c0 Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 15 Oct 2020 09:49:55 +0200 Subject: [PATCH] Added total count for summary in Iota award --- application/models/Iota.php | 10 ++++++++++ application/views/awards/iota/index.php | 5 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/application/models/Iota.php b/application/models/Iota.php index a2f054b7..9d7a5e69 100644 --- a/application/models/Iota.php +++ b/application/models/Iota.php @@ -324,6 +324,12 @@ class IOTA extends CI_Model { $iotaSummary['confirmed'][$band] = $confirmed[0]->count; } + $workedTotal = $this->getSummaryByBand('All', $station_id); + $confirmedTotal = $this->getSummaryByBandConfirmed('All', $station_id); + + $iotaSummary['worked']['Total'] = $workedTotal[0]->count; + $iotaSummary['confirmed']['Total'] = $confirmedTotal[0]->count; + return $iotaSummary; } @@ -335,6 +341,8 @@ class IOTA 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 . "'"; @@ -353,6 +361,8 @@ class IOTA 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/iota/index.php b/application/views/awards/iota/index.php index c3b63057..67102832 100644 --- a/application/views/awards/iota/index.php +++ b/application/views/awards/iota/index.php @@ -136,10 +136,9 @@ foreach($bands as $band) { echo '' . $band . ''; } - echo ''; + echo 'Total'; - echo ' - + echo ' Total worked';