diff --git a/db/routines/vn/procedures/itemShelving_add.sql b/db/routines/vn/procedures/itemShelving_add.sql index dee96f43c..09a3e5bb6 100644 --- a/db/routines/vn/procedures/itemShelving_add.sql +++ b/db/routines/vn/procedures/itemShelving_add.sql @@ -55,8 +55,7 @@ BEGIN vQuantity, IFNULL(vGrouping, b.grouping), IFNULL(vPacking, b.packing), - IFNULL(vPackagingFk, b.packagingFk), - vQuantity + IFNULL(vPackagingFk, b.packagingFk) FROM item i LEFT JOIN cache.last_buy lb ON i.id = lb.item_id AND lb.warehouse_id = vWarehouseFk LEFT JOIN buy b ON b.id = lb.buy_id