From a914cab03578bafe3fb4069e8e56d7639e662a81 Mon Sep 17 00:00:00 2001 From: Leopold Strobl Date: Mon, 29 Jun 2026 10:09:28 +0200 Subject: [PATCH] Versicherung greift jetzt schon auf den Versicherungswert der Artikelliste zu -> Deutlich performanter --- dist/insurance.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/insurance.php b/dist/insurance.php index 4d4b680..072b127 100644 --- a/dist/insurance.php +++ b/dist/insurance.php @@ -30,7 +30,7 @@ $productList = json_decode($result)->payload; $filteredProductArray = []; foreach ($productList as $product) { if ($product->is_stock_control && $product->is_stock_single_entry && !$product->is_virtual) { - if (!empty($product->stock_data[0]->stock_rent) && $product->stock_data[0]->stock_rent > 0) { + if (!empty($product->stock_data[0]->stock_rent) && $product->stock_data[0]->stock_rent > 0 && !empty($product->pricing) && $product->pricing->insurance_net!=0) { $filteredProductArray[] = $product; } } @@ -41,13 +41,13 @@ foreach ($filteredProductArray as $filteredProduct) { $detailRes = $Epi->requestEpiApi('/v1/product/' . $filteredProduct->primary_key . '?cl=' . Epirent_Mandant); $insuredProduct = json_decode($detailRes)->payload[0] ?? null; - if (!$insuredProduct || empty($insuredProduct->pricing) || !isset($insuredProduct->pricing->insurance_net)) { + /* if (!$insuredProduct || empty($insuredProduct->pricing) || !isset($insuredProduct->pricing->insurance_net)) { continue; } if ((float)$insuredProduct->pricing->insurance_net == 0.0) { continue; } - +*/ // Materials $MaterialList = ""; if (!empty($insuredProduct->materials)) {