USE \\athlon64\d\belcar\baze\nivstav ALIAS nivstav SHARED IN 0
USE \\athlon64\d\belcar\baze\zalihe ALIAS zalihe SHARED IN 0
SELECT zalihe
SET ORDER TO tag sifra
GOTO top
SELECT nivstav
GOTO top
DO WHILE !EOF()
a=nivstav.sifrob
mkol=0
SELECT zalihe
GOTO top
SEEK a
IF FOUND()
	mkol=ukol-ikol
	mscen=zalihe.procen
	SELECT nivstav
	replace kolicina WITH mkol
	replace scena WITH mscen
ENDIF
SELECT nivstav
SKIP
ENDDO
CLOSE ALL
	