fixed unpacking not supported in php 7

This commit is contained in:
Luca Haid
2025-04-23 10:57:15 +00:00
parent 00b29cf1d5
commit 2e32ff5d7b

View File

@@ -58,9 +58,8 @@ class WarehouseArticlePacketController extends TTCrud {
$calculatedSellPrice += $subItem->amount * $articlePrice;
}
}
WarehouseArticlePacketModel::update([...get_object_vars($packet), // Unpack properties into an array
'calculatedSellPrice' => $calculatedSellPrice]);
WarehouseArticlePacketModel::update(array_merge(get_object_vars($packet), ['calculatedSellPrice' => $calculatedSellPrice]));
}
return true;
@@ -93,4 +92,4 @@ class WarehouseArticlePacketController extends TTCrud {
self::returnJson($history);
}
}
}