From 503ac06599b4cbb6e2096330c8aca2526e7fff11 Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 15 Oct 2020 12:24:20 +0200 Subject: [PATCH] Added total to WAS summary --- application/models/Was.php | 10 ++++++++++ application/views/awards/was/index.php | 4 +--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/application/models/Was.php b/application/models/Was.php index bb9b5bbe..5a33510d 100644 --- a/application/models/Was.php +++ b/application/models/Was.php @@ -148,6 +148,12 @@ class was extends CI_Model { $wasSummary['confirmed'][$band] = $confirmed[0]->count; } + $workedTotal = $this->getSummaryByBand('All', $station_id); + $confirmedTotal = $this->getSummaryByBandConfirmed('All', $station_id); + + $wasSummary['worked']['Total'] = $workedTotal[0]->count; + $wasSummary['confirmed']['Total'] = $confirmedTotal[0]->count; + return $wasSummary; } @@ -159,6 +165,8 @@ class was 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 . "'"; @@ -179,6 +187,8 @@ class was 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/was/index.php b/application/views/awards/was/index.php index 859d8f7d..5131b6d4 100644 --- a/application/views/awards/was/index.php +++ b/application/views/awards/was/index.php @@ -100,9 +100,7 @@ foreach($bands as $band) { echo '' . $band . ''; } - echo ''; - - echo ' + echo 'Total