Versicherung greift jetzt schon auf den Versicherungswert der Artikelliste zu -> Deutlich performanter
This commit is contained in:
Vendored
+3
-3
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user