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) {
//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 "
";
} else if ($date < $today) {
echo "
";
} else {
echo "
";
}
if (Enable_QR_Code_CheckIn) {
echo "| " . ' ' . (new QRCode($options))->render($packingjob->packingnote_no) . " | ";
} else {
echo "" . $packingjob->packingnote_no . " | ";
}
echo "" . $packingjob->contact->name . " | ";
echo "" . $packingjob->event . " | ";
if ($NachbereitungsTimeDetail->date_start != null) {
echo "" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . " " . date_format(new \DateTime($NachbereitungsTimeDetail->date_start), 'd.m.Y') . " " . getTimeFromSeconds($NachbereitungsTimeDetail->time_start) . " | ";
} else {
echo "" . date_format(new \DateTime($packingjob->date_start), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_start) . " | ";
}
if ($NachbereitungsTimeDetail->date_end != null) {
echo "" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . " " . date_format(new \DateTime($NachbereitungsTimeDetail->date_end), 'd.m.Y') . " " . getTimeFromSeconds($NachbereitungsTimeDetail->time_end) . " | ";
} else {
echo "" . date_format(new \DateTime($packingjob->date_end), 'd.m.Y') . " " . getTimeFromSeconds($packingjob->time_end) . " | ";
}
echo "
";
}
}
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;
}
?>