Added percentage of preorders to total homes

This commit is contained in:
Frank Schubert
2022-10-12 14:07:37 +02:00
parent 609ac5ac4a
commit c56ed3076f
5 changed files with 50 additions and 7 deletions
+9 -1
View File
@@ -98,7 +98,15 @@
<td><?=$camp->network->name?></td>
<td><?=$camp->name?></td>
<td><?=$camp->area?></td>
<td><a href="<?=self::getUrl("Preorder", "Index", ["filter" => ["preordercampaign_id" => $camp->id]])?>"><?=count($camp->active_preorders)?></a></td>
<td>
<a class="btn btn-sm btn-outline-primary mr-2" href="<?=self::getUrl("Preorder", "add", ["preordercampaign_id" => $camp->id])?>"><i class="fas fa-plus" title="Vorbestellung hinzufügen"></i></a>
<a href="<?=self::getUrl("Preorder", "Index", ["filter" => ["preordercampaign_id" => $camp->id]])?>">
<?=count($camp->active_preorders)?>
<?php if($camp->total_homes): ?>
/ <?=$camp->total_homes?> (<?=(round((count($camp->active_preorders) / $camp->total_homes) * 100, 2))?> %)
<?php endif; ?>
</a>
</td>
<td><?=date('d.m.Y',$camp->from)?></td>
<td><?=date('d.m.Y',$camp->to)?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">