This commit is contained in:
@@ -2,18 +2,21 @@
|
||||
|
||||
require('../config.php');
|
||||
require('../EpiApi.php');
|
||||
use chillerlan\QRCode\{QRCode, QROptions};
|
||||
|
||||
use chillerlan\QRCode\{
|
||||
QRCode,
|
||||
QROptions
|
||||
};
|
||||
|
||||
require('../vendor/autoload.php');
|
||||
|
||||
$options = new QROptions([
|
||||
'imageBase64' => false,
|
||||
|
||||
'qrCodeHeight' => 75,
|
||||
'qrCodeWidth' => 75,
|
||||
'version' =>-1,
|
||||
'quietzoneSize' => 1
|
||||
|
||||
]);
|
||||
'imageBase64' => false,
|
||||
'qrCodeHeight' => 75,
|
||||
'qrCodeWidth' => 75,
|
||||
'version' => -1,
|
||||
'quietzoneSize' => 1
|
||||
]);
|
||||
|
||||
|
||||
$Epi = new Epirent();
|
||||
@@ -25,32 +28,63 @@ $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>";
|
||||
|
||||
if ($packingjob->is_archived != true) {
|
||||
|
||||
//get OrderDetails
|
||||
$result = $Epi->requestEpiApi('/v1/order/' . $packingjob->order_pk . '?cl=' . Epirent_Mandant);
|
||||
|
||||
$orderdetail_output = json_decode($result)->payload[0];
|
||||
|
||||
$NachbereitungsTimeDetail;
|
||||
|
||||
foreach ($orderdetail_output->order_schedule as $scheduledetail) {
|
||||
|
||||
if ($scheduledetail->name == Rueckpacken_Zeitvariable) {
|
||||
$NachbereitungsTimeDetail = $scheduledetail;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//End Of get Order Details
|
||||
|
||||
if (CheckIn_UseDispoEndForRowMarking || ($NachbereitungsTimeDetail->date_start==null)) {
|
||||
$date = new DateTime($packingjob->date_end);
|
||||
} else {
|
||||
$date = new DateTime($NachbereitungsTimeDetail->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_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>";
|
||||
if ($NachbereitungsTimeDetail->date_start != null) {
|
||||
echo "<td><small>" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . "</small><br><i>" . date_format(new \DateTime($NachbereitungsTimeDetail->date_start), 'd.m.Y') . " " . getTimeFromSeconds($NachbereitungsTimeDetail->time_start) . "</i></td>";
|
||||
} else {
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . "</td>";
|
||||
}
|
||||
if ($NachbereitungsTimeDetail->date_end != null) {
|
||||
echo "<td><small>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</small><br><i>" . date_format(new \DateTime($NachbereitungsTimeDetail->date_end), 'd.m.Y') . " " . getTimeFromSeconds($NachbereitungsTimeDetail->time_end) . "</i></td>";
|
||||
} else {
|
||||
echo "<td>" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . "</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user