USE c:\2008\baze\roba ALIAS roba IN 0
USE c:\2008\baze\inventar ALIAS INVENTAR IN 0
SELECT roba
SET ORDER TO tag sifrob
GOTO top
SELECT inventar
GOTO top
DO WHILE !EOF()
A=INVENTAR.SIFROB
SELECT ROBA
GOTO TOP
SEEK A
IF FOUND()
	KOL=ROBA.UKOL-ROBA.IKOL
	IF INVENTAR.IKOL<>KOL
		REPLACE INVENTAR.IKOL WITH KOL
	ENDIF
ENDIF
SELECT INVENTAR
SKIP
ENDDO
RETURN
		