Files
EpiWebview/dist/groupofgoodscheck.php

128 lines
4.6 KiB
PHP

<?php
require('../config.php');
require('../EpiApi.php');
require_once __DIR__ . '/../vendor/autoload.php';
date_default_timezone_set('Europe/Berlin');
$Epi = new Epirent();
$productList = json_decode($Epi->requestEpiApi('/v1/product/all?ia=true&ir=true&cl=' . Epirent_Mandant))->payload;
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Imagecheck - EpiWebview</title>
<!-- Styles -->
<link href="css/styles.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
<!-- JS -->
<script src="js/jquery-3.5.1.min.js"></script>
<script src="https://kit.fontawesome.com/93d71de8bc.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js"></script>
<style>
.opacity-50 {
opacity: .5;
}
.card .h2,
.card .display-4 {
font-weight: 700;
}
.kpi-updated {
font-size: .82rem;
opacity: .85;
}
</style>
<script>
$(function() {
$('#layoutSidenav_nav').load('../sources/getSidenav.php');
$('#footerholder').load('../sources/getFooter.php');
});
</script>
</head>
<body class="sb-nav-fixed">
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
<a class="navbar-brand" href="index.php">Epi Webview</a>
<button class="btn btn-link btn-sm order-1 order-lg-0" id="sidebarToggle"><i class="fas fa-bars"></i></button>
</nav>
<div id="layoutSidenav">
<div id="layoutSidenav_nav"></div>
<div id="layoutSidenav_content">
<main>
<div class="container-fluid">
<h1 class="mt-4">Warengruppenprüfung</h1>
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
<div><i class="fas fa-table mr-1"></i> Zeigt welche Artikel keine Warengruppe haben</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="dataTable" class="table table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th>#</th>
<th>PN</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<?php
foreach ($productList as $product) {
if( count($product->group_of_goods) == 0 || $product->group_of_goods ==null){
echo "<tr>";
echo "<td>" . htmlspecialchars($product->primary_key) . "</td>";
echo "<td>" . htmlspecialchars($product->product_no) . "</td>";
echo "<td>" . htmlspecialchars($product->name) . "</td>";
echo "</tr>";
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</main>
<div id="footerholder"></div>
</div>
</div>
<!-- Bootstrap Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script>
$(document).ready(function() {
$('#dataTable').DataTable({
"pageLength": 25,
"language": {
"url": "//cdn.datatables.net/plug-ins/1.10.20/i18n/German.json"
}
});
});
</script>
</body>
</html>