If-Schleife zum Finden von offenen Aufträgen robuster gestaltet
This commit is contained in:
@@ -71,6 +71,7 @@ function rowClassForDate(?DateTimeImmutable $markDate, ?DateTimeImmutable $today
|
||||
|
||||
if (UseDeliveredForCheckOutCompleted) {
|
||||
$result = $Epi->requestEpiApi('/v1/packingnote/open?isco=False&cl=' . Epirent_Mandant);
|
||||
|
||||
} else {
|
||||
$result = $Epi->requestEpiApi('/v1/packingnote/open?isci=False&cl=' . Epirent_Mandant);
|
||||
}
|
||||
@@ -107,15 +108,17 @@ foreach ($data_output as $packingjob) {
|
||||
if ($packingjob->is_archived != true && UseDeliveredForCheckOutCompleted) {
|
||||
$PackingNoteDetailResult = $Epi->requestEpiApi('/v1/packingnote/' . $packingjob->primary_key . '?cl=' . Epirent_Mandant);
|
||||
$PackingNoteDetail = json_decode($PackingNoteDetailResult)->payload[0];
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (
|
||||
$packingjob->is_archived != true
|
||||
if (
|
||||
($packingjob->is_archived ?? false) != true
|
||||
&& (
|
||||
!UseDeliveredForCheckOutCompleted
|
||||
|| ($PackingNoteDetail->date_delivered !== "0000-00-00" || (int)$PackingNoteDetail->time_delivered !== 0)
|
||||
((int)($PackingNoteDetail->is_all_out ?? 0)) !== 0
|
||||
|| (($PackingNoteDetail->date_delivered ?? "0000-00-00") === "0000-00-00"
|
||||
|| (int)($PackingNoteDetail->time_delivered ?? 0) === 0)
|
||||
)
|
||||
&& (int)$PackingNoteDetail->is_all_out !== 0
|
||||
) {
|
||||
//get OrderDetails
|
||||
$result = $Epi->requestEpiApi('/v1/order/' . $packingjob->order_pk . '?cl=' . Epirent_Mandant);
|
||||
|
||||
Reference in New Issue
Block a user