diff --git a/web/template/tu_details.php b/web/template/tu_details.php index 61abab79..c09e30c4 100644 --- a/web/template/tu_details.php +++ b/web/template/tu_details.php @@ -3,9 +3,18 @@ $yes = $row["Yes"]; $no = $row["No"]; $abstain = $row["Abstain"]; $active_tus = $row["ActiveTUs"]; +$quorum = $row["Quorum"]; $total = $yes + $no + $abstain; $participation = $total / $active_tus; + +if ($yes > $active_tus / 2) { + $vote_accepted = true; +} elseif ($participation > $quorum && $yes > $no) { + $vote_accepted = true; +} else { + $vote_accepted = false; +} ?>