Restored counting homes total from AdressdB in Preordercampaign/Index

This commit is contained in:
Frank Schubert
2023-04-24 19:55:05 +02:00
parent f89909014a
commit 732ee1c407
3 changed files with 11 additions and 4 deletions
+3 -1
View File
@@ -113,8 +113,10 @@
<td>
<a href="<?=self::getUrl("Preorder", "Index", ["filter" => ["preordercampaign_id" => $camp->id]])?>">
<?=$camp->active_preorder_count?>
<?php if($camp->homes_total): ?>
<?php if($camp->homes_total): // manual value ?>
/ <?=$camp->homes_total?> (<?=(round(($camp->active_preorder_count / $camp->homes_total) * 100, 2))?> %)
<?php elseif($camp->total_homes): // automatic value from AdressDB ?>
/ <?=$camp->total_homes?> (<?=(round(($camp->active_preorder_count / $camp->total_homes) * 100, 2))?> %)
<?php endif; ?>
</a>
</td>