fixed unpacking not supported in php 7
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user