mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Fixed handling of edited stock entries when calculating a product's average price (references #2292)
This commit is contained in:
@@ -31,6 +31,7 @@ FROM products_last_purchased;
|
||||
|
||||
CREATE TRIGGER stock_log_INS AFTER INSERT ON stock_log
|
||||
BEGIN
|
||||
-- Update products_average_price cache
|
||||
INSERT OR REPLACE INTO cache__products_average_price
|
||||
(product_id, price)
|
||||
SELECT product_id, price
|
||||
|
Reference in New Issue
Block a user