Added Preorderbilling permissions

This commit is contained in:
Frank Schubert
2025-02-25 20:33:47 +01:00
parent 236932d452
commit 11b1357c52
9 changed files with 768 additions and 557 deletions

View File

@@ -8,7 +8,95 @@
*/
?>
<div class="row">
<div class="row" id="netop-<?=$netoperator->id?>-<?=$product->id?>">
<?php
$current_price = $product->getCurrentPrice($today_date, true);
$current_regular_price = $product->getCurrentRegularPrice($today_date, true);
$first_price = $product->getFirstPrice($today_date);
?>
<div class="col-7">
<div class="row">
<div class="col">
<h4>Aktuelle Preise für <?=$product->getTodayDate()?></h4>
<table class="table">
<tr>
<th></th>
<th>INET</th>
<th>INET+TV</th>
<th>CATV</th>
<th>Passive</th>
<th></th>
</tr>
<tr>
<th>Heute gültiger Preis</th>
<td class="text-monospace">€ <?=number_format($current_price->price_inet, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_price->price_inet_tv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_price->price_catv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_price->price_passive, 2, ",", ".")?></td>
<td>
<?=$current_price->description?>
<?php if($current_price->end_date): ?>
bis <?=(new DateTime($current_price->end_date))->format("d.m.Y")?>
<?php endif; ?>
</td>
</tr><tr>
<th>Derzeit regulärer Preis</th>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_inet, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_inet_tv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_catv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_passive, 2, ",", ".")?></td>
<td><?=$current_regular_price->description?></td>
</tr><tr>
<td>Initialpreis</td>
<td class="text-monospace">€ <?=number_format($first_price->price_inet, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($first_price->price_inet_tv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($first_price->price_catv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($first_price->price_passive, 2, ",", ".")?></td>
<td></td>
</tr>
</table>
</div>
</div>
<div class="row">
<div class="col">
<h4>Preise Netzdurchdringung</h4>
<h5>Heute gültige Preise</h5>
Gültig von: <?=($current_price->start_date) ? (new DateTime($current_price->start_date))->format("d.m.Y") : ""?><br />
Gültig bis: <?=($current_price->end_date) ? (new DateTime($current_price->end_date))->format("d.m.Y") : ""?>
<table class="table table-sm table-striped table-hover">
<tr>
<th>Gruppe</th>
<th>INET</th>
<th>INET+TV</th>
<th>CATV</th>
<th>Passive</th>
</tr>
<tr>
<td>0 - 15%</td>
<td><?=$current_price->price_inet?></td>
<td><?=$current_price->price_inet_tv?></td>
<td><?=$current_price->price_catv?></td>
<td><?=$current_price->price_passive?></td>
</tr>
<?php foreach($current_price->marketsharediscounts as $bracket => $discount): ?>
<tr>
<td><?=$bracket?>% - <?=($bracket+5)?>%</td>
<td><?=$discount->price_inet?></td>
<td><?=$discount->price_inet_tv?></td>
<td><?=$discount->price_catv?></td>
<td><?=$discount->price_passive?></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
<div class="col-5">
<form method="post" action="<?=self::getUrl("PreorderProduct", "save")?>">
@@ -39,7 +127,7 @@
<td class="text-monospace"><?=($line->end_date) ? (new DateTime($line->end_date))->format("d.m.Y") : "-"?></td>
<td><?=(is_array($line->campaigns) && count($line->campaigns)) ? count($line->campaigns) : ""?></td>
<td><?=$line->description?></td>
<td><?=$line->creator->name?></td>
<td title="Erstellt <?=date("d.m.Y", $line->create)?>"><?=$line->creator->name?></td>
</tr>
<?php endforeach; ?>
</table>
@@ -213,97 +301,6 @@
</div>
</form>
</div>
<?php
$current_price = $product->getCurrentPrice($today_date, true);
$current_regular_price = $product->getCurrentRegularPrice($today_date, true);
$first_price = $product->getFirstPrice($today_date);
?>
<div class="col">
<div class="row">
<div class="col">
<h4>Aktuelle Preise für <?=$product->getTodayDate()?></h4>
<table class="table">
<tr>
<th></th>
<th>INET</th>
<th>INET+TV</th>
<th>CATV</th>
<th>Passive</th>
<th></th>
</tr>
<tr>
<th>Heute gültiger Preis</th>
<td class="text-monospace">€ <?=number_format($current_price->price_inet, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_price->price_inet_tv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_price->price_catv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_price->price_passive, 2, ",", ".")?></td>
<td>
<?=$current_price->description?>
<?php if($current_price->end_date): ?>
bis <?=(new DateTime($current_price->end_date))->format("d.m.Y")?>
<?php endif; ?>
</td>
</tr><tr>
<th>Derzeit regulärer Preis</th>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_inet, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_inet_tv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_catv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($current_regular_price->price_passive, 2, ",", ".")?></td>
<td><?=$current_regular_price->description?></td>
</tr><tr>
<td>Initialpreis</td>
<td class="text-monospace">€ <?=number_format($first_price->price_inet, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($first_price->price_inet_tv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($first_price->price_catv, 2, ",", ".")?></td>
<td class="text-monospace">€ <?=number_format($first_price->price_passive, 2, ",", ".")?></td>
<td></td>
</tr>
</table>
</div>
</div>
<div class="row">
<div class="col">
<h4>Preise Netzdurchdringung</h4>
<h5>Heute gültige Preise</h5>
Gültig von: <?=($current_price->start_date) ? (new DateTime($current_price->start_date))->format("d.m.Y") : ""?><br />
Gültig bis: <?=($current_price->end_date) ? (new DateTime($current_price->end_date))->format("d.m.Y") : ""?>
<table class="table table-sm table-striped table-hover">
<tr>
<th>Gruppe</th>
<th>INET</th>
<th>INET+TV</th>
<th>CATV</th>
<th>Passive</th>
</tr>
<tr>
<td>0 - 15%</td>
<td><?=$current_price->price_inet?></td>
<td><?=$current_price->price_inet_tv?></td>
<td><?=$current_price->price_catv?></td>
<td><?=$current_price->price_passive?></td>
</tr>
<?php foreach($current_price->marketsharediscounts as $bracket => $discount): ?>
<tr>
<td><?=$bracket?>% - <?=($bracket+5)?>%</td>
<td><?=$discount->price_inet?></td>
<td><?=$discount->price_inet_tv?></td>
<td><?=$discount->price_catv?></td>
<td><?=$discount->price_passive?></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</div>
</div>
</div>