mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Handle edited stock entries in GetProductPriceHistory (fixes #913)
This commit is contained in:
@@ -182,7 +182,7 @@ class StockService extends BaseService
|
||||
|
||||
$returnData = array();
|
||||
$shoppingLocations = $this->getDatabase()->shopping_locations();
|
||||
$rows = $this->getDatabase()->stock_log()->where('product_id = :1 AND transaction_type IN (:2, :3) AND undone = 0', $productId, self::TRANSACTION_TYPE_PURCHASE, self::TRANSACTION_TYPE_INVENTORY_CORRECTION)->whereNOT('price', null)->orderBy('purchased_date', 'DESC');
|
||||
$rows = $this->getDatabase()->product_price_history()->where('product_id = :1', $productId)->orderBy('purchased_date', 'DESC');
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$returnData[] = array(
|
||||
|
Reference in New Issue
Block a user