Explorar o código

Add the same amount on every storage point

DricomDragon %!s(int64=5) %!d(string=hai) anos
pai
achega
f4bcfbadd2
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      SQL/plpgsql/create_supply_every_stock.sql

+ 2 - 0
SQL/plpgsql/create_supply_every_stock.sql

@@ -13,6 +13,8 @@ BEGIN
         EXIT WHEN stoQuantity IS NULL;
 
         RAISE NOTICE 'Supply %', amount;
+
+        UPDATE Stock SET sto_quantity = sto_quantity + amount WHERE CURRENT OF stoCursor;
     END LOOP;
     CLOSE stoCursor;
     RAISE NOTICE 'End';