USE c:\orientsilver600\baze\roba ALIAS roba IN 0
USE c:\orientsilver600\baze\kalkstav ALIAS kalkstav IN 0

SELECT roba
replace ALL kolicina WITH 0


SELECT kalkstav
GOTO top
DO WHILE !EOF()
a1=kalkstav.sifrob
a2=kalkstav.kolicina
a3=kalkstav.ncena
a4=kalkstav.pcena
SELECT roba
SET ORDER TO tag sifrob
GOTO top
SEEK a1
IF FOUND()
	replace roba.kolicina WITH roba.kolicina+a2
	replace roba.nabcen WITH a3
	replace roba.procen WITH a4
	replace roba.ukol WITH roba.kolicina
ENDIF
SELECT kalkstav
SKIP
ENDDO
	