Added Feature to allow device-status as "Insured"
This commit is contained in:
5
dist/insurance.php
vendored
5
dist/insurance.php
vendored
@@ -76,7 +76,12 @@ foreach ($filteredProductArray as $filteredProduct) {
|
|||||||
$stockRes = $Epi->requestEpiApi('/v1/stock/filter?ppk=' . $insuredProduct->primary_key . '&cl=' . Epirent_Mandant);
|
$stockRes = $Epi->requestEpiApi('/v1/stock/filter?ppk=' . $insuredProduct->primary_key . '&cl=' . Epirent_Mandant);
|
||||||
$deviceStockObjectArray = json_decode($stockRes)->payload ?? [];
|
$deviceStockObjectArray = json_decode($stockRes)->payload ?? [];
|
||||||
|
|
||||||
|
//Sortiere alle Geräte aus die "Nicht Versichert" im Status stehen haben
|
||||||
foreach ($deviceStockObjectArray as $device) {
|
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){
|
if(!$device->is_sorted_out){
|
||||||
$rows[] = [
|
$rows[] = [
|
||||||
'pk' => $insuredProduct->product_no,
|
'pk' => $insuredProduct->product_no,
|
||||||
|
|||||||
Reference in New Issue
Block a user