Hide total if Band = SAT

This commit is contained in:
Andreas Kristiansen
2026-02-24 22:13:30 +01:00
parent c0e97984ed
commit e491772589
2 changed files with 16 additions and 6 deletions

View File

@@ -695,6 +695,8 @@ class Awards extends CI_Controller {
$postdata['dateto'] = null; $postdata['dateto'] = null;
} }
$data['posted_band'] = $postdata['band'];
if ($logbooks_locations_array) { if ($logbooks_locations_array) {
$location_list = "'".implode("','",$logbooks_locations_array)."'"; $location_list = "'".implode("','",$logbooks_locations_array)."'";
$cq_result = $this->cq->get_cq_array($bands, $postdata, $location_list); $cq_result = $this->cq->get_cq_array($bands, $postdata, $location_list);

View File

@@ -227,20 +227,28 @@
foreach($bands as $band) { foreach($bands as $band) {
echo '<td>' . $band . '</td>'; echo '<td>' . $band . '</td>';
} }
echo "<td>" . __("Total") . "</td></tr> if ($posted_band != 'SAT') {
</thead> echo "<td>" . __("Total") . "</td></tr>";
}
echo "</thead>
<tbody> <tbody>
<tr><td>" . __("Total worked") . "</td>"; <tr><td>" . __("Total worked") . "</td>";
foreach ($cq_summary['worked'] as $dxcc) { // Fills the table with the data foreach ($cq_summary['worked'] as $cqz => $value) { // Fills the table with the data
echo '<td style="text-align: center">' . $dxcc . '</td>'; if ($posted_band == 'SAT' && $cqz == 'Total') {
continue;
}
echo '<td style="text-align: center">' . $value . '</td>';
} }
echo "</tr><tr> echo "</tr><tr>
<td>" . __("Total confirmed") . "</td>"; <td>" . __("Total confirmed") . "</td>";
foreach ($cq_summary['confirmed'] as $dxcc) { // Fills the table with the data foreach ($cq_summary['confirmed'] as $cqz => $value) { // Fills the table with the data
echo '<td style="text-align: center">' . $dxcc . '</td>'; if ($posted_band == 'SAT' && $cqz == 'Total') {
continue;
}
echo '<td style="text-align: center">' . $value . '</td>';
} }
echo '</tr> echo '</tr>