output progressbar only if receipts are available

This commit is contained in:
Uwe Steinmann 2017-01-18 11:00:38 +01:00
parent 17b72a9d0c
commit 16342981eb

View File

@ -2163,12 +2163,14 @@ $(document).ready( function() {
$allcomments[''.$r['status']][] = htmlspecialchars($r['comment']);
}
$totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1'];
if($totalreceipts) {
$content .= ";
<div class=\"progress\">
<div class=\"bar bar-success\" style=\"width: ".round($rstat['1']/$totalreceipts*100)."%;\">".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('<i class="icon-comment"></i>', implode('<br />', $allcomments['1']), true) : "")."</div>
<div class=\"bar bar-danger\" style=\"width: ".round($rstat['-1']/$totalreceipts*100)."%;\">".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('<i class="icon-comment"></i>', implode('<br />', $allcomments['-1']), true) : "")."</div>
</div>";
}
}
$content .= "</small></td>";
// $content .= "<td>".$version."</td>";
$content .= "<td>";