[Advanced Logbook] Hide / if frequency rx is 0

This commit is contained in:
Andreas Kristiansen
2025-07-18 07:05:12 +02:00
parent cadaa51462
commit 3b979da8cc

View File

@@ -1334,13 +1334,17 @@ class QSO
private function getFormattedFrequency(): string private function getFormattedFrequency(): string
{ {
$label = ''; $label = '';
if ($this->frequency !== 0 && $this->frequency !== '') { if ($this->frequency) {
$label .= $this->CI->frequency->qrg_conversion($this->frequency ?? 0); $label .= $this->CI->frequency->qrg_conversion($this->frequency ?? 0);
} }
if ($this->frequencyRX !== '' && $this->frequencyRX !== 0 && $this->frequency !== '' && $this->frequency !== 0) { if ($this->frequencyRX && $this->frequency) {
$label .= "/" . $this->CI->frequency->qrg_conversion($this->frequencyRX ?? 0); $converted_rx = $this->CI->frequency->qrg_conversion($this->frequencyRX);
if ($converted_rx) {
$label .= "/" . $converted_rx;
}
} }
return trim($label); return trim($label);
} }