83 lines
3.6 KiB
PHP
83 lines
3.6 KiB
PHP
<div class="row">
|
|
<div class="col-6">
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
Derzeit gültiger Preis: <strong><?=$product->current_price->price_setup?></strong>
|
|
<?php if($product->current_price->end_date): ?>
|
|
(bis <?=(new DateTime($product->current_price->end_date))->format("d.m.Y")?>)
|
|
<?php endif; ?>
|
|
<br />
|
|
Derzeit regulärer Preis: <strong><?=$product->current_regular_price->price_setup?></strong><br />
|
|
Originalpreis: <?=$product->first_price->price_setup?>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<button type="button" class="btn btn-outline-success" onclick='$("#pricehistory-<?=$netoperator->id?>-<?=$product->id?>").toggle()'><i class="fas fa-fw fa-list"></i> Preishistory anzeigen</button>
|
|
</div>
|
|
|
|
<div class="row hidden" id="pricehistory-<?=$netoperator->id?>-<?=$product->id?>">
|
|
<table class="table table-sm table-striped table-hover">
|
|
<tr>
|
|
<th>Preis</th>
|
|
<th>Gültig von</th>
|
|
<th>Gültig bis</th>
|
|
|
|
</tr>
|
|
<?php foreach(PreorderProductPrice::search(["netowner_id" => $netowner->id,"preorderproduct_id" => $product->id, "netoperator_id" => $netoperator->id]) as $line): ?>
|
|
<tr>
|
|
<td><?=$line->price_setup?></td>
|
|
<td><?=($line->start_date) ? (new DateTime($line->start_date))->format("d.m.Y") : "-"?></td>
|
|
<td><?=($line->end_date) ? (new DateTime($line->end_date))->format("d.m.Y") : "-"?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<h4>Neuer Preis</h4>
|
|
<div class="form-group">
|
|
<label>Bereitstellungsentgelt</label>
|
|
<div class="input-group mb-3">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">€</span>
|
|
</div>
|
|
<input type="text" class="form-control" name="netoperators[<?=$netoperator->id?>][<?=$product->id?>][price_setup]" value="" />
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Neuer Preis Gültigkeit</label>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<div class="input-group mb-3">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">Preis gültig von</span>
|
|
</div>
|
|
<input type="text" class="form-control datepicker" name="netoperators[<?=$netoperator->id?>][<?=$product->id?>][start_date]" value="" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
<div class="input-group mb-3">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text">Preis gültig bis</span>
|
|
</div>
|
|
<input type="text" class="form-control datepicker" name="netoperators[<?=$netoperator->id?>][<?=$product->id?>][end_date]" value="" />
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<small>
|
|
Ohne <strong>Gültig-Bis-Datum</strong> gilt der neue Preis für immer, bis ein neuer Preis eingetragen wird.<br />
|
|
Mit <strong>Gültig-Bis-Datum</strong> gilt der neue Preis bis einschließlich dem <strong>Gültig-Bis-Datum</strong>, danach gilt der vorige Preis wieder.
|
|
</small>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|