Files
thetool/Layout/default/Order/ProductchangeForm.php
2024-07-30 20:01:29 +02:00

99 lines
4.4 KiB
PHP

<?php
$f = "o";
$hide_credit = true;
if($me->is("Admin")) {
$hide_credit = false;
}
?>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a>
</li>
<li class="breadcrumb-item"><a href="<?=self::getUrl("Order")?>">Bestellungen</a></li>
<li class="breadcrumb-item active">Produkt-/Standortwechsel</li>
</ol>
</div>
<h4 class="page-title">Aktives Produkt</h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<a href="<?=self::getUrl("Order")?>" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zu Bestellungen</a>
</div>
</div>
<div class="card border-top-success">
<div class="card-body">
<h3 class="text-center mb-3"><?=$contract->product_name?> (<?=$contract->id?>)</h3>
<table class="table table-sm table-striped view-table">
<tr>
<th style="max-width: 50vw;">Matchcode:</th>
<td style="width: 50vw;"><?=$contract->matchcode?></td>
</tr><tr>
<th>Vertragsinhaber:</th>
<td>
<a href="<?=self::getUrl("Address", "View", ["id" => $contract->owner->id])?>"><?=$contract->owner->getCompanyOrName()?>
(<?=$contract->owner->customer_number?>)
</a>
</td>
</tr><tr>
<th>Produkt:</th>
<td><?=$contract->product_name?> [<?=$contract->product_id?>
]<?=($contract->product_name != $contract->product->name) ? " <i>(" . $contract->product->name . ")</i>" : ""?></td>
</tr><tr>
<th>Produkt Info:</th>
<td><?=$contract->product_info?></td>
</tr><tr>
<th>Preis Netto:</th>
<td class="<?=($contract->price < 0) ? "text-danger" : ""?>">€ <?=number_format(($contract->amount != 1) ? $contract->price * $contract->amount : $contract->price, 4, ",", ".")?></td>
</tr><tr>
<th>Preis Brutto:</th>
<td class="<?=($contract->price < 0) ? "text-danger" : ""?>">€
<?php if($contract->price && $contract->vatrate): ?>
<?php if($contract->amount != 1): ?>
<?=number_format($contract->price + ($contract->price / 100) * $contract->vatrate, 4, ",", ".")?>
<?php else: ?>
<?=number_format(($contract->price + ($contract->price / 100) * $contract->vatrate) * $contract->amount, 4, ",", ".")?>
<?php endif; ?>
<?php endif; ?>
</td>
</tr><tr>
<th>Fertigstellungsdatum:</th>
<td><?=date("d.m.Y", $contract->finish_date)?></td>
</tr>
</table>
</div>
</div>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage")."/Contract/include/productchange-action.php"); ?>
<div class="card">
<div class="card-body">
<a href="<?=self::getUrl("Order")?>" class="btn btn-sm btn-secondary mr-1"><i class="fas fa-list"></i> Zurück zu Bestellungen</a>
</div>
</div>
</div>
</div>
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>