SET DELETED ON
SET DATE GERMAN
SET CENTURY on
USE d:\2022\baze\zagrac ALIAS zagrac shared IN 0
USE d:\2022\baze\virman ALIAS virman shared IN 0
SELECT virman
GOTO top
DO WHILE !EOF()
IF virman.duguje=0 AND virman.potrazuje=0 AND !EMPTY(brdok)
	a1=virman.brdok
	SELECT zagrac
	SET ORDER TO tag brdok
	GOTO top
	SEEK a1
	IF FOUND()
		a2=zagrac.pvred
		SELECT virman
		replace virman.duguje WITH a2
	ENDIF
ENDIF
SELECT virman
SKIP
ENDDO
RETURN
		
