mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Split the quick consume and open amount product option (closes #2127)
This commit is contained in:
@@ -251,7 +251,7 @@ END;
|
||||
CREATE TRIGGER cascade_change_qu_id_stock2 AFTER UPDATE ON products WHEN NEW.qu_id_stock != OLD.qu_id_stock
|
||||
BEGIN
|
||||
-- See also the trigger "cascade_change_qu_id_stock BEFORE UPDATE ON products"
|
||||
-- This here applies the needed changes to the products table itself only AFTER the udpate
|
||||
-- This here applies the needed changes to the products table itself only AFTER the update
|
||||
|
||||
UPDATE products
|
||||
SET quick_consume_amount = quick_consume_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),
|
||||
|
Reference in New Issue
Block a user