IVT Contract Import WIP
This commit is contained in:
@@ -120,7 +120,7 @@
|
||||
<td colspan="2"><h4>Zusatzdaten</h4></td>
|
||||
</tr><tr>
|
||||
<th>RTR Code</th>
|
||||
<td><?=$address->attributes['rtrcode']->value?></td>
|
||||
<td><?=(is_array($address->attributes) && array_key_exists("rtrcode", $address->attributes)) ? $address->attributes['rtrcode']->value : ""?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
<?php if(is_array($address->contracts) && count($address->contracts)): ?>
|
||||
<ul class="list-group list-group-flush">
|
||||
<?php foreach($address->contracts as $contract): ?>
|
||||
<li class="list-group-item"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->product_name?> [<?=$contract->matchcode?>]</a> <span class='text-secondary'><?=($contract->finish_date) ? "Fertigstellung: ".date('d.m.Y', $contract->finish_date) : "in Herstellung"?></span></li>
|
||||
<li class="list-group-item"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->product_name?> <?=($contract->matchcode) ? "[".$contract->matchcode."]" : ""?></a> <span class='text-secondary'><?=($contract->finish_date) ? "Fertigstellung: ".date('d.m.Y', $contract->finish_date) : "in Herstellung"?></span></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -45,5 +45,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-xl-10">
|
||||
<h5>IVT Contract Import</h5>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row col-12">
|
||||
<div><a href="<?=self::getUrl("Admin", "ivtAdminImport")?>" class="text-danger">IVT Contracts importieren</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
79
Layout/default/Admin/IvtAdminImport.php
Normal file
79
Layout/default/Admin/IvtAdminImport.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
<link href="<?= self::getResourcePath() ?>assets/css/datatables-std.css?<?= date('U') ?>" rel="stylesheet"
|
||||
type="text/css"/>
|
||||
<!-- 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("Admin")?>">Admin</a></li>
|
||||
<li class="breadcrumb-item active">IVT Contract Import</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">IVT Import</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
|
||||
<div class="card border-top-primary">
|
||||
<div class="card-body">
|
||||
|
||||
<table id="datatable" class="table table-sm table-striped table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Kunde</th>
|
||||
<th>IVT Produkt</th>
|
||||
<th>Produkt</th>
|
||||
<th>Preis Setup</th>
|
||||
<th>Preis</th>
|
||||
<th>Rech. Interval</th>
|
||||
<th>Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($data['contracts'] as $d): ?>
|
||||
<tr>
|
||||
<td><?=$d["customer"]->getCompanyOrName()?></td>
|
||||
<td><?=$d["ivtproduct"]->name?></td>
|
||||
<td><?=$d["product"]->name?></td>
|
||||
<td><?=$d["contract"]->price_setup?></td>
|
||||
<td><?=$d["contract"]->price?></td>
|
||||
<td>
|
||||
<?=$d["contract"]->billing_period?> (<?=($d["contract"]->billing_period == 1) ? "Monatlich" : ""?><?=($d["contract"]->billing_period == 12) ? "Jährlich" : ""?><?=($d["contract"]->billing_period == 24) ? "Zweijährlich" : ""?><?=($d["contract"]->billing_period == 36) ? "Dreijährlich" : ""?>)
|
||||
</td>
|
||||
<td><?=$d["action"]?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<a href="<?=self::getUrl("Admin", "ivtAdminImport", ["doit" => 1])?>"><button class="btn btn-primary" id="doitbutton"><i class="far fa-fw fa-exclamation-circle"></i> Jetzt importieren</button></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?= self::getResourcePath() ?>assets/js/datatables-std.js?<?= date('U') ?>"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#doitbutton").click(function() {
|
||||
$("#doitbutton").text("Bitte warten...");
|
||||
$("#doitbutton").prop("disabled", true);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -139,8 +139,8 @@
|
||||
<td class="text-monospace"><?=date('d.m.Y H:i', $contract->create)?><br /><?=$contract->creator->name?></td>
|
||||
<td class="text-monospace"><?=date('d.m.Y H:i', $contract->edit)?><br /><?=$contract->editor->name?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Contract", "view", ["contract_id" => $contract->id, "s" => $s, "filter" => $filter])?>"><i class="far fa-eyes" title="Aktives Produkt anzeigen"></i></a>
|
||||
<a href="<?=self::getUrl("Contract", "edit", ["contract_id" => $contract->id, "s" => $s, "filter" => $filter])?>"><i class="far fa-edit" title="Aktives Produkt bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Contract", "view", ["contract_id" => $contract->id])?>"><i class="far fa-eyes" title="Aktives Produkt anzeigen"></i></a>
|
||||
<a href="<?=self::getUrl("Contract", "edit", ["contract_id" => $contract->id])?>"><i class="far fa-edit" title="Aktives Produkt bearbeiten"></i></a>
|
||||
<?php if($contract->orderproduct_id): ?><a href="<?=self::getUrl("Order", "edit", ["id" => $contract->orderproduct->order_id])?>" target="_blank"><i class="far fa-file-signature" title="Bestellung anzeigen"></i></a><?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -259,6 +259,8 @@
|
||||
<td style="width: 100%">
|
||||
<?php if($j->value == "manual"): ?>
|
||||
<em>Vertrag manuell angelegt</em>
|
||||
<?php elseif($j->value == "import"): ?>
|
||||
<em>Vertrag importiert: <?=nl2br(htmlentities($j->text))?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user