diff --git a/dist/insurance.php b/dist/insurance.php index a9a3fc4..6e96aaa 100644 --- a/dist/insurance.php +++ b/dist/insurance.php @@ -76,7 +76,12 @@ foreach ($filteredProductArray as $filteredProduct) { $stockRes = $Epi->requestEpiApi('/v1/stock/filter?ppk=' . $insuredProduct->primary_key . '&cl=' . Epirent_Mandant); $deviceStockObjectArray = json_decode($stockRes)->payload ?? []; + //Sortiere alle Geräte aus die "Nicht Versichert" im Status stehen haben foreach ($deviceStockObjectArray as $device) { + if($device->condition=="Nicht Versichert"){ + continue; + } + //Sortiere jetzt die Geräte aus, die Nicht aussortiert wurden if(!$device->is_sorted_out){ $rows[] = [ 'pk' => $insuredProduct->product_no,