This commit is contained in:
BIN
sources/.getOrders.php.swp
Normal file
BIN
sources/.getOrders.php.swp
Normal file
Binary file not shown.
48
sources/getAufgabenTable.php
Normal file
48
sources/getAufgabenTable.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
require('../config.php');
|
||||
|
||||
require('../CrewbrainApi.php');
|
||||
require('../vendor/autoload.php');
|
||||
$CrewBrain = new CrewBrain();
|
||||
|
||||
|
||||
$result = $Epi->requestEpiApi('/v1/packingnote/open?isco=False&cl=' . Epirent_Mandant);
|
||||
$result = $CrewBrain->requestCrewBrainApi('api/tasklist/5');
|
||||
$data_output = json_decode($result)->payload;
|
||||
|
||||
|
||||
foreach ($data_output as $packingjob) {
|
||||
|
||||
$date = new DateTime($packingjob->date_end);
|
||||
$date->setTime(0, 0, 0);
|
||||
$today = new DateTime();
|
||||
$today->setTime(0, 0, 0);
|
||||
if ($date == $today) {
|
||||
|
||||
echo "<tr class='text-dark bg-warning'>";
|
||||
} else if ($date < $today) {
|
||||
echo "<tr class=' bg-danger'>";
|
||||
} else {
|
||||
echo "<tr>";
|
||||
}
|
||||
echo "<td>" . $packingjob->primary_key . "</td>";
|
||||
echo "<td>" . $packingjob->contact->name . "</td>";
|
||||
echo "<td>" . $packingjob->event . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
function getTimeFromSeconds(string $timestring) {
|
||||
|
||||
$hours = floor($timestring / 3600);
|
||||
$mins = floor($timestring / 60 % 60);
|
||||
$secs = floor($timestring % 60);
|
||||
|
||||
$timeFormat = sprintf('%02d:%02d', $hours, $mins);
|
||||
|
||||
return $timeFormat;
|
||||
}
|
||||
|
||||
?>
|
||||
67
sources/getCheckInTable.php
Normal file
67
sources/getCheckInTable.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
require('../config.php');
|
||||
require('../EpiApi.php');
|
||||
use chillerlan\QRCode\{QRCode, QROptions};
|
||||
require('../vendor/autoload.php');
|
||||
|
||||
$options = new QROptions([
|
||||
'imageBase64' => false,
|
||||
|
||||
'qrCodeHeight' => 75,
|
||||
'qrCodeWidth' => 75,
|
||||
'version' =>-1,
|
||||
'quietzoneSize' => 1
|
||||
|
||||
]);
|
||||
|
||||
|
||||
$Epi = new Epirent();
|
||||
|
||||
|
||||
$result = $Epi->requestEpiApi('/v1/packingnote/open?isco=False&cl=' . Epirent_Mandant);
|
||||
|
||||
$data_output = json_decode($result)->payload;
|
||||
|
||||
|
||||
foreach ($data_output as $packingjob) {
|
||||
if($packingjob->is_archived != true){
|
||||
$date = new DateTime($packingjob->date_end);
|
||||
$date->setTime(0, 0, 0);
|
||||
$today = new DateTime();
|
||||
$today->setTime(0, 0, 0);
|
||||
if ($date == $today) {
|
||||
|
||||
echo "<tr class='text-dark bg-warning'>";
|
||||
} else if ($date < $today) {
|
||||
echo "<tr class=' bg-danger'>";
|
||||
} else {
|
||||
echo "<tr>";
|
||||
}
|
||||
if(Enable_QR_Code_CheckIn){
|
||||
echo "<td>" .'<div style="width: 5vb;">'.(new QRCode($options))->render($packingjob->packingnote_no)."</div></td>";
|
||||
}
|
||||
|
||||
else {
|
||||
echo "<td>" . $packingjob->packingnote_no ."</td>";
|
||||
}
|
||||
echo "<td>" . $packingjob->contact->name . "</td>";
|
||||
echo "<td>" . $packingjob->event . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
function getTimeFromSeconds(string $timestring) {
|
||||
|
||||
$hours = floor($timestring / 3600);
|
||||
$mins = floor($timestring / 60 % 60);
|
||||
$secs = floor($timestring % 60);
|
||||
|
||||
$timeFormat = sprintf('%02d:%02d', $hours, $mins);
|
||||
|
||||
return $timeFormat;
|
||||
}
|
||||
|
||||
?>
|
||||
73
sources/getCheckOutTable.php
Normal file
73
sources/getCheckOutTable.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
require('../config.php');
|
||||
require('../EpiApi.php');
|
||||
|
||||
use chillerlan\QRCode\{QRCode, QROptions};
|
||||
require('../vendor/autoload.php');
|
||||
|
||||
$options = new QROptions([
|
||||
'imageBase64' => false,
|
||||
|
||||
'qrCodeHeight' => 75,
|
||||
'qrCodeWidth' => 75,
|
||||
'version' =>-1,
|
||||
'quietzoneSize' => 1
|
||||
|
||||
]);
|
||||
|
||||
|
||||
$Epi = new Epirent();
|
||||
|
||||
|
||||
$result = $Epi->requestEpiApi('/v1/packingnote/open?isci=False&cl=' . Epirent_Mandant);
|
||||
|
||||
$data_output = json_decode($result)->payload;
|
||||
|
||||
|
||||
|
||||
|
||||
foreach ($data_output as $packingjob) {
|
||||
if($packingjob->is_archived != true){
|
||||
|
||||
$date = new DateTime($packingjob->date_start);
|
||||
$date->setTime(0, 0, 0);
|
||||
$today = new DateTime();
|
||||
$today->setTime(0, 0, 0);
|
||||
if ($date == $today) {
|
||||
|
||||
echo "<tr class='text-dark bg-warning'>";
|
||||
} else if ($date < $today) {
|
||||
echo "<tr class=' bg-danger'>";
|
||||
} else {
|
||||
echo "<tr>";
|
||||
}
|
||||
|
||||
if(Enable_QR_Code_CheckOut){
|
||||
echo "<td>" .'<div style="width: 5vb;">'.(new QRCode($options))->render($packingjob->packingnote_no)."</div></td>";
|
||||
}
|
||||
|
||||
else {
|
||||
echo "<td>" . $packingjob->packingnote_no ."</td>";
|
||||
}
|
||||
echo "<td>" . $packingjob->contact->name . "</td>";
|
||||
echo "<td>" . $packingjob->event . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</td>";
|
||||
echo "</tr>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getTimeFromSeconds(string $timestring) {
|
||||
|
||||
$hours = floor($timestring / 3600);
|
||||
$mins = floor($timestring / 60 % 60);
|
||||
$secs = floor($timestring % 60);
|
||||
|
||||
$timeFormat = sprintf('%02d:%02d', $hours, $mins);
|
||||
|
||||
return $timeFormat;
|
||||
}
|
||||
?>
|
||||
12
sources/getFooter.php
Normal file
12
sources/getFooter.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<footer class="py-4 bg-light mt-auto">
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex align-items-center justify-content-between small">
|
||||
<div class="text-muted">Copyright © VT-Media | Leopold Strobl</div>
|
||||
<div>
|
||||
<a href="#">Privacy Policy</a>
|
||||
·
|
||||
<a href="#">Terms & Conditions</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
78
sources/getOrderDetails.php
Normal file
78
sources/getOrderDetails.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Kunde</th>
|
||||
<th>Job</th>
|
||||
<th>Dispo-Start</th>
|
||||
<th>Dispo-Ende</th>
|
||||
<th>Summe Netto (Brutto)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Kunde</th>
|
||||
<th>Job</th>
|
||||
<th>Dispo-Start</th>
|
||||
<th>Dispo-Ende</th>
|
||||
<th>Summe Netto (Brutto)</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
require('../config.php');
|
||||
require('../EpiApi.php');
|
||||
require('../vendor/autoload.php');
|
||||
$Epi = new Epirent();
|
||||
|
||||
|
||||
$result = $Epi->requestEpiApi('/v1/order/filter?ir=True&ico=True&ia=False&icl=False&cl=' . Epirent_Mandant);
|
||||
|
||||
$data_output = json_decode($result)->payload;
|
||||
|
||||
|
||||
foreach ($data_output as $order) {
|
||||
|
||||
|
||||
echo "<a class='button btn' href='/order'>";
|
||||
if ($order->is_confirmed == 1) {
|
||||
if($order->order_state != null){
|
||||
if ($order->order_state->is_invoice == 1) {
|
||||
|
||||
echo "<tr class='bg-info' >";
|
||||
} else {
|
||||
echo "<tr class='bg-success clickable-row'>";
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo "<tr class='clickable-row'>";
|
||||
}
|
||||
} else {
|
||||
echo '<tr>';
|
||||
}
|
||||
echo "<td><a type='button' class='btn btn-secondary' href='../sources/getOrderDetails.php?OrderID=".$order->primary_key."'>" . $order->primary_key . "</a></td>";
|
||||
echo "<td>" . $order->contact->name . "</td>";
|
||||
echo "<td>" . $order->event . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($order->order_schedule[0]->date_start), 'd.m.Y') . " " . getTimeFromSeconds($order->order_schedule[0]->time_start) . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($order->order_schedule[0]->date_end), 'd.m.Y') . " " . getTimeFromSeconds($order->order_schedule[0]->time_end) . "</td>";
|
||||
echo "<td>" . $order->sum_net . " (" . $order->sum_gro . ")</td>";
|
||||
echo "</tr>";
|
||||
|
||||
}
|
||||
|
||||
function getTimeFromSeconds(string $timestring) {
|
||||
|
||||
$hours = floor($timestring / 3600);
|
||||
$mins = floor($timestring / 60 % 60);
|
||||
$secs = floor($timestring % 60);
|
||||
|
||||
$timeFormat = sprintf('%02d:%02d', $hours, $mins);
|
||||
|
||||
return $timeFormat;
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
78
sources/getOrders.php
Normal file
78
sources/getOrders.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Kunde</th>
|
||||
<th>Job</th>
|
||||
<th>Dispo-Start</th>
|
||||
<th>Dispo-Ende</th>
|
||||
<th>Summe Netto (Brutto)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Kunde</th>
|
||||
<th>Job</th>
|
||||
<th>Dispo-Start</th>
|
||||
<th>Dispo-Ende</th>
|
||||
<th>Summe Netto (Brutto)</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
require('../config.php');
|
||||
require('../EpiApi.php');
|
||||
require('../vendor/autoload.php');
|
||||
$Epi = new Epirent();
|
||||
|
||||
|
||||
$result = $Epi->requestEpiApi('/v1/order/filter?ir=True&ico=True&ia=False&icl=False&cl=' . Epirent_Mandant);
|
||||
|
||||
$data_output = json_decode($result)->payload;
|
||||
|
||||
|
||||
foreach ($data_output as $order) {
|
||||
|
||||
|
||||
echo "<a class='button btn' href='/order'>";
|
||||
if ($order->is_confirmed == 1) {
|
||||
if($order->order_state != null){
|
||||
if ($order->order_state->is_invoice == 1) {
|
||||
|
||||
echo "<tr class='bg-info' >";
|
||||
} else {
|
||||
echo "<tr class='bg-success clickable-row'>";
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo "<tr class='clickable-row'>";
|
||||
}
|
||||
} else {
|
||||
echo '<tr>';
|
||||
}
|
||||
echo "<td><a type='button' class='btn btn-secondary' href='orderdetails.php?OrderID=".$order->primary_key."'>" . $order->primary_key . "</a></td>";
|
||||
echo "<td>" . $order->contact->name . "</td>";
|
||||
echo "<td>" . $order->event . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($order->order_schedule[0]->date_start), 'd.m.Y') . " " . getTimeFromSeconds($order->order_schedule[0]->time_start) . "</td>";
|
||||
echo "<td>" . date_format(new \DateTime($order->order_schedule[0]->date_end), 'd.m.Y') . " " . getTimeFromSeconds($order->order_schedule[0]->time_end) . "</td>";
|
||||
echo "<td>" . $order->sum_net . " (" . $order->sum_gro . ")</td>";
|
||||
echo "</tr>";
|
||||
|
||||
}
|
||||
|
||||
function getTimeFromSeconds(string $timestring) {
|
||||
|
||||
$hours = floor($timestring / 3600);
|
||||
$mins = floor($timestring / 60 % 60);
|
||||
$secs = floor($timestring % 60);
|
||||
|
||||
$timeFormat = sprintf('%02d:%02d', $hours, $mins);
|
||||
|
||||
return $timeFormat;
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
29
sources/getSidenav.php
Normal file
29
sources/getSidenav.php
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
<nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
|
||||
<div class="sb-sidenav-menu">
|
||||
<div class="nav">
|
||||
<div class="sb-sidenav-menu-heading">Core</div>
|
||||
<a class="nav-link" href="index.php">
|
||||
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
|
||||
Dashboard
|
||||
</a>
|
||||
<a class="nav-link" href=orders.php>
|
||||
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
|
||||
Aufträge
|
||||
</a>
|
||||
|
||||
<div class="sb-sidenav-menu-heading">Addons</div>
|
||||
<a class="nav-link" target="_blank" href="../Packmonitor.php">
|
||||
<div class="sb-nav-link-icon"><i class="fas fa-box-open"></i></div>
|
||||
Packmonitor
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sb-sidenav-footer">
|
||||
<div class="small">Zuletzt aktualisiert:</div>
|
||||
<?php
|
||||
echo date("d.m.Y - H:i:s", time());
|
||||
?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user