소스 검색

Add the same amount on every storage point

DricomDragon 5 년 전
부모
커밋
f4bcfbadd2
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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';