mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Fixed qu_id_stock change handling related to product_barcode amounts (fixes #1976)
This commit is contained in:
@@ -29,11 +29,6 @@ BEGIN
|
||||
WHERE type = 'product'
|
||||
AND product_id = NEW.id;
|
||||
|
||||
UPDATE product_barcodes
|
||||
SET amount = amount * IFNULL((SELECT factor FROM quantity_unit_conversions_resolved WHERE product_id = NEW.id AND from_qu_id = OLD.qu_id_stock AND to_qu_id = NEW.qu_id_stock LIMIT 1), 1.0)
|
||||
WHERE product_id = NEW.id
|
||||
AND amount IS NOT NULL;
|
||||
|
||||
UPDATE recipes_pos
|
||||
SET amount = amount * IFNULL((SELECT factor FROM quantity_unit_conversions_resolved WHERE product_id = NEW.id AND from_qu_id = OLD.qu_id_stock AND to_qu_id = NEW.qu_id_stock LIMIT 1), 1.0)
|
||||
WHERE product_id = NEW.id;
|
||||
|
Reference in New Issue
Block a user