diff --git a/db/routines/vn/procedures/itemShelving_addList.sql b/db/routines/vn/procedures/itemShelving_addList.sql index c07dd985c..130007de5 100644 --- a/db/routines/vn/procedures/itemShelving_addList.sql +++ b/db/routines/vn/procedures/itemShelving_addList.sql @@ -39,7 +39,7 @@ BEGIN UPDATE vn.itemShelving SET isChecked = vIsChecked WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk - AND itemFk = vItemFk; + AND itemFk = vItemFk AND isChecked IS NULL; SET vCounter = vCounter + 1; END WHILE; diff --git a/db/routines/vn/procedures/item_getSimilar.sql b/db/routines/vn/procedures/item_getSimilar.sql index 1da60cf70..6f275de86 100644 --- a/db/routines/vn/procedures/item_getSimilar.sql +++ b/db/routines/vn/procedures/item_getSimilar.sql @@ -65,7 +65,8 @@ BEGIN WHEN b.groupingMode = 'packing' THEN b.packing ELSE 1 END AS minQuantity, - iss.visible located + iss.visible located, + b.price2 FROM vn.item i JOIN cache.available a ON a.item_id = i.id AND a.calc_id = vCalcFk diff --git a/db/versions/10950-greenArborvitae/00-firstScript.sql b/db/versions/10950-greenArborvitae/00-firstScript.sql new file mode 100644 index 000000000..e8d4e31f2 --- /dev/null +++ b/db/versions/10950-greenArborvitae/00-firstScript.sql @@ -0,0 +1,3 @@ +-- Place your SQL code here +ALTER TABLE vn.packaging +MODIFY COLUMN volume decimal(10,2) CHECK (volume >= COALESCE(width, 1) * COALESCE(depth, 1) * COALESCE(height, 1));