Files
thetool/Layout/default/Admin/ivtimport_product_match.php
Frank Schubert 8214acd3e9 Added Voiceplan, Admin IVT product matcher and Voicenumber update
updates number in ContractConfig
2023-05-04 15:01:28 +02:00

65 lines
2.2 KiB
PHP

<?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="javascript: void(0);"><?=MFAPPNAME_SLUG?></a></li>
<li class="breadcrumb-item active"><a href="<?=self::getUrl("Admin")?>">Admin</a></li>
<li class="breadcrumb-item active">IVT Product Match</li>
</ol>
</div>
<h4 class="page-title">IVT Product Match</h4>
</div>
</div>
</div>
<!-- end page title -->
<div class="row">
<div class="col-12">
<table class="table table-sm table-striped table-hover">
<tr>
<th class="text-right">IVT Produkt</th>
<th>Preis</th>
<th>Interval</th>
<th>Typ</th>
<th style="border-left: 1px solid #000">thetool Produkt</th>
</tr>
<?php foreach($ivtproducts as $ip): ?>
<tr>
<td class="text-right"><?=$ip->name?></td>
<td><?=$ip->price?></td>
<td><?=$ip->interval?></td>
<td><?=$ip->typ?></td>
<td style="border-left: 1px solid #000">
<select class="form-control" name="product[<?=$ip->id?>]" id="product_<?=$ip->id?>">
<option></option>
</select>
</td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
<script type="text/javascript">
var products = [
<?php foreach(ProductModel::getActive() as $product): ?>
{id: <?=$product->id?>, name: '<?=$product->name?>'},
<?php endforeach; ?>
];
var new_options = "";
products.forEach(function(product) {
new_options += '<option value=' + product.id + '>' + product.name +'</option>';
});
$("select[name^=product").append(new_options);
$("select[name^=product").select2({placeholder: ""});
</script>
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>