From 18b91cc4a59b8c75e9c2884605aac9dd6cf9a4d1 Mon Sep 17 00:00:00 2001 From: Leopold Strobl Date: Fri, 23 Jan 2026 17:52:12 +0100 Subject: [PATCH] Minor Bugfixes: Labelprint only shows Rental only articles. Insurance does not show "sorted out" articles --- dist/insurance.php | 2 ++ dist/labelprint.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dist/insurance.php b/dist/insurance.php index a76a912..a9a3fc4 100644 --- a/dist/insurance.php +++ b/dist/insurance.php @@ -77,6 +77,7 @@ foreach ($filteredProductArray as $filteredProduct) { $deviceStockObjectArray = json_decode($stockRes)->payload ?? []; foreach ($deviceStockObjectArray as $device) { + if(!$device->is_sorted_out){ $rows[] = [ 'pk' => $insuredProduct->product_no, 'name' => $insuredProduct->name, @@ -88,6 +89,7 @@ foreach ($filteredProductArray as $filteredProduct) { 'purchase_price'=> (float)($device->purchase_price ?? 0.0), 'owner' => (string)($device->owner ?? ''), ]; + } } } diff --git a/dist/labelprint.php b/dist/labelprint.php index dae5438..d5bf09e 100644 --- a/dist/labelprint.php +++ b/dist/labelprint.php @@ -6,7 +6,7 @@ require_once __DIR__ . '/../vendor/autoload.php'; date_default_timezone_set('Europe/Berlin'); $Epi = new Epirent(); -$productList = json_decode($Epi->requestEpiApi('/v1/product/all?cl=' . Epirent_Mandant))->payload; +$productList = json_decode($Epi->requestEpiApi('/v1/product/all?ia=true&ir=true&cl=' . Epirent_Mandant))->payload; ?> @@ -85,6 +85,9 @@ $productList = json_decode($Epi->requestEpiApi('/v1/product/all?cl=' . Epirent_M is_rent & $product->is_sale){ + continue; + } echo ""; echo "" . htmlspecialchars($product->primary_key) . ""; echo "" . htmlspecialchars($product->product_no) . "";